Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3778 Переглядів

hi all,

i'm trying to hide product-->Notes tab in my inherited module, tab is getting hide but the problem is it getting hidden in main product module tab also.

It should not getting hidden in main product module. Am using odoo9

Code used in xml is:

<record id="partner_primary_vehicle_product_view" model="ir.ui.view">
<field name="name">Vehicle Product</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<!--field name="mode">primary</field-->
<field name="arch" type="xml">
<xpath expr="//notebook/page[5]" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
</field>
</record>


Can we make tab should be visible in base product and the tab should hide in inherited product?


Аватар
Відмінити
Найкраща відповідь

You need to extend the views for product.product and product.template, search for the form views of both models

Аватар
Відмінити
Автор

thank you axel, how to extend?

extend or inherit, for me is the same, like you do for the view posted, but need to do it for both module views

Автор

like you are telling to write xpath for inherited module?

no, view inheritance with xpaths for the views of product.product and product.template. Actually you are doing it just for product.template

Автор

oh ok ok, i will try thank you axel