diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-09-18 10:03:51 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-09-18 11:54:39 +0200 |
| commit | f1a85ba70a2412fb0d7bf789a758d8f2d2e86a02 (patch) | |
| tree | e6e8d2142a12d75c8943b07c192f88ecd3ddf527 /addons/web/static/src/js/views | |
| parent | 313f69e9487e991e4db33c75682342b185da5c73 (diff) | |
[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.
Diffstat (limited to 'addons/web/static/src/js/views')
6 files changed, 30 insertions, 22 deletions
diff --git a/addons/web/static/src/js/views/abstract_renderer.js b/addons/web/static/src/js/views/abstract_renderer.js index d7eb5002f2d..935fcc6643e 100644 --- a/addons/web/static/src/js/views/abstract_renderer.js +++ b/addons/web/static/src/js/views/abstract_renderer.js @@ -9,6 +9,9 @@ odoo.define('web.AbstractRenderer', function (require) { var Widget = require('web.Widget'); +/** + * @class AbstractRenderer + */ return Widget.extend({ /** * @constructor diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js index 67de3ec8ad9..46359188577 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -114,7 +114,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { /** * Method that will be overriden by the views with the ability to have selected ids * - * @returns [] + * @returns {Array} */ getSelectedIds: function () { return []; @@ -517,7 +517,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { * in readonly (e.g. Priority). * * @private - * @param {OdooEvent} + * @param {OdooEvent} ev */ _onFieldChanged: function (ev) { if (this.mode === 'readonly') { diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index bcccefbb984..5b6eb35b4ac 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -200,7 +200,7 @@ var BasicModel = AbstractModel.extend({ * * @param {string} id local resource id of a record * @param {string} viewType the current viewType - * @returns {Deferred -> string} resolves to the id of the record + * @returns {Deferred<string>} resolves to the id of the record */ applyRawChanges: function (recordID, viewType) { var record = this.localData[recordID]; @@ -277,7 +277,7 @@ var BasicModel = AbstractModel.extend({ * Duplicate a record (by calling the 'copy' route) * * @param {string} recordID id for a local resource - * @returns {Deferred -> string} resolves to the id of duplicate record + * @returns {Deferred<string>} resolves to the id of duplicate record */ duplicateRecord: function (recordID) { var self = this; @@ -544,7 +544,7 @@ var BasicModel = AbstractModel.extend({ * @param {Object} params.fields contains the description of each field * @param {string} [params.type] 'record' or 'list' * @param {string} [params.recordID] an ID for an existing resource. - * @returns {Deferred -> string} resolves to a local id, or handle + * @returns {Deferred<string>} resolves to a local id, or handle */ load: function (params) { params.type = params.type || (params.res_id !== undefined ? 'record' : 'list'); @@ -694,7 +694,7 @@ var BasicModel = AbstractModel.extend({ * @param {Object} [options] * @param {boolean} [options.keepChanges=false] if true, doesn't discard the * changes on the record before reloading it - * @returns {Deferred -> string} resolves to the id of the resource + * @returns {Deferred<string>} resolves to the id of the resource */ reload: function (id, options) { options = options || {}; @@ -784,7 +784,7 @@ var BasicModel = AbstractModel.extend({ * Resequences records. * * @param {string} modelName the resIDs model - * @param {Array[integer]} resIDs the new sequence of ids + * @param {Array<integer>} resIDs the new sequence of ids * @param {string} parentID the localID of the parent * @param {object} [options] * @param {integer} [options.offset] @@ -834,8 +834,7 @@ var BasicModel = AbstractModel.extend({ * - it needs to check all changes, * - generate commands for x2many fields, * - call the /create or /write method according to the record status - * - After that, it has to reload all data, in case something changed, - * server side. + * - After that, it has to reload all data, in case something changed, server side. * * @param {string} record_id local resource * @param {Object} [options] @@ -1006,7 +1005,7 @@ var BasicModel = AbstractModel.extend({ * data * * @param {string} groupId - * @returns {Deferred -> string} resolves to the group id + * @returns {Deferred<string>} resolves to the group id */ toggleGroup: function (groupId) { var self = this; @@ -1048,7 +1047,7 @@ var BasicModel = AbstractModel.extend({ * @param {Object} [options] * @param {string} [options.position=top] if the new record should be added * on top or on bottom of the list - * @returns {Deferred -> string} resolves to the new record id + * @returns {Deferred<string>} resolves to the new record id */ _addX2ManyDefaultRecord: function (list, options) { var self = this; @@ -1760,7 +1759,7 @@ var BasicModel = AbstractModel.extend({ * @param {string} [optinos.viewType] the type of view for which the record * is fetched (usefull to load the adequate fields), by defaults, uses * record.viewType - * @returns {Deferred -> Object} resolves to the record or is rejected in + * @returns {Deferred<Object>} resolves to the record or is rejected in * case no id given were valid ids */ _fetchRecord: function (record, options) { @@ -2221,7 +2220,7 @@ var BasicModel = AbstractModel.extend({ * Fetch all data in a ungrouped list * * @param {Object} list a valid resource object - * @returns {Deferred -> Object} resolves to the fecthed list + * @returns {Deferred<Object>} resolves to the fecthed list */ _fetchUngroupedList: function (list) { var self = this; @@ -3029,7 +3028,7 @@ var BasicModel = AbstractModel.extend({ * @param {Object} params.fields contains the description of each field * @param {Object} params.context the context for the new record * @param {string} params.viewType the key in fieldsInfo of the fields to load - * @returns {Deferred -> string} resolves to the id for the created resource + * @returns {Deferred<string>} resolves to the id for the created resource */ _makeDefaultRecord: function (modelName, params) { var self = this; @@ -3318,7 +3317,7 @@ var BasicModel = AbstractModel.extend({ * * @param {Object} record * @param {Object} record - * @returns {Deferred -> Object} resolves to the finished resource + * @returns {Deferred<Object>} resolves to the finished resource */ _postprocess: function (record, options) { var self = this; @@ -3455,7 +3454,7 @@ var BasicModel = AbstractModel.extend({ * instead of a /search_read. * * @param {Object} list a valid resource object - * @returns {Deferred -> Object} resolves to the fetched list object + * @returns {Deferred<Object>} resolves to the fetched list object */ _readUngroupedList: function (list) { var self = this; diff --git a/addons/web/static/src/js/views/form/form_renderer.js b/addons/web/static/src/js/views/form/form_renderer.js index 8f1724c3e64..9c71c9eb2a3 100644 --- a/addons/web/static/src/js/views/form/form_renderer.js +++ b/addons/web/static/src/js/views/form/form_renderer.js @@ -79,7 +79,7 @@ var FormRenderer = BasicRenderer.extend({ * Show a warning message if the user modified a translated field. For each * field, the notification provides a link to edit the field's translations. * - * @param {Object[]} alertFields: field list + * @param {Object[]} alertFields field list */ displayTranslationAlert: function (alertFields) { this.$('.o_notification_box').remove(); diff --git a/addons/web/static/src/js/views/kanban/kanban_record.js b/addons/web/static/src/js/views/kanban/kanban_record.js index 52597e6ac71..495f98b28ee 100644 --- a/addons/web/static/src/js/views/kanban/kanban_record.js +++ b/addons/web/static/src/js/views/kanban/kanban_record.js @@ -99,7 +99,7 @@ var KanbanRecord = Widget.extend({ * Generates the color classname from a given variable * * @private - * @param {number || string} variable + * @param {number | string} variable * @return {string} the classname */ _getColorClassname: function (variable) { @@ -110,7 +110,7 @@ var KanbanRecord = Widget.extend({ * Computes a color id between 0 and 10 from a given value * * @private - * @param {number || string} variable + * @param {number | string} variable * @returns {integer} the color id */ _getColorID: function (variable) { diff --git a/addons/web/static/src/js/views/standalone_field_manager_mixin.js b/addons/web/static/src/js/views/standalone_field_manager_mixin.js index 2c01dc25622..da3cc19350d 100644 --- a/addons/web/static/src/js/views/standalone_field_manager_mixin.js +++ b/addons/web/static/src/js/views/standalone_field_manager_mixin.js @@ -1,13 +1,19 @@ odoo.define('web.StandaloneFieldManagerMixin', function (require) { "use strict"; + +var FieldManagerMixin = require('web.FieldManagerMixin'); + /** * The StandaloneFieldManagerMixin is a mixin, designed to be used by a widget * that instanciates its own field widgets. + * + * @mixin + * @name StandaloneFieldManagerMixin + * @mixes FieldManagerMixin + * @property {Function} _confirmChange + * @property {Function} _registerWidget */ - -var FieldManagerMixin = require('web.FieldManagerMixin'); - var StandaloneFieldManagerMixin = _.extend({}, FieldManagerMixin, { /** |
