Skip to content
Snippets Groups Projects
Commit db83bcb7 authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

[FIX] deletion of sol

parent 622eefa5
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,9 @@ class SaleOrder(models.Model): ...@@ -30,7 +30,9 @@ class SaleOrder(models.Model):
current_inter = list() current_inter = list()
for project in self.sale_project_ids: for project in self.sale_project_ids:
for inter in project.intervention_ids: for inter in project.intervention_ids:
current_inter.append((project.id, inter.intervention_type_id.id)) current_inter.append(
(project.id, inter.intervention_type_id.product_variant_id.id)
)
for sol in self.order_line: for sol in self.order_line:
if ( if (
sol.product_id sol.product_id
...@@ -42,4 +44,3 @@ class SaleOrder(models.Model): ...@@ -42,4 +44,3 @@ class SaleOrder(models.Model):
if self.state == "draft": if self.state == "draft":
self.write({"state": "sent"}) self.write({"state": "sent"})
return self.env.ref("sale.action_report_saleorder").report_action(self) return self.env.ref("sale.action_report_saleorder").report_action(self)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment