[UPD] Synchronize budget with new quotation lines

By pressing button "Sync missing budget lines", a new budget section
line is created for all the order lines without associated budget line.
This commit is contained in:
Stéphan Sainléger
2022-05-24 16:13:46 +02:00
parent 7c415a3362
commit 4b5188bd06
6 changed files with 70 additions and 8 deletions

View File

@@ -263,6 +263,7 @@ class AccountAnalyticAccount(models.Model):
"name": section.product_id.name,
"product_uom_qty": 1.0,
"price_unit": section.plan_amount_with_coeff,
"budget_forecast_id": section.id,
}
self.env["sale.order.line"].create(values)
quotation.analytic_account_id = self.id