Hello
I need to restrict upload/create attachment from purchase order page in the state (purchase)
thank you in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello
I need to restrict upload/create attachment from purchase order page in the state (purchase)
thank you in advance
Hi Pablo,
Please try this way,
<record model="ir.ui.view" id="purchase_order_form_inherit">
<field name="name">purchase.order.form.inherit</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='attachment_ids']" position="attributes">
<attribute name="attrs">{'readonly': [('state', '=', 'purchase')]}</attribute>
</xpath>
</field>
</record>
you can change the state to required state in which you want to set the field readonly
Hope this helps,
Regards
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Oct 21
|
2533 | ||
|
2
Nov 17
|
6809 | ||
|
1
Apr 25
|
4417 | ||
|
2
Aug 24
|
9587 | ||
|
0
Dec 23
|
972 |