Hello. I am trying to solve this for several days. We have a lot of sub-tasks in Sub-tasks tab in form view of project.task, so we want to dynamically filter this list by four particular tags. I want this filter setting to be saved at each task, so I have created toggle switch fields for each tag. here is my code for one of them:
Python:
tag1Visible = fields.Boolean('tag1Visible')
XML:
field name="tag1Visible" widget="boolean_toggle"/
Also I have managed to create duplicate of Sub-tasks tab without affecting it:
Python:
filteredSubtasks = fields.One2many('project.task', 'parent_id', store=True, copy=False)
XML:
field name="filteredSubtasks"
I have tried to add the domain to the field, like domain=[('tag_ids', 'in', 3 )]
which successfully filters out tasks with tag id=3
Now I want to make this domain to change dynamically depending on boolean toggle switches.
Can you help me finish the code?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
745
Widoki
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się