Skip to content

Commit

Permalink
Update context and domain filters to use active_id
Browse files Browse the repository at this point in the history
Refactored the context and domain in maintenance plan views to use `active_id` instead of `id`.
  • Loading branch information
hafizhlf committed Sep 9, 2024
1 parent dee55f0 commit 9da746b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions maintenance_plan/views/maintenance_plan_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<field name="binding_model_id" ref="model_maintenance_plan" />
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
<field name="context">{
'default_maintenance_plan_id': id,
'default_maintenance_plan_id': active_id,
}</field>
<field name="domain">[('maintenance_plan_id', '=', id)]</field>
<field name="domain">[('maintenance_plan_id', '=', active_id)]</field>
</record>
<record id="maintenance_plan_view_form" model="ir.ui.view">
<field name="name">maintenance.plan.form</field>
Expand Down Expand Up @@ -188,10 +188,10 @@
<field name="view_mode">tree,form</field>
<field name="view_id" ref="maintenance_plan_view_tree" />
<field name="context">{
'default_equipment_id': id, 'hide_equipment_id': 0
'default_equipment_id': active_id, 'hide_equipment_id': 0
}</field>
<field name="domain">['|', ('active', '=', True), ('active', '=',
False), ('search_equipment_id', '=', id)]
False), ('search_equipment_id', '=', active_id)]
</field>
</record>
<menuitem
Expand Down

0 comments on commit 9da746b

Please sign in to comment.