【发布时间】:2015-01-09 10:17:01
【问题描述】:
我想在 openerp 的编辑模式下将字段设为只读,在创建模式下可编辑。我想要一个在创建时指定值的字段,以后不应该更改它。
这是我的代码:
<field name = "apply_to_future" class="oe_edit_only" attrs="{'readonly':[('status','=','Draft')]}" />
请帮忙。
【问题讨论】:
我想在 openerp 的编辑模式下将字段设为只读,在创建模式下可编辑。我想要一个在创建时指定值的字段,以后不应该更改它。
这是我的代码:
<field name = "apply_to_future" class="oe_edit_only" attrs="{'readonly':[('status','=','Draft')]}" />
请帮忙。
【问题讨论】:
试试这个:
attrs="{'readonly':[('apply_to_future','!=',False)]}"
【讨论】: