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

Hi everyone, i just want to ask on how to hide the edit and create buttons on a form view depending on a condition in odoo 10. I made a two menus with the same model, and I want to hide the edit and create buttons on the form of the records in one of the menus. Thank you very much. Hoping for your response. 

アバター
破棄
最善の回答

Hi

You can create record rules, and add the condition inside the Domain 

Please try like this example 


<record id="portal_sale_order_user_rule" model="ir.rule">
<field name="name">Portal Personal Quotations/Sales Orders</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="domain_force">[('message_partner_ids','child_of',[user.commercial_partner_id.id])]</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
<field eval="0" name="perm_unlink"/>
<field eval="0" name="perm_write"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
</record>

Hope this help

Regards

アバター
破棄
著作者

Thank you very much for this Bella James.

関連投稿 返信 ビュー 活動
2
7月 25
493
0
12月 24
1099
2
10月 24
1202
1
8月 24
2359
2
7月 24
1606