summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form_common.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-07-01 14:38:16 +0200
committerAaron Bohy <aab@odoo.com>2015-07-01 15:27:53 +0200
commitc5f3debc3299cf0c25ba948d04abff4a659b0d6e (patch)
tree0cc276f47d68a9539fb931b96ae8d6a018828c5f /addons/web/static/src/js/views/form_common.js
parent1b660c895a8673ea9446f19a8bb249638bfc3db6 (diff)
[FIX] web: FormViewDialog: multi select option
Before this rev., the multi_select option wasn't enabled even by setting disable_multiple_selection to false in the options, when the res_id key wasn't defined in options (null != undefined). It was the case for every X2Many views, except for the Many2ManyKanban view as we explicitely set the disable_multiple_selection to false AND res_id to null. However, all X2Many views should enable this option.
Diffstat (limited to 'addons/web/static/src/js/views/form_common.js')
-rw-r--r--addons/web/static/src/js/views/form_common.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/form_common.js b/addons/web/static/src/js/views/form_common.js
index 5f449c2540e..cd6d061919f 100644
--- a/addons/web/static/src/js/views/form_common.js
+++ b/addons/web/static/src/js/views/form_common.js
@@ -841,8 +841,8 @@ var FormViewDialog = ViewDialog.extend({
init: function(parent, options) {
var self = this;
- var multi_select = options.res_id === null && ! options.disable_multiple_selection;
- var readonly = options.res_id !== null && options.readonly;
+ var multi_select = !_.isNumber(options.res_id) && !options.disable_multiple_selection;
+ var readonly = _.isNumber(options.res_id) && options.readonly;
if(!options || !options.buttons) {
options = options || {};