sfx
sfx

Reputation: 1841

Odoo How make entire form readonly when it moves to 'Quotaion Sent' State using xpath?

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

Answers (1)

Gopakumar N G
Gopakumar N G

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

Related Questions