summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-09-19 13:05:04 +0200
committerChristophe Simonis <chs@odoo.com>2017-09-19 13:05:04 +0200
commit08db385d02dd67f82937e4325179dda1a82519b7 (patch)
tree9d1be20b01650218fefa38ec3ecae9a708fa0cf3 /addons/web/static/src/js/fields/basic_fields.js
parent071b46c22786d9b0b7d1ef46387907cbfeb8980b (diff)
parentd15a31ae6d944cf04f9da8752b069b221cac0d9a (diff)
[MERGE] forward port branch saas-18 up to d15a31ae6d9
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js21
1 files changed, 15 insertions, 6 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index da7def82dd2..7e6a330120e 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -1741,10 +1741,9 @@ var FieldPercentPie = AbstractField.extend({
});
/**
- * FieldProgressBar
- * parameters
- * - title: title of the bar, displayed on top of the bar
- * options
+ * Node options:
+ *
+ * - title: title of the bar, displayed on top of the bar options
* - editable: boolean if value is editable
* - current_value: get the current_value from the field that must be present in the view
* - max_value: get the max_value from the field that must be present in the view
@@ -2099,8 +2098,9 @@ var FieldDomain = AbstractField.extend({
"click .o_field_domain_dialog_button": "_onDialogEditButtonClick",
}),
custom_events: _.extend({}, AbstractField.prototype.custom_events, {
- "domain_changed": "_onDomainSelectorValueChange",
- "domain_selected": "_onDomainSelectorDialogValueChange",
+ domain_changed: "_onDomainSelectorValueChange",
+ domain_selected: "_onDomainSelectorDialogValueChange",
+ open_record: "_onOpenRecord",
}),
/**
* @constructor
@@ -2281,6 +2281,15 @@ var FieldDomain = AbstractField.extend({
_onDomainSelectorDialogValueChange: function (e) {
this._setValue(Domain.prototype.arrayToString(e.data.domain));
},
+ /**
+ * Stops the propagation of the 'open_record' event, as we don't want the
+ * user to be able to open records from the list opened in a dialog.
+ *
+ * @param {OdooEvent} event
+ */
+ _onOpenRecord: function (event) {
+ event.stopPropagation();
+ },
});
/**