From 82faef8aeb019f39ef790e8c4f149e145d04004a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 8 Jan 2020 17:18:28 +0100 Subject: [PATCH] [IMP] contract: remove redundant method I have detected a method that was created as redundant and with the same technique used when preparing the line values, so better to have everything together in the same method instead of having it spread. --- product_contract/models/contract_line.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product_contract/models/contract_line.py b/product_contract/models/contract_line.py index 2a85f73e7..96978a895 100644 --- a/product_contract/models/contract_line.py +++ b/product_contract/models/contract_line.py @@ -19,9 +19,9 @@ class ContractLine(models.Model): display_name = fields.Char(compute='_compute_display_name_2') @api.multi - def _prepare_invoice_line(self, invoice_id=False): + def _prepare_invoice_line(self, invoice_id=False, invoice_values=False): res = super(ContractLine, self)._prepare_invoice_line( - invoice_id=invoice_id + invoice_id=invoice_id, invoice_values=invoice_values, ) if self.sale_order_line_id and res: res['sale_line_ids'] = [(6, 0, [self.sale_order_line_id.id])]