fix: correct XPath selectors in HR department tree and search views

- Fixed tree view XPath from 'name' to 'display_name' (matches Odoo 14 standard)
- Fixed search view groupby filter position to use 'inactive' filter reference
- Ensures proper inheritance of hr.department views
- Resolves XML validation error during module upgrade

Files modified:
- odex25_hr/hr_base/views/hr_base_view.xml

Fixes XPath validation error in hr_department tree view inheritance
This commit is contained in:
Mohamed Eltayar 2025-11-13 14:58:29 +03:00
parent 6aad0c3752
commit 6a2a93e0f6
1 changed files with 3 additions and 2 deletions

View File

@ -601,7 +601,7 @@
<field name="model">hr.department</field>
<field name="inherit_id" ref="hr.view_department_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<xpath expr="//field[@name='display_name']" position="after">
<field name="branch_name" string="Branch" context="{'show_branch_short': True}"/>
</xpath>
</field>
@ -616,7 +616,8 @@
<xpath expr="//field[@name='name']" position="after">
<field name="branch_name" string="Branch" context="{'show_branch_short': True}"/>
</xpath>
<xpath expr="//group" position="inside">
<xpath expr="//filter[@name='inactive']" position="after">
<separator/>
<filter string="Branch" name="group_branch" context="{'group_by':'branch_name', 'show_branch_short': True}"/>
</xpath>
</field>