mirror of https://github.com/OCA/web.git
commit
408a3bc080
|
@ -1,3 +1,8 @@
|
||||||
|
.. warning::
|
||||||
|
This module is deprecated.
|
||||||
|
If you want to use this functionality you can assign a unserialised
|
||||||
|
domain to a fields.Binary, `example <https://github.com/OCA/OCB/blob/16.0/addons/account/models/account_tax.py#L1308>`_
|
||||||
|
|
||||||
This technical addon allows developers to specify a field domain in a view
|
This technical addon allows developers to specify a field domain in a view
|
||||||
using the value of another field in that view, rather than as a static
|
using the value of another field in that view, rather than as a static
|
||||||
XML attribute.
|
XML attribute.
|
||||||
|
|
|
@ -153,10 +153,18 @@ odoo.define('web.domain_field', function (require) {
|
||||||
if (_.isString(domain)) {
|
if (_.isString(domain)) {
|
||||||
// Modified part or the original method
|
// Modified part or the original method
|
||||||
if (domain in evaluation_context) {
|
if (domain in evaluation_context) {
|
||||||
result_domain.push.apply(
|
var fail_parse_domain = false;
|
||||||
result_domain, $.parseJSON(evaluation_context[domain]));
|
try {
|
||||||
|
var domain_parse = $.parseJSON(evaluation_context[domain]);
|
||||||
|
console.warn("`web_domain_field is deprecated. If you want to use this functionality you can assign a unserialised domain to a fields.Binary");
|
||||||
|
} catch (e) {
|
||||||
|
fail_parse_domain = true;
|
||||||
|
}
|
||||||
|
if (!fail_parse_domain) {
|
||||||
|
result_domain.push.apply(result_domain, domain_parse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// End of modifications
|
// End of modifications
|
||||||
|
|
||||||
// wrap raw strings in domain
|
// wrap raw strings in domain
|
||||||
|
|
Loading…
Reference in New Issue