diff --git a/NEWS.rst b/NEWS.rst index f798beb38f86b26f09a91f01b646a83bcce689cf_TkVXUy5yc3Q=..4d21f6add6d983c3df6e84bafe49678b2400fc8e_TkVXUy5yc3Q= 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,3 +1,9 @@ +11.0.1.5.0 +========== + +* On accounting entry reconciliation, the restriction to one partner associated + to reconciled entries can be deactivated, using a context key. + 11.0.1.4.0 ========== diff --git a/__manifest__.py b/__manifest__.py index f798beb38f86b26f09a91f01b646a83bcce689cf_X19tYW5pZmVzdF9fLnB5..4d21f6add6d983c3df6e84bafe49678b2400fc8e_X19tYW5pZmVzdF9fLnB5 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -21,7 +21,7 @@ { "name": "Accounting Reports", "license": "AGPL-3", - "version": "11.0.1.4.0", + "version": "11.0.1.5.0", "category": "Accounting", "author": "XCG Consulting", "website": "https://odoo.consulting/", diff --git a/models/account_move_line.py b/models/account_move_line.py index f798beb38f86b26f09a91f01b646a83bcce689cf_bW9kZWxzL2FjY291bnRfbW92ZV9saW5lLnB5..4d21f6add6d983c3df6e84bafe49678b2400fc8e_bW9kZWxzL2FjY291bnRfbW92ZV9saW5lLnB5 100644 --- a/models/account_move_line.py +++ b/models/account_move_line.py @@ -73,7 +73,10 @@ "all entries!" ) ) - if len(set(partners)) > 1: + if ( + self.env.context.get("control_partner", True) + and len(set(partners)) > 1 + ): raise UserError(_("Entries are not of the same partner!")) if len(set(all_accounts)) > 1: raise UserError(_("Entries are not of the same account!")) diff --git a/wizards/account_monthly_statement_gen.py b/wizards/account_monthly_statement_gen.py index f798beb38f86b26f09a91f01b646a83bcce689cf_d2l6YXJkcy9hY2NvdW50X21vbnRobHlfc3RhdGVtZW50X2dlbi5weQ==..4d21f6add6d983c3df6e84bafe49678b2400fc8e_d2l6YXJkcy9hY2NvdW50X21vbnRobHlfc3RhdGVtZW50X2dlbi5weQ== 100644 --- a/wizards/account_monthly_statement_gen.py +++ b/wizards/account_monthly_statement_gen.py @@ -113,7 +113,7 @@ amount = 0.0 line_count = 0 partner_set = set() - for line_id, partner_id, line_amount in self._find_entries(): + for _line_id, partner_id, line_amount in self._find_entries(): amount += line_amount line_count += 1 partner_set.add(partner_id)