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

Hi,


I want to avoid that some users could create new taks in odoo, so I'm creating a module where trying to hide the new button to a specific group but it doesn't found with xpath. Do you know how is called "new" button in Odoo? New, Create? That is my code:


<?xml version='1.0' encoding='utf-8'?>

<odoo>

        <record id="project_task_hide_task" model="ir.ui.view">

            <field name="model">project.task</field>

            <field name="inherit_id" ref="project.view_task_tree2"/>

            <field name="arch" type="xml">

                <xpath expr="//button[@name='create']" position="attributes">

                    <attribute name="groups">Administrator</attribute>

                </xpath>

            </field>

        </record>       

</odoo>


Thank you


Regards

アバター
破棄
最善の回答

Just remove the CREATE permission for that Group:

See https://www.odoo.com/documentation/18.0/applications/general/users/access_rights.html

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 25
514
2
6月 25
2419
1
6月 25
884
3
5月 25
2409
2
7月 25
1401