Welcome!

Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

Sign up

You need to be registered to interact with the community.
This question has been flagged
1 Reply
8 Views

Hey Cyllo community! Anyone got any good tips for inheriting form views? I'm struggling a bit and could use some pointers.

Avatar
Discard

Here's how you can use view inheritance in Odoo to extend or modify existing views. I'll cover both the 'extension' and 'primary' modes. View Inheritance: mode="extension" This is the default mode and allows you to extend an existing view without overriding it. You can have multiple extension views for a single primary view. product.category.view.form.inherit.your.module2 product.category extension 'inherit_id' specifies the view being extended, and the `xpath` expression determines where to add (`position="after"` in this example; other options include "before", "replace", "attributes"). View Inheritance: mode="primary" This mode lets you create a completely new primary view while still referencing an existing view's structure. Only one view can be primary per model and view type (e.g., form). product.category.view.form.your.module2 product.category primary

Avatar
Discard

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!