コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2584 ビュー

For example I have menu named blank_loans_all in status.xml:

id="swiss_capital_collection_blank_loans_all"
parent="swiss_capital_collection_blank_loans"
action="swiss_capital_collection_tree_view_act_window"
groups="swiss_capital_collection.sw_group_collection_problems_head"/>

I want to set ir.rule to this menu for group problems_head . users from this group shouldn't be able to edit records in this menu(readonly)
any suggestions?

アバター
破棄
最善の回答

Hi

Try this code,

<record id="swiss_capital_collection_problems_head_rule" model="ir.rule">
            <field name="name">Restrict Editing for Problems Head</field>
            <field name="model_id" ref="model_id"/>
            <field name="groups" eval="[(4, ref('problems_head'))]"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_unlink" eval="False"/>
  </record>

Replace model_id with your actual model name. Upgrade your module to apply the changes.

Hope it helps

アバター
破棄
関連投稿 返信 ビュー 活動
0
12月 24
1242
4
10月 19
34066
1
4月 17
4020
2
3月 15
7459
2
1月 24
13990