Skip to content

Commit

Permalink
[IMP] mis_builder_budget: add active fields
Browse files Browse the repository at this point in the history
Add active field on mis.budget.by.account and mis.budget model and related views
  • Loading branch information
acsonefho committed Dec 10, 2024
1 parent 75690a1 commit eaea6fa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions mis_builder_budget/models/mis_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ class MisBudget(models.Model):
item_ids = fields.One2many(
comodel_name="mis.budget.item", inverse_name="budget_id", copy=True
)
active = fields.Boolean(default=True, copy=False)
1 change: 1 addition & 0 deletions mis_builder_budget/models/mis_budget_by_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ class MisBudgetByAccount(models.Model):
allow_items_overlap = fields.Boolean(
help="If checked, overlap between budget items is allowed"
)
active = fields.Boolean(default=True, copy=False)
7 changes: 7 additions & 0 deletions mis_builder_budget/views/mis_budget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</div>
<group>
<field name="name" />
<field name="active" invisible="True" />
<field name="description" />
<field name="report_id" />
<field name="company_id" groups="base.group_multi_company" />
Expand All @@ -65,6 +66,12 @@
<search>
<field name="name" />
<field name="state" />
<separator />
<filter
string="Archived"
name="inactive"
domain="[('active', '=', False)]"
/>
</search>
</field>
</record>
Expand Down
7 changes: 7 additions & 0 deletions mis_builder_budget/views/mis_budget_by_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</div>
<group>
<field name="name" />
<field name="active" invisible="True" />
<field name="description" />
<field name="company_id" groups="base.group_multi_company" />
</group>
Expand All @@ -65,6 +66,12 @@
<search>
<field name="name" />
<field name="state" />
<separator />
<filter
string="Archived"
name="inactive"
domain="[('active', '=', False)]"
/>
</search>
</field>
</record>
Expand Down

0 comments on commit eaea6fa

Please sign in to comment.