From 981c6d11d98e81a65c9f9199c28aa4856e0ed62c Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Wed, 23 Oct 2019 17:27:55 +0200 Subject: [PATCH 1/2] [12.0][FIX] - contract_mandate: fix inherited method call _prepare_invoice --- contract_mandate/models/contract.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contract_mandate/models/contract.py b/contract_mandate/models/contract.py index 65c07023e3..87dfbb6f91 100644 --- a/contract_mandate/models/contract.py +++ b/contract_mandate/models/contract.py @@ -32,8 +32,10 @@ def _onchange_payment_mode_id(self): self.mandate_id = False @api.multi - def _prepare_invoice(self, date_ref=False): - invoice_vals = super(ContractContract, self)._prepare_invoice(date_ref) + def _prepare_invoice(self, date_invoice, journal=None): + invoice_vals = super(ContractContract, self)._prepare_invoice( + date_invoice, journal + ) if self.mandate_id: invoice_vals['mandate_id'] = self.mandate_id.id elif self.payment_mode_id.payment_method_id.mandate_required: From 7be0ce4d946ddbc79c5a9643c2c12861d6115bd4 Mon Sep 17 00:00:00 2001 From: Bejaoui Souheil Date: Wed, 23 Oct 2019 17:35:22 +0200 Subject: [PATCH 2/2] Update contract_mandate/models/contract.py Co-Authored-By: Pedro M. Baeza --- contract_mandate/models/contract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract_mandate/models/contract.py b/contract_mandate/models/contract.py index 87dfbb6f91..2e563ebaf1 100644 --- a/contract_mandate/models/contract.py +++ b/contract_mandate/models/contract.py @@ -34,7 +34,7 @@ def _onchange_payment_mode_id(self): @api.multi def _prepare_invoice(self, date_invoice, journal=None): invoice_vals = super(ContractContract, self)._prepare_invoice( - date_invoice, journal + date_invoice, journal=journal ) if self.mandate_id: invoice_vals['mandate_id'] = self.mandate_id.id