Hi Odoo developers,
I have a model named 'TypeTask' which has a Char field called 'name_task'. This field represents the name of the task type (e.g call, meeting, visit, email, ...).
I have a menu associated with an action to open the form view of the TypeTask model This form only shows the field 'name_task'.
Then, I want that when the user is going to choose a value from this field in the form, new fields appear in the same form. These new fields depend on the task type chosen.
For instance, if the user chose the 'call' task type, the fields that should appear would be: 'telephone', 'day', 'hour', 'call duration', etc.
If the user chose the 'meeting' task type, the fields that should appear would be: 'place', 'assistants', etc.
I have implemented a model for each task type (model Call, model Meeting, model Visit, model Email). Each one inherits from the Task parent model.
Also, I have a different form view for each ot these models.
The expected behaviour would be that when the user had chosen the 'call' task type in the form, the form view of the Call model would be opened in the Task Type form adding all fields of the Call model.
How can I get this behaviour in the form mentioned above?.
Thanks in advance.
-----------------------------
Odoo: version 8
OS: Ubuntu 14.04
I can't comment your answer Robert because I don't have enough karma. Thanks for your answer @Robert. I thought the same as you, but I would rather have an abstract class Task and childs classes inheriting from Task for the different kinds of Tasks (subclass Call, subclass Meeting, etc) using _inherit in my model.py file. Each subclass should have its own form view and each view should be opened when the user choose a kind of Task from the form view of the TypeTask model. The key is how to load dinamically a form view of a model from the form view of other module.