Files
gzth/approvals_purchase/views/approval_category_views.xml
T
2025-11-12 18:23:27 +08:00

22 lines
1.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="approval_purchase_category_view_form_inherit" model="ir.ui.view">
<field name="name">approval.purchase.category.view.form.inherit</field>
<field name="model">approval.category</field>
<field name="inherit_id" ref="approvals.approval_category_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='approval_type']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
<xpath expr="//field[@name='has_quantity']" position="attributes">
<attribute name="readonly">approval_type == 'purchase'</attribute>
<attribute name="force_save">1</attribute>
</xpath>
<xpath expr="//field[@name='has_product']" position="attributes">
<attribute name="readonly">approval_type == 'purchase'</attribute>
<attribute name="force_save">1</attribute>
</xpath>
</field>
</record>
</odoo>