Hello,
I added a domain to a many2many relationship in calendar_events.py:
partner_ids = fields.Many2many(
'res.partner', 'calendar_event_res_partner_rel',
string='Attendees', default=_default_partners,
domain=[("employee", "=", True)])
(see Github for full context)
I would expect this to only find partners with employee = True.
But the domain seems to be ignored in all the views (e.g. calender_events.xml where partner_ids is referenced)
I made sure that I edited the right relationship by changing the name to "Attendees Test" and THAT change was reflected in the views I wanted - the domain not.
What am I getting wrong here?
Thank you
Sebastian
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
This question has been flagged
1
Reply
737
Views
Hello @sebels
domain is ignored because of this default=_default_partners, or you can include that employee domain in _default_partners method.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up