From 20199377e907669507be5b10a3b9e3230fe25535 Mon Sep 17 00:00:00 2001 From: Adasat Date: Mon, 20 Nov 2023 13:42:31 +0000 Subject: [PATCH] [15.0][FIX]product_contract There was no label for the is_contract field in the sales order line form view. --- product_contract/models/contract_line.py | 2 +- product_contract/models/sale_order.py | 2 +- product_contract/views/sale_order.xml | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/product_contract/models/contract_line.py b/product_contract/models/contract_line.py index 91c08480a07..4162a944ae6 100644 --- a/product_contract/models/contract_line.py +++ b/product_contract/models/contract_line.py @@ -18,7 +18,7 @@ class ContractLine(models.Model): ) def _prepare_invoice_line(self, move_form): - res = super(ContractLine, self)._prepare_invoice_line(move_form) + res = super()._prepare_invoice_line(move_form) if self.sale_order_line_id and res: res["sale_line_ids"] = [(6, 0, [self.sale_order_line_id.id])] return res diff --git a/product_contract/models/sale_order.py b/product_contract/models/sale_order.py index 680505f0a54..efb4637f1c3 100644 --- a/product_contract/models/sale_order.py +++ b/product_contract/models/sale_order.py @@ -94,7 +94,7 @@ def action_create_contract(self): raise ValidationError( _( "You must specify a contract " - "template for '{}' product in '{}' company." + "template for '{0}' product in '{1}' company." ).format(order_line.product_id.name, rec.company_id.name) ) contract_templates |= contract_template diff --git a/product_contract/views/sale_order.xml b/product_contract/views/sale_order.xml index 2b08163fd27..2e1de84cea6 100644 --- a/product_contract/views/sale_order.xml +++ b/product_contract/views/sale_order.xml @@ -31,7 +31,10 @@ - + + + + - + + +