Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
6300 Представления

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.

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить

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

Related Posts Ответы Просмотры Активность
0
авг. 24
9026
0
мар. 15
4813
0
мар. 15
4428
2
апр. 23
2840
2
февр. 25
40558