Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4297 Näkymät

I'm trying to create a customer dropdown field on a form. In addition to the ability to search a customer by name the users should be able to search a customer by their internal reference (field 'ref' in res.partner). This would be trivial in a search view by using

filter_domain="['|', ('name', 'ilike', self), ('ref', 'ilike', self)]"

as the filter_domain, but it seems that in the form view the filter_domain attribute of the xml field definition is ignored.

Is there any way around this other than overriding the name_search() method?

 

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
4
heinäk. 23
2573
1
helmik. 25
10719
1
maalisk. 21
7010
2
heinäk. 17
3939
1
syysk. 22
2953