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

I'm trying to inherit views of buttons for specific group or multiple group and it is still not showing 

 in product.template.sale.order.button
 

and button in product.template_procurement

Avatar
Descartar
Best Answer

Hello Anton,


To Inherit the buttons and field from any view so you need to insure the correct view id which you inherited you need to also mention the correct module name  before the view id find out the steps for that


define the inherited view

//Code 1 in comment//


you can mention the correct module name with correct view id in the inherited view like


//Code 2 in comment//


The stock - is the module name

product_template_form_view_procurement_button - this is the view id


Give the xpath for to add the groups for the buttons and fields like you need to mention the correct name of the button and fields

//Code 3 in comment//


Hope this helps.

   

If you need any help in customization feel free to contact us.

       

Thanks & Regards,

Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

Avatar
Descartar

Code 1:

<record model="ir.ui.view" id="product_template_form_view_procurement_button_inherit">
<field name="name">product.template_procurement.form.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_update_quantity_on_hand']" position="attributes">
<attribute name="groups">module_name.group_id</attribute>
</xpath>
</field>
</record>

Code 2 :

<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>

Code 3:

<xpath expr="//button[@name='action_update_quantity_on_hand']" position="attributes">
<attribute name="groups">module_name.group_id</attribute>
</xpath>

@name='add the correct button name inside the xpath expr'
<attribute name="groups">here you can mention the correct module name with correct group id</attribute>

Autor

What I'm actually inheriting is the

<div name="button_box" position="inside">
<t groups="stock.group_stock_user">

in product.template_procurement

Related Posts Respostes Vistes Activitat
4
d’oct. 24
1840
1
de jul. 24
823
2
de des. 23
17681
1
de febr. 21
2541
1
de jul. 17
3826