From 2ad68f94a8e485016d7aac840f8cee21dad49acf Mon Sep 17 00:00:00 2001 From: Thomas Binsfeld Date: Tue, 18 Dec 2018 14:08:31 +0100 Subject: [PATCH] [REF] Contract Product: invoice in prepare_invoice_line is optional --- 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 23fcb306..e067929d 100644 --- a/product_contract/models/contract_line.py +++ b/product_contract/models/contract_line.py @@ -16,9 +16,9 @@ class AccountAnalyticInvoiceLine(models.Model): ) @api.multi - def _prepare_invoice_line(self, invoice_id): + def _prepare_invoice_line(self, invoice_id=False): res = super(AccountAnalyticInvoiceLine, self)._prepare_invoice_line( - invoice_id + invoice_id=invoice_id ) if self.sale_order_line_id: res['sale_line_ids'] = [(6, 0, [self.sale_order_line_id.id])]