Reputation: 1841
I have inherited the Sale order form in my custom module. How make entire form readonly when it moves to 'Quotaion Sent' State using xpath?
Upvotes: 3
Views: 1772
Reputation: 1843
On your inherited form view
you can make any field or group read-only by using xpath
as follows.
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="attrs">{'readonly': [('state','=','sent')]}</attribute>
</xpath>
Upvotes: 4