【问题标题】:Enable options field inherit in Odoo 8在 Odoo 8 中启用选项字段继承
【发布时间】:2015-10-13 07:47:08
【问题描述】:

我有一个字段继承,我想添加一个属性,但有条件。选项 no_create if 是一个组 X。任何类似于:

<field name="state_id" position="attributes">                       
    <attribute name="options">{'no_create': [('groups', '==', 'X')]}</attribute>
</field>

我尝试了不同的方法(==,=),但没有。

【问题讨论】:

    标签: xml inheritance conditional odoo openerp-8


    【解决方案1】:

    看看这个。

    hiding create button from treeview

    您可以更改我在答案中给出的 sn-p,以检查用户的组,而不是上下文中的参数

    【讨论】:

    • 感谢 Alessandro,终于可以省去其他解决方案了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-14
    • 1970-01-01
    • 2023-01-18
    相关资源
    最近更新 更多