Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
23671 Lượt xem
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

first activate developer mode and get external id of view .. an then inherit and add this attribute
<record id="new_form_id" model="ir.ui.view">
            <field name="name">Your New Form Name</field>
            <field name="model">model.name</field>
            <field name="inherit_id" ref="view_external_id"/>
            <field name="arch" type="xml">
                <xpath expr="//tree" position="attributes">
                    <attribute name="create">false</attribute>
                </xpath>
            </field>
        </record>

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

thx  you  for answer  but    i want hide  creat button in  users  modules  where is  path  file ?

Ảnh đại diện
Huỷ bỏ

first activate developer mode and get external id of view .. an then inherit and add this attribute

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

<field name="name">Your New Form Name</field>

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

<field name="inherit_id" ref="view_external_id"/>

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

<xpath expr="//tree" position="attributes">

<attribute name="create">false</attribute>

</xpath>

</field>

</record>

Câu trả lời hay nhất

Hi ahmedrabie,

(Applicable For all user Group)

if you do not want create button in tree view, You can try by giving "create"="false" in tree view

example: <tree create="false">

                   </tree>

If You Want to restrict base on user group then,

you can give only read permission for the perticular Object, for specified group in "ir.model.access.csv" file, or

Settings->Groups->(group_name)->Access rights

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Ahmedrabie,

If you want to remove the create button for a particular user, remove the create access rights of that particular class object.

If you want to remove create button completely for that particular screen, add the following in the tree view

<tree string="Sample" create="false">

 

Ảnh đại diện
Huỷ bỏ