Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd

Hi Odoo Community,


I’m working on Odoo v18 and trying to apply a custom domain to the partner_ids field inside the calendar view. However, the widget in use is many2manyattendeeexpandable and it seems to ignore the usual XML domain definitions.


Here’s what I tried so far inside my XML:

<field name="partner_ids"
       domain="[('employee_ids', '!=', False)]"
       context="{'domain': [('employee_ids', '!=', False)]}"
       options="{'block': True, 'icon': 'fa fa-users', 'domain': [('employee_ids', '!=', False)]}"
       filters="1"
       widget="many2manyattendeeexpandable"
       write_model="calendar.filters"
       write_field="partner_id"
       filter_field="partner_checked"
       avatar_field="avatar_128"/>

I also tried updating the domain in the model itself by extending partner_ids via Python, but the widget still ignores it.


It looks like this widget bypasses the domain and does a direct name_search RPC to res.partner, but none of the XML domain or options.domain seem to affect it.


Has anyone successfully limited the selectable partners in calendar attendee fields to a subset (e.g., only partners where employee_ids != False)?


Is there a clean way to hook into many2manyattendeeexpandable and inject a domain, or do I need to override the widget logic in JS entirely? If so did anyone already did that?


Thanks in advance for your help!

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
dec. 20
3158
0
jun. 17
4141
0
apr. 15
7807
1
jul. 22
6087
0
feb. 25
18