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

I need some assistance to know what alternative can be used to return a many2one field domain within a method with the api.onchange decorator, and avoid the warning: onchange method 'any_method_name' returned a domain, this is deprecated.


I know about the existence of the web_domain_field module, but I would like to know if there is any alternative using odoo's own functionalities.


Thank you very much in advance.

Avatar
Annuleer
Beste antwoord

Hi,

Returning of domain from onchange function is not  astable solution , once the domain get set from onchange, if you refresh or save the record the domain will get lost,  ie, the  scope  of  the  domain  is  very  limited  here.


That's why the option has been removed from the v14, the web domain field is a stable solution that developers can trust.

Thanks

Avatar
Annuleer

Hi Niyas, how to use the web domain field for this solution?

Gerelateerde posts Antwoorden Weergaven Activiteit
0
aug. 24
8983
0
mrt. 15
4799
0
mrt. 15
4364
2
apr. 23
2742
2
feb. 25
40427