Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 20
3188
0
čvn 17
4188
0
dub 15
7850
1
čvc 22
6111
0
úno 25
18