diff options
| author | Jinal Patel <jip@odoo.com> | 2019-08-09 05:09:01 +0000 |
|---|---|---|
| committer | Jinal Patel <jip@odoo.com> | 2019-08-09 12:32:27 +0000 |
| commit | f0fdfbf44e1db97f9d9b1425be81b53138c01bd6 (patch) | |
| tree | 920e6450e622108e28db2a907db376bd5ad41531 /addons/web/static/src/xml/base.xml | |
| parent | a72b23f6b5fbcf637d5de16f9f05ba00552cc186 (diff) | |
[FIX] web: add support for TRUE_LEAF and FALSE_LEAF in ModelFieldSelector
before this commit, domain selector widget does not support
TRUE_LEAF and FALSE_LEAF i.e. [(1, '=', 1)] and [(0, '=', 1)] respectively,
the reason is the chain part of the domain i.e. field name has value 1/0 and
we don't have field name like 1 and 0 in domain and hence ModelFieldSelector
don't accept it
after this commit, domain selector can handle this special two domains which is
[(1, '=', 1)] and [(0, '=', 1)], add support for chain with 1/0 in ModelFieldSelector
task- 1998145
closes odoo/odoo#35603
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index c925809fab5..062571646b6 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -767,8 +767,16 @@ <i class="fa fa-chevron-right" role="img" aria-label="Followed by" title="Followed by"/> </t> <span class="o_field_selector_chain_part"> - <t t-set="fieldInfo" t-value="_.findWhere(pages[fieldName_index], {'name': fieldName})"/> - <t t-esc="fieldInfo && fieldInfo.string || '?'"/> + <t t-if="fieldName === '1'"> + <t t-esc="fieldName"/> + </t> + <t t-elif="fieldName === '0'"> + <t t-esc="fieldName"/> + </t> + <t t-else=""> + <t t-set="fieldInfo" t-value="_.findWhere(pages[fieldName_index], {'name': fieldName})"/> + <t t-esc="fieldInfo && fieldInfo.string || '?'"/> + </t> </span> </t> </t> |
