Skip to content
Snippets Groups Projects
Commit 7bf25cc3 authored by Lucas Perais (lpe)'s avatar Lucas Perais (lpe)
Browse files

[FIX] web: search view handles JSON parsable domains


Before this commit, a domain that had been written in order to be
JSON parsable, would trigger a JS crash when activated in the UI
It happens when adding custom filters through the edition of the search view with studio

This was because, Odoo developers write, in the XML of a search view
domains python style: `[('field', '=', 'value')]`
When parsing the view in JS, this doesn't get altered by `xml_to_json`
Then, the search view code evaluates it python style
This commit considers that behavior fortunate, but not really clear or conceptually correct

But, when customizing a search view with studio, the domain is written by the code, in JS
JSON parsable format `[["field", "=", "value"]]`

This should be supported too, as so many customizations may have been done before hand

After this commit, both expressions are supported by the filters menu

OPW 1957297, 1960732, 1965649 (at least)

closes odoo/odoo#32690

Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
parent 6a57ad66
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment