I have scoured the Odoo 16 documentation and searched Google for answers to this.
All I've found are examples of altering/modifying/overriding existing "tree, form, kanban" views. Nothing I find shows creating a brand new view for a model while retaining the existing views.
The odoo documentation tutorial follows this process:
- Create Model
- Create Action and bind it to Model <--- what!?
- Create View for the Model
The problem with the Odoo architecture demonstrated above is that actions go to models instead of views -- which makes views and models tightly-coupled. It looks impossible to make lots of different views for a single model and link actions to those views. Is it impossible to make new views and use them from different actions?
My specific use case is that I want to expose the Contact model view a custom Tree View and Form View in a custom module, but I do NOT want to show the full Contact information with all fields. I want to show a very small subset of fields.
If anyone can show documentation or clear code that does this, I would greatly appreciate it.
Use
ir.actions.act_window.view
as indicated in Window Actions section:Example: