I made a new module named "sites" and then added it to sale order line.
now I made another module "job_order" and "job_order_line", job_order has sale.order and job_order_line contain sites now i want to apply domain on sites (the one present in master SO but not already selected in job order line i.e self) when i return domain in on change function it is working fine but when customer edits previously added site domain doesn't apply because no on change is executed is there any way i can apply default domain i.e in fields.Many2one(site.site', domain= ?..
return {'domain': {'name': [('id', 'in', (self.order_id.order_id.order_line.mapped('site_id') - self.order_id.line_id.mapped('name')).ids)]}}
self(job order line)
order_id (Job order master)
order_id (Sale order)
order_line( sale order line).mapped('site_id')
self(job order line).
order_id(job order).
line_id(job order line).mapped('name')(site_ids)