Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I want to make a tree view that shows only records with certain client ids which are dynamically calculated by by function. I've tried to inject these ids as a domain by overriding fields_view_get() method however to no avail.
What is the proper way to achieve this?
If you want to search records on tree view dynamically on menu click
Solution 1 : you can can override search method of the model to hit the GOAL
Solution 2 : Set default filter on search view and the comparison value of default search filter you can evaluate using compute or functional field.
Solution 3: If you want to return tree view from any method with specific domain than you can go with Avinash Solution.
I hope this would give you some idea.
You can return the view from python like this
tree_view_ref = self.env.ref('module_name.tree_view_id', False)
You can Dynamically define the record_set variable. it can be a list of items.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/26/17, 5:31 AM|
|Seen: 261 times|
|Last updated: 11/22/17, 2:34 AM|