Skip to content

Commit bb13585

Browse files
author
John75SunCity
committed
fix: Replace mode='tree' with mode='list' in all One2many/Many2many fields for Odoo 18/19 compatibility
- Fixed 9 One2many/Many2many fields using deprecated mode='tree' - Changed to mode='list' to match Odoo 18/19 view registry naming - Resolves: OwlError - Cannot find key 'tree' in the 'views' registry - Affected files: records_container_views.xml, load_views.xml, customer_inventory_report_views.xml, and 5 others Fixes KeyNotFoundError when clicking 'New' button in Records Management Dashboard
1 parent fbcf083 commit bb13585

9 files changed

+9
-929
lines changed

records_management/security/ir.model.access.csv.with_duplicates

Lines changed: 0 additions & 920 deletions
This file was deleted.

records_management/views/chain_of_custody_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
</group>
6060
<notebook>
6161
<page string="Events">
62-
<field name="custody_event_ids" mode="tree,form" />
62+
<field name="custody_event_ids" mode="list,form" />
6363
</page>
6464
<page string="Notes">
6565
<field name="notes" widget="text" />

records_management/views/customer_inventory_report_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</group>
5252
<notebook>
5353
<page string="Report Lines" name="lines">
54-
<field name="line_ids" mode="tree,form">
54+
<field name="line_ids" mode="list,form">
5555
<list editable="bottom">
5656
<field name="container_id" />
5757
<field name="document_count" />

records_management/views/load_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
</group>
172172
<notebook>
173173
<page string="Load Items" name="load_items">
174-
<field name="bale_ids" mode="tree,kanban">
174+
<field name="bale_ids" mode="list,kanban">
175175
<list string="Paper Bales" editable="bottom">
176176
<field name="bale_number" />
177177
<field name="weight" sum="Total Weight" />

records_management/views/maintenance_equipment_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<xpath expr="//sheet" position="inside">
3939
<notebook>
4040
<page string="Destruction History" invisible="equipment_category != 'shredding'">
41-
<field name="destruction_service_ids" mode="tree">
41+
<field name="destruction_service_ids" mode="list">
4242
<list>
4343
<field name="service_date"/>
4444
<field name="total_weight"/>

records_management/views/records_container_views.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Destroy Container</a>
266266

267267
<notebook>
268268
<page string="Documents" name="documents">
269-
<field name="document_ids" mode="tree,form" context="{'default_container_id': id}">
269+
<field name="document_ids" mode="list,form" context="{'default_container_id': id}">
270270
<list string="Documents">
271271
<field name="name"/>
272272
<field name="document_type_id"/>
@@ -284,7 +284,7 @@ Destroy Container</a>
284284
</field>
285285
</page>
286286
<page string="Movement History" name="movements">
287-
<field name="movement_ids" mode="tree"/>
287+
<field name="movement_ids" mode="list"/>
288288
</page>
289289
</notebook>
290290
</sheet>

records_management/views/records_department_billing_contact_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
<notebook>
7171
<page string="Approval History" name="approvals">
72-
<field name="approval_history_ids" mode="tree">
72+
<field name="approval_history_ids" mode="list">
7373
<list>
7474
<field name="approval_date"/>
7575
<field name="charge_amount"/>

records_management/views/records_location_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
</group>
136136
<notebook>
137137
<page name="containers" string="Stored Containers">
138-
<field name="container_ids" mode="tree">
138+
<field name="container_ids" mode="list">
139139
<list>
140140
<field name="name" />
141141
<field name="partner_id" />

records_management/views/records_retrieval_order_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
</group>
9191
<notebook>
9292
<page string="Lines" name="lines">
93-
<field name="line_ids" context="{'default_order_id': id}" mode="tree,form" colspan="4">
93+
<field name="line_ids" context="{'default_order_id': id}" mode="list,form" colspan="4">
9494
<list editable="bottom" decoration-success="status in ['delivered','completed']" decoration-danger="status == 'not_found'" decoration-warning="status == 'pending'">
9595
<field name="name" />
9696
<field name="item_type" />

0 commit comments

Comments
 (0)