diff --git a/account_payment_order_return/__manifest__.py b/account_payment_order_return/__manifest__.py index e3166836861..5d4497b42c8 100644 --- a/account_payment_order_return/__manifest__.py +++ b/account_payment_order_return/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Payment Order Return", - "version": "16.0.1.0.1", + "version": "17.0.1.0.1", "category": "Banking addons", "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/bank-payment", diff --git a/account_payment_order_return/i18n/account_payment_order_return.pot b/account_payment_order_return/i18n/account_payment_order_return.pot index 5b65a20a4e6..04e9f17775a 100644 --- a/account_payment_order_return/i18n/account_payment_order_return.pot +++ b/account_payment_order_return/i18n/account_payment_order_return.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/account_payment_order_return/readme/CONTRIBUTORS.md b/account_payment_order_return/readme/CONTRIBUTORS.md index b8118c32841..4fab394fc2d 100644 --- a/account_payment_order_return/readme/CONTRIBUTORS.md +++ b/account_payment_order_return/readme/CONTRIBUTORS.md @@ -3,3 +3,4 @@ - Vicent Cubells - João Marques - Kitti U. \ +- Almudena de La Puente diff --git a/account_payment_order_return/wizards/account_payment_line_create.py b/account_payment_order_return/wizards/account_payment_line_create.py index a70c84cac9f..001b5203deb 100644 --- a/account_payment_order_return/wizards/account_payment_line_create.py +++ b/account_payment_order_return/wizards/account_payment_line_create.py @@ -2,7 +2,7 @@ # Copyright 2021 Tecnativa - João Marques # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -from odoo import fields, models +from odoo import api, fields, models class AccountPaymentLineCreate(models.TransientModel): @@ -10,10 +10,23 @@ class AccountPaymentLineCreate(models.TransientModel): include_returned = fields.Boolean(string="Include move lines from returns") - def _prepare_move_line_domain(self): - domain = super()._prepare_move_line_domain() + @api.depends( + "date_type", + "move_date", + "due_date", + "journal_ids", + "invoice", + "target_move", + "allow_blocked", + "payment_mode", + "partner_ids", + ) + def _compute_move_line_domain(self): + res = super()._compute_move_line_domain() + domain = self.move_line_domain if not self.include_returned: domain += [ ("move_id.returned_payment", "=", False), ] - return domain + self.move_line_domain = domain + return res