【问题标题】:Make a field readonly in edit mode and editable in create mode in openerp使字段在编辑模式下只读,在 openerp 的创建模式下可编辑
【发布时间】:2015-01-09 10:17:01
【问题描述】:

我想在 openerp 的编辑模式下将字段设为只读,在创建模式下可编辑。我想要一个在创建时指定值的字段,以后不应该更改它。

这是我的代码:

<field name = "apply_to_future" class="oe_edit_only"  attrs="{'readonly':[('status','=','Draft')]}" />

请帮忙。

【问题讨论】:

    标签: xml openerp-7


    【解决方案1】:

    试试这个:

    attrs="{'readonly':[('apply_to_future','!=',False)]}"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-20
      • 1970-01-01
      • 2012-12-18
      相关资源
      最近更新 更多