summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2017-09-13 17:34:27 +0200
committerYannick Tivisse <yti@odoo.com>2017-09-15 15:56:23 +0200
commitaf2620a443bcaa4c0815d01c7ac7086c9574ab61 (patch)
tree8f28462d6550f4f82ba02a37abbb108f85f51038 /addons/web/static/src/xml
parentd6355477601eb9fcd04d0c5ee7950bd84a92c664 (diff)
[IMP] web: reference field: add 'hide_model' option
It allows to see only records from a given model without allowing to change the model. It gives a better experience to users that choose records using a reference field when the model comes from some other choice and should not be changed.
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/base.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 87e61fe3c4e..446ff26c2df 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -813,7 +813,7 @@
</t>
<t t-name="FieldReference" t-extend="FieldMany2One">
<t t-jquery=".o_input_dropdown" t-operation="before">
- <select class="o_input o_field_widget">
+ <select t-att-class="'o_input o_field_widget' + (widget.nodeOptions.hide_model and ' hidden' or '')">
<option/>
<option t-foreach="widget.field.selection" t-as="model" t-att-value="model[0]"><t t-esc="model[1]"/></option>
</select>