Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2054 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona

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>

Autore

What I'm actually inheriting is the

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

in product.template_procurement

Post correlati Risposte Visualizzazioni Attività
4
ott 24
2623
1
lug 24
1136
2
dic 23
18299
1
feb 21
3020
1
lug 17
4300