I have created a module that inherits the "sale" module. I would now like to create a view in my new module that will inherit the "view_order_form" view from the "sale" module. In fact I want to be able to use this view when I access my module.
A bit like when you want to create a view with the CRM module and you are redirected to the "dirty" module. Thank you for your help.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Oh I see, thanks a lot!
Hi,
Are you looking to inherit and create new view or modify existing view only ? If you modify existing view, it will be reflected in its original place as well in the other place where it has been used.
Suppose if you need to inherit and create a new view without affecting in its original view, you can set the mode as primary for the inherited view.
Sample:
<record id="mrp_product_template_search_view" model="ir.ui.view">
<field name="name">mrp.product.template.searchfield>
<field name="model">product.templatefield>
<field name="mode">primaryfield>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='consumable']" position="after">
<separator/>
<filter string="Manufactured Products" name="manufactured_products" domain="[('bom_ids', '!=', False)]"/>
<filter string="BoM Components" name="components" domain="[('bom_line_ids', '!=', False)]"/>
xpath>
field>
record>
Then the created view, can be specified in the action in view_ids.
To inherit and modify any existing view, see: https://www.youtube.com/watch?v=46yecsKX2tw
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up