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.
Here, domain="[('deprecated', '=', False)] means it will display only those records for which deprecated(field name) is false(field value).
Generally Domain is used to filter data based on conditions.
You can get reference from here : https://www.odoo.com/documentation/10.0/reference/orm.html#domains
There are two types of domain in odoo, the first one is inline domain and the other is functional domain. The purpose of both domain is to filter records in many2one fields.
Above code means i want to show only those department which are academic.
#do some logic for getting ids
return [('id','in',[your ids goes here])]
department_id = fields.Many2one('department.model','Department',domain=semester_domain)
Hope I helped you. For scratch and business development in Odoo visit: https://goo.gl/8HgnCF
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: 11/11/16, 1:08 AM|
|Seen: 645 times|
|Last updated: 3/16/18, 8:19 AM|