跳至内容
菜单
此问题已终结
2 回复
15955 查看

Hi

How can define for example: modifiers="{'readonly': [['state', 'not in, ['draft']]]}" for some fields from interface?

Thanks

形象
丢弃

Cant get you.?

can you give more details, what exactly you want to do?

最佳答案

You can define it on field in xml like this:

<field name="your_field" attrs="{'readonly': [['state', 'not in, ['draft']]]}"/>

形象
丢弃
最佳答案

From the interface, you can enter developper mode (upper right corner drop down uder the user name - must be admin, abot odoo, clieck on developper mode) then edit the view - good for testing. The issue with this approach is that when the module is updated your modification will disappear. 

If you want to go further search the documentations for view inheritance.

形象
丢弃