fix: Use name attribute instead of string in xpath selector for Other Details group

- Add name='other_details_group' to Other Details group in purchase_requisition_custom
- Update xpath selector in purchase_custom_stock to use @name instead of @string
- Fix Odoo validation error for view inheritance
- Ensure proper xpath selector compatibility with Odoo standards
This commit is contained in:
maltayyar2 2025-11-20 23:18:34 +03:00
parent 4044b5e57a
commit 3c6801e1e5
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@
<xpath expr="//field[@name='use_analytic']" position="attributes"> <xpath expr="//field[@name='use_analytic']" position="attributes">
<attribute name="attrs">{'readonly':[('state','!=','draft')]}</attribute> <attribute name="attrs">{'readonly':[('state','!=','draft')]}</attribute>
</xpath> </xpath>
<xpath expr="//group[@string='Other Details']" position="after"> <xpath expr="//group[@name='other_details_group']" position="after">
<group string="Warehouse Management" name="warehouse_management_group"> <group string="Warehouse Management" name="warehouse_management_group">
<field name="view_location_id" invisible="1"/> <field name="view_location_id" invisible="1"/>
<field name="edit_locations" invisible="1"/> <field name="edit_locations" invisible="1"/>

View File

@ -89,7 +89,7 @@
attrs="{'readonly':['|',('edit_partner_id' , '=' , False),('state' , '!=' , 'waiting')]}" attrs="{'readonly':['|',('edit_partner_id' , '=' , False),('state' , '!=' , 'waiting')]}"
help="Suggested vendor for this purchase request"/> help="Suggested vendor for this purchase request"/>
</group> </group>
<group string="Other Details"> <group string="Other Details" name="other_details_group">
<field name="use_analytic"/> <field name="use_analytic"/>
<field name="account_analytic_id" <field name="account_analytic_id"
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}" options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"