From a6da8d5a8a0ee304148847bce9accc8d919dc897 Mon Sep 17 00:00:00 2001 From: Mitali Patel Date: Thu, 1 Jun 2017 15:05:38 +0530 Subject: [PATCH] [REM] hr_expense_check: This module no longer needed as it's functionlity is fulfilled by 'account.register.payments' module which we reused to pay emplyee expenses. --- addons/hr_expense_check/__init__.py | 1 - addons/hr_expense_check/__manifest__.py | 15 -------- addons/hr_expense_check/models/__init__.py | 1 - addons/hr_expense_check/models/payment.py | 40 ---------------------- addons/hr_expense_check/views/payment.xml | 18 ---------- 5 files changed, 75 deletions(-) delete mode 100644 addons/hr_expense_check/__init__.py delete mode 100644 addons/hr_expense_check/__manifest__.py delete mode 100644 addons/hr_expense_check/models/__init__.py delete mode 100644 addons/hr_expense_check/models/payment.py delete mode 100644 addons/hr_expense_check/views/payment.xml diff --git a/addons/hr_expense_check/__init__.py b/addons/hr_expense_check/__init__.py deleted file mode 100644 index 0650744f6bc69..0000000000000 --- a/addons/hr_expense_check/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import models diff --git a/addons/hr_expense_check/__manifest__.py b/addons/hr_expense_check/__manifest__.py deleted file mode 100644 index 8fe469b59001a..0000000000000 --- a/addons/hr_expense_check/__manifest__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -{ - 'name': "Check Printing in Expenses", - 'summary': """Print amount in words on checks issued for expenses""", - 'category': 'Accounting', - 'description': """ - Print amount in words on checks issued for expenses - """, - 'version': '1.0', - 'depends': ['account_check_printing', 'hr_expense'], - 'auto_install': True, - 'data': [ - 'views/payment.xml', - ], -} diff --git a/addons/hr_expense_check/models/__init__.py b/addons/hr_expense_check/models/__init__.py deleted file mode 100644 index f65284264db58..0000000000000 --- a/addons/hr_expense_check/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import payment diff --git a/addons/hr_expense_check/models/payment.py b/addons/hr_expense_check/models/payment.py deleted file mode 100644 index 857ac4a030d6e..0000000000000 --- a/addons/hr_expense_check/models/payment.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, api - - -class HrExpenseRegisterPaymentWizard(models.TransientModel): - _inherit = "hr.expense.sheet.register.payment.wizard" - - check_amount_in_words = fields.Char(string="Amount in Words") - check_manual_sequencing = fields.Boolean(related='journal_id.check_manual_sequencing') - # Note: a check_number == 0 means that it will be attributed when the check is printed - check_number = fields.Integer(string="Check Number", readonly=True, copy=False, default=0, - help="Number of the check corresponding to this payment. If your pre-printed check are not already numbered, " - "you can manage the numbering in the journal configuration page.") - payment_method_code_2 = fields.Char(related='payment_method_id.code', - help="Technical field used to adapt the interface to the payment type selected.", - string="Payment Method Code 2", - readonly=True) - - @api.onchange('journal_id') - def _onchange_journal_id(self): - if hasattr(super(HrExpenseRegisterPaymentWizard, self), '_onchange_journal_id'): - super(HrExpenseRegisterPaymentWizard, self)._onchange_journal_id() - if self.journal_id.check_manual_sequencing: - self.check_number = self.journal_id.check_sequence_id.number_next_actual - - @api.onchange('amount') - def _onchange_amount(self): - if hasattr(super(HrExpenseRegisterPaymentWizard, self), '_onchange_amount'): - super(HrExpenseRegisterPaymentWizard, self)._onchange_amount() - self.check_amount_in_words = self.currency_id.amount_to_text(self.amount) - - def _get_payment_vals(self): - res = super(HrExpenseRegisterPaymentWizard, self)._get_payment_vals() - if self.payment_method_id == self.env.ref('account_check_printing.account_payment_method_check'): - res.update({ - 'check_amount_in_words': self.check_amount_in_words, - 'check_manual_sequencing': self.check_manual_sequencing, - }) - return res diff --git a/addons/hr_expense_check/views/payment.xml b/addons/hr_expense_check/views/payment.xml deleted file mode 100644 index 1300ef63cb889..0000000000000 --- a/addons/hr_expense_check/views/payment.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - hr.expense.sheet.register.payment.wizard.form.check.inherited - hr.expense.sheet.register.payment.wizard - - - - - - - - - - - - -