I have created a model which one field is "Many2one" type, and its co-model is "res.users":
to_approve_by = fields.Many2one(comodel_name='res.users', string='To Approve by')
On the form view for this model. I want the selection widget of this field only list the 'res.users' in one certain group, such as "Project / Manager".
So, how to editor the code to realize it?
Are there someone give me a sample code or some advice?
Thanks.
use domain filter for the field
An idea: https://learnopenerp.blogspot.com/2020/09/domain-filter-many2one-field-odoo13.html