I have two models like
class BsService(models.Model):
_name = 'bs.service'
....
users = fields.Many2one('res.users', string="Users", readonly=True)
....
....
class BsSaleOrder(models.Model):
_name = 'bs.sale.order'
service_id = fields.Many2one('bs.service', string='Service', required=True)
service_user = fields.Many2one('res.users', string='Service User')
...
...
Now, In BsSaleOrder View, I want to show only those users are related to a selected service. If user not found in the selected service, all res.users would be shown.
You said: "You want to show show only those users are related to a selected service."
In your code , you use:
users = fields.Many2one('res.users', string="Users", readonly=True)
That's mean only one user will be linked to each service.
In BsSaleOrder, you can use domain to filter the users depend on users field in BsService module.