How can i inherit this part of product.template_procurement view form?
I just want to add another group.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How can i inherit this part of product.template_procurement view form?
I just want to add another group.
Hi,
Please try this below code.
<xpath expr="//div[@name='button_box']/t[@groups='stock.group_stock_user']" position="attributes">
<attribute name="groups">stock.group_stock_user,new_group.group_users</attribute>
<xpath>
Very much thanks for this!
Hi,
By inheriting the view using the actual external ID of the view you want to inherit and use xpath to add any div or t inside a view at a specific position.
For example refer the following code:
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_product_template_
<field name="name">product.template.
<field name="model">product.template.
<field name="inherit_id" ref="product.product_template_
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box'
<t groups="stock.group_stock_
<field name="tracking" invisible="1"/>
<!-- New group you want to add -->
<group>
<field name="your_field_name"/>
</group>
</t>
</xpath>
</field>
</record>
</odoo>
Hope it helps.
It didn't work.
What i want is to inherit the whole button boxes. Which is div. I tried to add the group in product.template_procurement (withouth inheriting) <t groups="stock.group_stock_user, new_group.group_users">, and it did work. That is why i want to inherit the whole div.
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
4
thg 3 24
|
3362 | ||
|
1
thg 10 23
|
5329 | ||
|
1
thg 6 22
|
6564 | ||
How to inherits only one fields
Đã xử lý
|
|
4
thg 6 21
|
15845 | |
|
2
thg 8 17
|
12628 |