diff --git a/account_cash_basis_group_base_line/README.rst b/account_cash_basis_group_base_line/README.rst new file mode 100644 index 000000000..e69de29bb diff --git a/account_cash_basis_group_base_line/__init__.py b/account_cash_basis_group_base_line/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/account_cash_basis_group_base_line/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_cash_basis_group_base_line/__manifest__.py b/account_cash_basis_group_base_line/__manifest__.py new file mode 100644 index 000000000..1e8c2a8bb --- /dev/null +++ b/account_cash_basis_group_base_line/__manifest__.py @@ -0,0 +1,13 @@ +{ + 'name': 'Tax Cash Basis Group Base Lines', + 'version': '12.0.0.0.1', + 'summary': 'Compacting the creation of Journal Lines for CABA base lines.', + 'sequence': 5, + 'category': 'Accounting', + 'depends': ['account'], + 'author': 'Vauxoo, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'data': [], + 'installable': True, + 'auto_install': False, +} diff --git a/account_cash_basis_group_base_line/models/__init__.py b/account_cash_basis_group_base_line/models/__init__.py new file mode 100644 index 000000000..9c0a42138 --- /dev/null +++ b/account_cash_basis_group_base_line/models/__init__.py @@ -0,0 +1 @@ +from . import account_move diff --git a/account_cash_basis_group_base_line/models/account_move.py b/account_cash_basis_group_base_line/models/account_move.py new file mode 100644 index 000000000..8c8fead81 --- /dev/null +++ b/account_cash_basis_group_base_line/models/account_move.py @@ -0,0 +1,22 @@ +from odoo import models + + +class AccountPartialReconcile(models.Model): + _inherit = "account.partial.reconcile" + + def _get_tax_cash_basis_base_key(self, tax, move, line): + account_id = self._get_tax_cash_basis_base_account(line, tax) + return (move.id, account_id.id, tax.id, line.currency_id.id, line.partner_id.id) + + def _get_tax_cash_basis_base_common_vals(self, key, new_move): + move, account_id, tax, currency_id, partner_id = key + move = self.env['account.move'].browse(move) + return { + 'name': move.name, + 'account_id': account_id, + 'tax_exigible': True, + 'tax_ids': [(6, 0, [tax])], + 'move_id': new_move.id, + 'currency_id': currency_id, + 'partner_id': partner_id, + } diff --git a/account_cash_basis_group_base_line/readme/CONTRIBUTORS.rst b/account_cash_basis_group_base_line/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..7a7b700eb --- /dev/null +++ b/account_cash_basis_group_base_line/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Humberto Arocha +* Gabriela Mogollón diff --git a/account_cash_basis_group_base_line/readme/DESCRIPTION.rst b/account_cash_basis_group_base_line/readme/DESCRIPTION.rst new file mode 100644 index 000000000..65aa9fa03 --- /dev/null +++ b/account_cash_basis_group_base_line/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This module compact the creation of Journal Lines for Cash Basis base lines. + +Instead of creating two base lines per line with cash basis tax, let us group +the creation lines so that there are fewer lines in the Cash Basis Journal Entry. diff --git a/account_cash_basis_group_base_line/readme/USAGE.rst b/account_cash_basis_group_base_line/readme/USAGE.rst new file mode 100644 index 000000000..fdd456511 --- /dev/null +++ b/account_cash_basis_group_base_line/readme/USAGE.rst @@ -0,0 +1 @@ +Just Install the module. No extra configuration is needed.