콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
891 화면

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
546
2
6월 25
2471
1
6월 25
929
3
5월 25
2429
2
7월 25
1422