콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2057 화면

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

아바타
취소
베스트 답변

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

아바타
취소

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>

작성자

What I'm actually inheriting is the

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

in product.template_procurement

관련 게시물 답글 화면 활동
4
10월 24
2623
1
7월 24
1137
2
12월 23
18299
1
2월 21
3021
1
7월 17
4303