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

For each of my projects within my projects app (project.project) I want to have a different layout of fields for my task object (project.task). For example, Project A will only show fields x, y, z while Project B will show fields a, b, c. There are enough changes that toggling fields conditionally in the same xml view is not good enough. 

I have defined a second xml view, project.task.form2, and a new window action, project x task, that calls this view. However, I cannot find a way to change my action based on project. When I edit the action for one project, Odoo changes all actions for the project model.

How can I have a separate window action for each project in the project app? Same question asked in an alternative manner, how can I apply a different Task view for each project?

I am using version 12.

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

Multiple form and tree views: https://goo.gl/Vpb2Fv

Найкраща відповідь

Hi Alex: Another way of achieving this would be to define different group elements (one for each task specific layout) in the same view and place the set of fields applicable to each task inside the task specific group. You can then do the toggling at the group level instead of the field level. If required, the same field can appear in multiple groups.

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

Thank you! This indeed helped a lot. I ended up creating additional xml view sheets, as the level of customization kept increasing, but this answer works!

Найкраща відповідь

kres hgds jytdjhgjmnhgjm

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
бер. 24
4787
1
лип. 19
5711
2
лист. 16
8083
1
черв. 23
3417
1
лист. 22
3724