Skip to Content
Menú
This question has been flagged
1 Respondre
871 Vistes

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de jul. 25
521
2
de juny 25
2420
1
de juny 25
893
3
de maig 25
2413
2
de jul. 25
1406