From de5291a66b27ff0de98a42ba1d2d87dfe5636a13 Mon Sep 17 00:00:00 2001 From: docker-odoo Date: Mon, 11 Nov 2024 17:58:06 +0000 Subject: [PATCH] [MIG] account_payment_pro_multi_store: Migration to 18.0 --- account_payment_pro_multi_store/__manifest__.py | 4 ++-- account_payment_pro_multi_store/models/account_payment.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/account_payment_pro_multi_store/__manifest__.py b/account_payment_pro_multi_store/__manifest__.py index c0f6b58..490c6c2 100644 --- a/account_payment_pro_multi_store/__manifest__.py +++ b/account_payment_pro_multi_store/__manifest__.py @@ -19,7 +19,7 @@ ############################################################################## { 'name': 'Payment Pro Multi Stores', - 'version': '17.0.1.1.0', + 'version': "18.0.1.0.0", 'category': 'Accounting', 'sequence': 14, 'summary': '', @@ -38,7 +38,7 @@ 'demo': [ 'demo/res_store_demo.xml', ], - 'installable': False, + 'installable': True, 'auto_install': False, 'application': False, } diff --git a/account_payment_pro_multi_store/models/account_payment.py b/account_payment_pro_multi_store/models/account_payment.py index 320ac6e..b3cdc9b 100644 --- a/account_payment_pro_multi_store/models/account_payment.py +++ b/account_payment_pro_multi_store/models/account_payment.py @@ -11,6 +11,8 @@ def _get_to_pay_move_lines_domain(self): res = super()._get_to_pay_move_lines_domain() if self.store_id.only_allow_reonciliaton_of_this_store: res += [('store_id', '=', self.store_id.id)] + if self.partner_id.commercial_partner_id.id: + self.with_context(restrict_store_id=self.store_id.id)._compute_available_journal_ids() elif self.store_id: res += ['|', ('store_id', '=', False), ('store_id.only_allow_reonciliaton_of_this_store', '=', False)] return res