Skip to content
Extraits de code Groupes Projets
Valider e39137ab rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[IMP] update sol name

parent 585d641d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -9,7 +9,7 @@ class SaleIntervention(models.Model): ...@@ -9,7 +9,7 @@ class SaleIntervention(models.Model):
def _update_order_lines(self): def _update_order_lines(self):
""" """
Rewrite function to use TVA Rewrite function to use Taxes
""" """
product_tmpl = self.intervention_type_id product_tmpl = self.intervention_type_id
plant_categ_id = self.env.ref("ap_sale_project.product_category_plant") plant_categ_id = self.env.ref("ap_sale_project.product_category_plant")
...@@ -85,13 +85,14 @@ class SaleIntervention(models.Model): ...@@ -85,13 +85,14 @@ class SaleIntervention(models.Model):
"product_uom_qty": quantity, "product_uom_qty": quantity,
"sale_project_id": self.project_id.id, "sale_project_id": self.project_id.id,
} }
sol_name = (
"Projet " + self.project_id.name + " - " + product_tmpl.name
)
sols.append( sols.append(
{ {
**data_sol_section, **data_sol_section,
**{ **{
"name": self.project_id.name "name": sol_name,
+ " - "
+ product_tmpl.name,
"display_type": "line_section", "display_type": "line_section",
}, },
} }
...@@ -101,7 +102,7 @@ class SaleIntervention(models.Model): ...@@ -101,7 +102,7 @@ class SaleIntervention(models.Model):
**data_sol_section, **data_sol_section,
**{ **{
"price_unit": plant_price, "price_unit": plant_price,
"name": "Plants garantis 3 ans", "name": sol_name + " - Plants garantis 3 ans",
"tax_id": [(6, 0, vat_plant_categ.ids)], "tax_id": [(6, 0, vat_plant_categ.ids)],
}, },
} }
...@@ -111,8 +112,8 @@ class SaleIntervention(models.Model): ...@@ -111,8 +112,8 @@ class SaleIntervention(models.Model):
**data_sol_section, **data_sol_section,
**{ **{
"price_unit": price_unit - plant_price, "price_unit": price_unit - plant_price,
"name": "Paillage, protections, ingénierie, " "name": sol_name + " - Paillage, protections, "
"livraison et suivi", "ingénierie, livraison et suivi",
"tax_id": [(6, 0, vat_furniture_categ.ids)], "tax_id": [(6, 0, vat_furniture_categ.ids)],
}, },
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter