From f1a85ba70a2412fb0d7bf789a758d8f2d2e86a02 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 18 Sep 2017 10:03:51 +0200 Subject: [FIX] *: fix a bunch of incorrectly documented docstring Fix a bunch of ill-documented/incomplete/incorrect method docs Without this, the automatic doc generation does not work. --- addons/web/static/src/js/fields/basic_fields.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'addons/web/static/src/js/fields/basic_fields.js') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index da7def82dd2..5681be3262a 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 -- cgit v1.2.3 From de48daf53adc922da6b2ff4ef794e37b0b7cd835 Mon Sep 17 00:00:00 2001 From: Pratima Gupta Date: Thu, 17 Aug 2017 12:29:21 +0530 Subject: [FIX] web: FieldDomain: don't open record from selection The FieldDomain allows to open a list in a dialog to display the records matching the current domain. In this dialog, clicking on a record should do nothing (this was the behavior before the new views). Before this rev., it actually tried to open the record and it produced a crash. --- addons/web/static/src/js/fields/basic_fields.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'addons/web/static/src/js/fields/basic_fields.js') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index d9482156745..2a465c4dc1b 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -1994,8 +1994,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 @@ -2176,6 +2177,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(); + }, }); /** -- cgit v1.2.3