Pular para o conteúdo
Menu
Esta pergunta foi sinalizada

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
dez. 20
3138
0
jun. 17
4116
0
abr. 15
7785
1
jul. 22
6067
0
fev. 25
18