diff --git a/account_reconcile_restrict_partner_mismatch/README.rst b/account_reconcile_restrict_partner_mismatch/README.rst index e69de29b..8abb6497 100644 --- a/account_reconcile_restrict_partner_mismatch/README.rst +++ b/account_reconcile_restrict_partner_mismatch/README.rst @@ -0,0 +1,77 @@ +=================================== +Reconcile restrict partner mismatch +=================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github + :target: https://github.com/OCA/account-reconcile/tree/12.0/account_reconcile_restrict_partner_mismatch + :alt: OCA/account-reconcile +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_reconcile_restrict_partner_mismatch + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/98/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module restricts reconciliation between journal items when: + + - both items have different partners + - one item is with partner and the other without it + +This rule applies only for journal items using receivable and payable account type. + +As at the moment of installation some journal items could have been reconciled +using different partners, you can detect them in menu Accounting > Adviser > +Reconciled items with partner mismatch. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/account-reconcile `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_reconcile_restrict_partner_mismatch/i18n/account_reconcile_restrict_partner_mismatch.pot b/account_reconcile_restrict_partner_mismatch/i18n/account_reconcile_restrict_partner_mismatch.pot new file mode 100644 index 00000000..9a97f573 --- /dev/null +++ b/account_reconcile_restrict_partner_mismatch/i18n/account_reconcile_restrict_partner_mismatch.pot @@ -0,0 +1,104 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_reconcile_restrict_partner_mismatch +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_id +msgid "Account" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_type_id +msgid "Account type" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__credit_amount +msgid "Credit amount" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__credit_move_id +msgid "Credit move" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__credit_partner_id +msgid "Credit partner" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__debit_amount +msgid "Debit amount" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__debit_move_id +msgid "Debit move" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__debit_partner_id +msgid "Debit partner" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__display_name +msgid "Display Name" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__full_reconcile_id +msgid "Full Reconcile" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__id +msgid "ID" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model,name:account_reconcile_restrict_partner_mismatch.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__partial_reconcile_id +msgid "Partial Reconcile" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.actions.act_window,name:account_reconcile_restrict_partner_mismatch.action_account_reconcile_partner_mismatch_report +#: model:ir.ui.menu,name:account_reconcile_restrict_partner_mismatch.menu_account_reconcile_partner_mismatch_report +#: model_terms:ir.ui.view,arch_db:account_reconcile_restrict_partner_mismatch.account_reconcile_partner_mismatch_report_view_form +#: model_terms:ir.ui.view,arch_db:account_reconcile_restrict_partner_mismatch.view_account_move_reconciled_report_tree +msgid "Reconciled items with partner mismatch" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: code:addons/account_reconcile_restrict_partner_mismatch/models/account_move_line.py:26 +#, python-format +msgid "The partner has to be the same on all lines for receivable and payable accounts!" +msgstr "" + +#. module: account_reconcile_restrict_partner_mismatch +#: model:ir.model,name:account_reconcile_restrict_partner_mismatch.model_account_reconcile_partner_mismatch_report +msgid "account.reconcile.partner.mismatch.report" +msgstr "" + diff --git a/account_reconcile_restrict_partner_mismatch/static/description/index.html b/account_reconcile_restrict_partner_mismatch/static/description/index.html index 876a1f6c..aa278bcf 100644 --- a/account_reconcile_restrict_partner_mismatch/static/description/index.html +++ b/account_reconcile_restrict_partner_mismatch/static/description/index.html @@ -3,8 +3,8 @@ - -Account Set Reconcilable + +Reconcile restrict partner mismatch -
-

Account Set Reconcilable

+
+

Reconcile restrict partner mismatch

-

Beta License: AGPL-3 OCA/account-reconcile Translate me on Weblate Try me on Runbot

-

Allows to set as reconcilable a non reconcilable account that already have journal items.

+

Beta License: AGPL-3 OCA/account-reconcile Translate me on Weblate Try me on Runbot

+

This module restricts reconciliation between journal items when:

+
+
    +
  • both items have different partners
  • +
  • one item is with partner and the other without it
  • +
+
+

This rule applies only for journal items using receivable and payable account type.

+

As at the moment of installation some journal items could have been reconciled +using different partners, you can detect them in menu Accounting > Adviser > +Reconciled items with partner mismatch.

Table of contents

@@ -386,7 +395,7 @@ ul.auto-toc {

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -394,23 +403,17 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

Authors

    -
  • Eficent
  • -
-
-
-

Contributors

-
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/account-reconcile project on GitHub.

+

This module is part of the OCA/account-reconcile project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_reconcile_restrict_partner_mismatch/tests/test_reconciliation.py b/account_reconcile_restrict_partner_mismatch/tests/test_reconciliation.py index a21c6af9..13be4455 100644 --- a/account_reconcile_restrict_partner_mismatch/tests/test_reconciliation.py +++ b/account_reconcile_restrict_partner_mismatch/tests/test_reconciliation.py @@ -31,11 +31,6 @@ class TestReconciliation(AccountingTestCase): self.bank_journal = self.env['account.journal']. \ create({'name': 'Bank', 'type': 'bank', 'code': 'BNK67'}) self.aml = self.init_moves() - self.wizard = self.env['account.move.line.reconcile.writeoff']. \ - with_context(active_ids=[x.id for x in self.aml]).create({ - 'journal_id': self.bank_journal.id, - 'writeoff_acc_id': self.account_rsa.id - }) def create_move(self, name, amount): debit_line_vals = { @@ -73,22 +68,22 @@ class TestReconciliation(AccountingTestCase): return aml_recs def test_reconcile_no_partner(self): - self.wizard.trans_rec_reconcile() + self.aml.reconcile() self.assertTrue(all(self.aml.mapped('reconciled'))) def test_reconcile_partner_mismatch(self): self.aml[0].partner_id = self.partner.id with self.assertRaises(UserError): - self.wizard.trans_rec_reconcile() + self.aml.reconcile() # all lines with same partner allowed self.aml.write({'partner_id': self.partner.id}) - self.wizard.trans_rec_reconcile() + self.aml.reconcile() self.assertTrue(all(self.aml.mapped('reconciled'))) def test_reconcile_accounts_excluded(self): self.aml[0].partner_id = self.partner.id with self.assertRaises(UserError): - self.wizard.trans_rec_reconcile() + self.aml.reconcile() # reconciliation forbiden only for certain types of accounts account = self.env['account.account'].search([ ('user_type_id.type', '=', 'other') @@ -96,9 +91,9 @@ class TestReconciliation(AccountingTestCase): account.reconcile = True self.aml[0].account_id = account.id with self.assertRaises(UserError): - self.wizard.trans_rec_reconcile() + self.aml.reconcile() # reconciliation for different partners allowed # for not forbidden types self.aml.write({'account_id': account.id}) - self.wizard.trans_rec_reconcile() + self.aml.reconcile() self.assertTrue(all(self.aml.mapped('reconciled')))