Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

want to make form readonly based on condition

形象
odoo
形象
丢弃
2 答案
0
形象
odoo
最佳答案
ADD ATTR READONLY TO YOUR XML FILE


<sheet>

    <field name="state"/>

    <field name="fields" attrs="{'readonly': [('state', '!=', 'nil')]}"/>

</sheet>


形象
丢弃
0
形象
odoo
最佳答案

Hi,
You have to add readonly condition to every node/fields in the form, you cannot generically add it to sheet tag.

Either you can apply to all fields directly or using python methods, you can do it.


Thanks

1 备注
形象
丢弃
形象
odoo
-

yes bro, This worked