Hello
I need to restrict upload/create attachment from purchase order page in the state (purchase)
thank you in advance
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
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
0
okt. 21
|
4524 | |||
|
2
nov. 17
|
9048 | |||
|
1
apr. 25
|
6943 | |||
|
2
aug. 24
|
13605 | |||
|
0
dec. 23
|
2493 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.