diff --git a/models/sale_intervention.py b/models/sale_intervention.py index b0f6cef1259ac8dab5316df02a3e92b257e2f030..9b194519f4d6f1ce185223360b037f6e3c0d7d1e 100644 --- a/models/sale_intervention.py +++ b/models/sale_intervention.py @@ -9,7 +9,7 @@ class SaleIntervention(models.Model): def _update_order_lines(self): """ - Rewrite function to use TVA + Rewrite function to use Taxes """ product_tmpl = self.intervention_type_id plant_categ_id = self.env.ref("ap_sale_project.product_category_plant") @@ -85,13 +85,14 @@ class SaleIntervention(models.Model): "product_uom_qty": quantity, "sale_project_id": self.project_id.id, } + sol_name = ( + "Projet " + self.project_id.name + " - " + product_tmpl.name + ) sols.append( { **data_sol_section, **{ - "name": self.project_id.name - + " - " - + product_tmpl.name, + "name": sol_name, "display_type": "line_section", }, } @@ -101,7 +102,7 @@ class SaleIntervention(models.Model): **data_sol_section, **{ "price_unit": plant_price, - "name": "Plants garantis 3 ans", + "name": sol_name + " - Plants garantis 3 ans", "tax_id": [(6, 0, vat_plant_categ.ids)], }, } @@ -111,8 +112,8 @@ class SaleIntervention(models.Model): **data_sol_section, **{ "price_unit": price_unit - plant_price, - "name": "Paillage, protections, ingénierie, " - "livraison et suivi", + "name": sol_name + " - Paillage, protections, " + "ingénierie, livraison et suivi", "tax_id": [(6, 0, vat_furniture_categ.ids)], }, }