跳至內容
選單
此問題已被標幟
1 回覆
3829 瀏覽次數

How can I give to a field that exists in product a new user group?

For example in a new view or in an existing view without modifie the normal standard product module.

thx

頭像
捨棄
最佳答案

hello wizardz,

You have inherit the existing view using xpath and add possition as attributes and give the group to that field.

for example here group is give on button likeweise you can give it to your field.

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

        <field name="name">invoice_form inherit</field>           

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

        <field name="inherit_id" ref="account.invoice_form"/>           

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

        <xpath expr="//form/header/button[@name='invoice_print']" position="attributes">                   

                        <attribute name="groups">base.group_system</attribute>       

        </xpath>           

        </field>       

</record>

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
1月 17
2890
1
1月 17
3105
0
8月 16
2967
2
9月 22
3941
0
3月 19
2665