[FIX]account_budget_forecast:odoo cant copy multiple times on the same record One2many fields that all point to analic_id, so pass them to copy=False

This commit is contained in:
2025-04-14 16:13:29 +02:00
parent 2d7a37f65a
commit 71e3188383
3 changed files with 16 additions and 11 deletions

View File

@@ -12,43 +12,43 @@ class AccountAnalyticAccount(models.Model):
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "manpower")],
copy=True,
copy=False,
)
budget_forecast_material_ids = fields.One2many(
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "material")],
copy=True,
copy=False,
)
budget_forecast_equipment_ids = fields.One2many(
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "equipment")],
copy=True,
copy=False,
)
budget_forecast_subcontractors_ids = fields.One2many(
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "subcontractors")],
copy=True,
copy=False,
)
budget_forecast_delivery_ids = fields.One2many(
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "delivery")],
copy=True,
copy=False,
)
budget_forecast_miscellaneous_ids = fields.One2many(
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "miscellaneous")],
copy=True,
copy=False,
)
budget_forecast_unplanned_ids = fields.One2many(
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "unplanned")],
copy=True,
copy=False,
)
project_section_budget_ids = fields.One2many(
"budget.forecast",