تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2576 أدوات العرض

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
ديسمبر 24
1215
4
أكتوبر 19
34061
1
أبريل 17
4016
2
مارس 15
7454
2
يناير 24
13986