Skip to Content
Menu
This question has been flagged
1 Reply
1262 Views

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
Discard
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
Discard

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>

Author

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 Replies Views Activity
4
Oct 24
1578
1
Jul 24
740
2
Dec 23
17531
1
Feb 21
2460
1
Jul 17
3717