[UPD] Creation budget category Delivery

This commit is contained in:
Stéphan Sainléger
2022-05-19 16:08:19 +02:00
parent 03643727f0
commit d763e7e24b
3 changed files with 34 additions and 0 deletions

View File

@@ -32,6 +32,12 @@ class AccountAnalyticAccount(models.Model):
domain=[("budget_category", "=", "subcontractors")],
copy=True,
)
budget_forecast_delivery_ids = fields.One2many(
"budget.forecast",
"analytic_id",
domain=[("budget_category", "=", "delivery")],
copy=True,
)
budget_forecast_miscellaneous_ids = fields.One2many(
"budget.forecast",
"analytic_id",

View File

@@ -27,6 +27,7 @@ class BudgetForecast(models.Model):
("material", "Material"),
("equipment", "Equipment"),
("subcontractors", "Subcontractors"),
("delivery", "Delivery"),
("miscellaneous", "Miscellaneous"),
("unplanned", "Unplanned"),
],

View File

@@ -115,6 +115,33 @@
</tree>
</field>
</page>
<page name="category_delivery" string="Delivery">
<field name="budget_forecast_delivery_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'delivery'}">
<tree default_order="sequence" editable="bottom">
<control>
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
</control>
<field name="sequence" widget="handle" />
<field name="budget_category" invisible="1" optional="hide" />
<field name="parent_id" optional="hide" />
<field name="display_type" invisible="1" />
<field name="name" optional="hide" />
<field name="product_id" />
<field name="description" optional="show" />
<field name="note" optional="hide" />
<field name="plan_price" />
<field name="plan_qty" />
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
<field name="diff_expenses" string="Diff" optional="hide" />
<field name="incomes" string="Incomes" optional="hide" />
<field name="balance" string="Balance" optional="hide" />
</tree>
</field>
</page>
<page name="category_miscellaneous" string="Miscellaneous">
<field name="budget_forecast_miscellaneous_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'miscellaneous'}">
<tree default_order="sequence" editable="bottom">