summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-09-18 10:03:51 +0200
committerGéry Debongnie <ged@odoo.com>2017-09-18 11:54:39 +0200
commitf1a85ba70a2412fb0d7bf789a758d8f2d2e86a02 (patch)
treee6e8d2142a12d75c8943b07c192f88ecd3ddf527 /addons/web
parent313f69e9487e991e4db33c75682342b185da5c73 (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')
-rw-r--r--addons/web/static/src/js/_deprecated/data.js1
-rw-r--r--addons/web/static/src/js/chrome/abstract_web_client.js11
-rw-r--r--addons/web/static/src/js/chrome/action_manager.js14
-rw-r--r--addons/web/static/src/js/chrome/search_filters.js44
-rw-r--r--addons/web/static/src/js/chrome/search_view.js6
-rw-r--r--addons/web/static/src/js/chrome/view_manager.js5
-rw-r--r--addons/web/static/src/js/core/ajax.js2
-rw-r--r--addons/web/static/src/js/core/bus.js2
-rw-r--r--addons/web/static/src/js/core/class.js57
-rw-r--r--addons/web/static/src/js/core/concurrency.js15
-rw-r--r--addons/web/static/src/js/core/dialog.js14
-rw-r--r--addons/web/static/src/js/core/dom.js8
-rw-r--r--addons/web/static/src/js/core/mixins.js64
-rw-r--r--addons/web/static/src/js/core/pyeval.js10
-rw-r--r--addons/web/static/src/js/core/session.js4
-rw-r--r--addons/web/static/src/js/core/translation.js10
-rw-r--r--addons/web/static/src/js/core/utils.js12
-rw-r--r--addons/web/static/src/js/core/widget.js68
-rw-r--r--addons/web/static/src/js/fields/abstract_field.js4
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js7
-rw-r--r--addons/web/static/src/js/fields/field_utils.js8
-rw-r--r--addons/web/static/src/js/fields/special_fields.js8
-rw-r--r--addons/web/static/src/js/fields/upgrade_fields.js2
-rw-r--r--addons/web/static/src/js/services/config.js8
-rw-r--r--addons/web/static/src/js/services/core.js10
-rw-r--r--addons/web/static/src/js/services/crash_manager.js16
-rw-r--r--addons/web/static/src/js/services/data_manager.js8
-rw-r--r--addons/web/static/src/js/views/abstract_renderer.js3
-rw-r--r--addons/web/static/src/js/views/basic/basic_controller.js4
-rw-r--r--addons/web/static/src/js/views/basic/basic_model.js27
-rw-r--r--addons/web/static/src/js/views/form/form_renderer.js2
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_record.js4
-rw-r--r--addons/web/static/src/js/views/standalone_field_manager_mixin.js12
-rw-r--r--addons/web/static/src/js/widgets/date_picker.js8
-rw-r--r--addons/web/static/src/js/widgets/domain_selector.js12
-rw-r--r--addons/web/static/src/js/widgets/domain_selector_dialog.js3
-rw-r--r--addons/web/static/src/js/widgets/iframe_widget.js3
37 files changed, 280 insertions, 216 deletions
diff --git a/addons/web/static/src/js/_deprecated/data.js b/addons/web/static/src/js/_deprecated/data.js
index 14b3daeb2c6..be5496c55c7 100644
--- a/addons/web/static/src/js/_deprecated/data.js
+++ b/addons/web/static/src/js/_deprecated/data.js
@@ -733,6 +733,7 @@ var data = {
DataSet: DataSet,
DataSetStatic: DataSetStatic,
DataSetSearch: DataSetSearch,
+ /** @type String */
noDisplayContent: "<em class=\"text-warning\">" + _t("Unnamed") + "</em>",
};
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 2a5bb5310ce..8492adc33f6 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -206,16 +206,17 @@ var AbstractWebClient = Widget.extend(mixins.ServiceProvider, {
// Window title handling
// --------------------------------------------------------------
/**
- Sets the first part of the title of the window, dedicated to the current action.
+ * Sets the first part of the title of the window, dedicated to the current action.
*/
set_title: function (title) {
this.set_title_part("action", title);
},
/**
- Sets an arbitrary part of the title of the window. Title parts are identified by strings. Each time
- a title part is changed, all parts are gathered, ordered by alphabetical order and displayed in the
- title of the window separated by '-'.
- */
+ * Sets an arbitrary part of the title of the window. Title parts are
+ * identified by strings. Each time a title part is changed, all parts
+ * are gathered, ordered by alphabetical order and displayed in the title
+ * of the window separated by ``-``.
+ */
set_title_part: function (part, title) {
var tmp = _.clone(this.get("title_part"));
tmp[part] = title;
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js
index 131a31ad776..e18a3d60734 100644
--- a/addons/web/static/src/js/chrome/action_manager.js
+++ b/addons/web/static/src/js/chrome/action_manager.js
@@ -67,7 +67,7 @@ var Action = core.Class.extend({
},
/**
* Stores the DOM fragment of the action
- * @param {jQuery} [fragment] the DOM fragment
+ * @param {jQuery} [$fragment] the DOM fragment
*/
set_fragment: function($fragment) {
this.$fragment = $fragment;
@@ -300,11 +300,11 @@ var ActionManager = Widget.extend({
/**
* Add a new action to the action manager
*
- * widget: typically, widgets added are openerp.web.ViewManager. The action manager
- * uses the stack of actions to handle the breadcrumbs.
- * action_descr: new action description
- * options.on_reverse_breadcrumb: will be called when breadcrumb is clicked on
- * options.clear_breadcrumbs: boolean, if true, action stack is destroyed
+ * @param {Widget} widget typically, widgets added are openerp.web.ViewManager. The action manager uses the stack of actions to handle the breadcrumbs.
+ * @param {Object} action_descr new action description
+ * @param {Object} options
+ * @param options.on_reverse_breadcrumb will be called when breadcrumb is clicked on
+ * @param options.clear_breadcrumbs: boolean, if true, action stack is destroyed
*/
push_action: function(widget, action_descr, options) {
var self = this;
@@ -613,7 +613,7 @@ var ActionManager = Widget.extend({
/**
* Execute an OpenERP action
*
- * @param {Number|String|String|Object} Can be either an action id, an action XML id, a client action tag or an action descriptor.
+ * @param {Number|String|String|Object} action Can be either an action id, an action XML id, a client action tag or an action descriptor.
* @param {Object} [options]
* @param {Boolean} [options.clear_breadcrumbs=false] Clear the breadcrumbs history list
* @param {Boolean} [options.replace_breadcrumb=false] Replace the current breadcrumb with the action
diff --git a/addons/web/static/src/js/chrome/search_filters.js b/addons/web/static/src/js/chrome/search_filters.js
index a0e3c1c077f..b9cf1b0fce9 100644
--- a/addons/web/static/src/js/chrome/search_filters.js
+++ b/addons/web/static/src/js/chrome/search_filters.js
@@ -96,7 +96,7 @@ var ExtendedSearchProposition = Widget.extend(/** @lends instance.web.search.Ext
},
});
-ExtendedSearchProposition.Field = Widget.extend({
+var Field = Widget.extend({
init: function (parent, field) {
this._super(parent);
this.field = field;
@@ -153,7 +153,7 @@ ExtendedSearchProposition.Field = Widget.extend({
}
});
-ExtendedSearchProposition.Char = ExtendedSearchProposition.Field.extend({
+var Char = Field.extend({
tagName: 'input',
className: 'o_input',
attributes: {
@@ -172,7 +172,7 @@ ExtendedSearchProposition.Char = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.DateTime = ExtendedSearchProposition.Field.extend({
+var DateTime = Field.extend({
tagName: 'span',
attributes: {
type: 'datetime'
@@ -241,7 +241,7 @@ ExtendedSearchProposition.DateTime = ExtendedSearchProposition.Field.extend({
},
});
-ExtendedSearchProposition.Date = ExtendedSearchProposition.DateTime.extend({
+var Date = DateTime.extend({
attributes: {
type: 'date'
},
@@ -250,7 +250,7 @@ ExtendedSearchProposition.Date = ExtendedSearchProposition.DateTime.extend({
},
});
-ExtendedSearchProposition.Integer = ExtendedSearchProposition.Field.extend({
+var Integer = Field.extend({
tagName: 'input',
className: 'o_input',
attributes: {
@@ -280,11 +280,11 @@ ExtendedSearchProposition.Integer = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.Id = ExtendedSearchProposition.Integer.extend({
+var Id = Integer.extend({
operators: [{value: "=", text: _lt("is")}]
});
-ExtendedSearchProposition.Float = ExtendedSearchProposition.Field.extend({
+var Float = Field.extend({
template: 'SearchView.extended_search.proposition.float',
operators: [
{value: "=", text: _lt("is equal to")},
@@ -313,7 +313,7 @@ ExtendedSearchProposition.Float = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.Selection = ExtendedSearchProposition.Field.extend({
+var Selection = Field.extend({
template: 'SearchView.extended_search.proposition.selection',
operators: [
{value: "=", text: _lt("is")},
@@ -331,7 +331,7 @@ ExtendedSearchProposition.Selection = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.Boolean = ExtendedSearchProposition.Field.extend({
+var Boolean = Field.extend({
tagName: 'span',
operators: [
{value: "=", text: _lt("is true")},
@@ -347,19 +347,19 @@ ExtendedSearchProposition.Boolean = ExtendedSearchProposition.Field.extend({
});
core.search_filters_registry
- .add('char', ExtendedSearchProposition.Char)
- .add('text', ExtendedSearchProposition.Char)
- .add('one2many', ExtendedSearchProposition.Char)
- .add('many2one', ExtendedSearchProposition.Char)
- .add('many2many', ExtendedSearchProposition.Char)
- .add('datetime', ExtendedSearchProposition.DateTime)
- .add('date', ExtendedSearchProposition.Date)
- .add('integer', ExtendedSearchProposition.Integer)
- .add('float', ExtendedSearchProposition.Float)
- .add('monetary', ExtendedSearchProposition.Float)
- .add('boolean', ExtendedSearchProposition.Boolean)
- .add('selection', ExtendedSearchProposition.Selection)
- .add('id', ExtendedSearchProposition.Id);
+ .add('char', Char)
+ .add('text', Char)
+ .add('one2many', Char)
+ .add('many2one', Char)
+ .add('many2many', Char)
+ .add('datetime', DateTime)
+ .add('date', Date)
+ .add('integer', Integer)
+ .add('float', Float)
+ .add('monetary', Float)
+ .add('boolean', Boolean)
+ .add('selection', Selection)
+ .add('id', Id);
return {
ExtendedSearchProposition: ExtendedSearchProposition
diff --git a/addons/web/static/src/js/chrome/search_view.js b/addons/web/static/src/js/chrome/search_view.js
index 630183d89ff..d8d02ac9a41 100644
--- a/addons/web/static/src/js/chrome/search_view.js
+++ b/addons/web/static/src/js/chrome/search_view.js
@@ -265,7 +265,7 @@ var SearchView = Widget.extend({
*
* @param parent
* @param dataset
- * @param fields_view
+ * @param fvg
* @param {Object} [options]
* @param {Boolean} [options.hidden=false] hide the search view
* @param {Boolean} [options.disable_custom_filters=false] do not load custom filters from ir.filters
@@ -499,8 +499,8 @@ var SearchView = Widget.extend({
.$el.focus();
},
/**
- * @param {openerp.web.search.SearchQuery | undefined} Undefined if event is change
- * @param {openerp.web.search.Facet}
+ * @param {openerp.web.search.SearchQuery | undefined} collection Undefined if event is change
+ * @param {openerp.web.search.Facet} model
* @param {Object} [options]
*/
renderFacets: function (collection, model, options) {
diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js
index 8f62ff101f7..03eb2da27d8 100644
--- a/addons/web/static/src/js/chrome/view_manager.js
+++ b/addons/web/static/src/js/chrome/view_manager.js
@@ -232,8 +232,9 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
},
/**
* Returns the default view with the following fallbacks:
- * - use the default_view defined in the flags, if any
- * - use the first view in the view_order
+ *
+ * - use the default_view defined in the flags, if any
+ * - use the first view in the view_order
*
* @returns {Object} the default view
*/
diff --git a/addons/web/static/src/js/core/ajax.js b/addons/web/static/src/js/core/ajax.js
index 5bab96a0c1e..d69574d2e10 100644
--- a/addons/web/static/src/js/core/ajax.js
+++ b/addons/web/static/src/js/core/ajax.js
@@ -211,7 +211,7 @@ var loadJS = (function () {
* @param {HTMLFormElement} [options.form] the form to submit in order to fetch the file
* @param {Function} [options.success] callback in case of download success
* @param {Function} [options.error] callback in case of request error, provided with the error body
- * @param {Function} [options.complete] called after both ``success`` and ``error` callbacks have executed
+ * @param {Function} [options.complete] called after both ``success`` and ``error`` callbacks have executed
*/
function get_file(options) {
// need to detect when the file is done downloading (not used
diff --git a/addons/web/static/src/js/core/bus.js b/addons/web/static/src/js/core/bus.js
index bf33c1fe01e..1f715da4df1 100644
--- a/addons/web/static/src/js/core/bus.js
+++ b/addons/web/static/src/js/core/bus.js
@@ -6,6 +6,8 @@ var mixins = require('web.mixins');
/**
* Event Bus used to bind events scoped in the current instance
+ *
+ * @class Bus
*/
return Class.extend(mixins.EventDispatcherMixin, {
init: function() {
diff --git a/addons/web/static/src/js/core/class.js b/addons/web/static/src/js/core/class.js
index 8e53f0ba06d..4d1e6baaa8e 100644
--- a/addons/web/static/src/js/core/class.js
+++ b/addons/web/static/src/js/core/class.js
@@ -12,46 +12,47 @@ odoo.define('web.Class', function () {
* Defines The Class object. That object can be used to define and inherit classes using
* the extend() method.
*
- * Example:
+ * Example::
*
- * var Person = Class.extend({
- * init: function(isDancing){
- * this.dancing = isDancing;
- * },
- * dance: function(){
- * return this.dancing;
- * }
- * });
+ * var Person = Class.extend({
+ * init: function(isDancing){
+ * this.dancing = isDancing;
+ * },
+ * dance: function(){
+ * return this.dancing;
+ * }
+ * });
*
- * The init() method act as a constructor. This class can be instancied this way:
+ * The init() method act as a constructor. This class can be instanced this way::
*
- * var person = new Person(true);
- * person.dance();
+ * var person = new Person(true);
+ * person.dance();
*
- * The Person class can also be extended again:
+ * The Person class can also be extended again:
*
- * var Ninja = Person.extend({
- * init: function(){
- * this._super( false );
- * },
- * dance: function(){
- * // Call the inherited version of dance()
- * return this._super();
- * },
- * swingSword: function(){
- * return true;
- * }
- * });
+ * var Ninja = Person.extend({
+ * init: function(){
+ * this._super( false );
+ * },
+ * dance: function(){
+ * // Call the inherited version of dance()
+ * return this._super();
+ * },
+ * swingSword: function(){
+ * return true;
+ * }
+ * });
*
* When extending a class, each re-defined method can use this._super() to call the previous
* implementation of that method.
+ *
+ * @class Class
*/
+function OdooClass(){}
+
var initializing = false;
var fnTest = /xyz/.test(function(){xyz();}) ? /\b_super\b/ : /.*/;
-// The web Class implementation (does nothing)
-function OdooClass(){};
-
/**
* Subclass an existing class
*
diff --git a/addons/web/static/src/js/core/concurrency.js b/addons/web/static/src/js/core/concurrency.js
index cab9df6529e..aeef29809d9 100644
--- a/addons/web/static/src/js/core/concurrency.js
+++ b/addons/web/static/src/js/core/concurrency.js
@@ -122,7 +122,7 @@ return {
* the last operation.
*
* For example, let us say that we have a _fetch method on a widget which
- * fetches data. We want to rerender the widget after. We could do this:
+ * fetches data. We want to rerender the widget after. We could do this::
*
* this._fetch().then(function (result) {
* self.state = result;
@@ -130,17 +130,18 @@ return {
* });
*
* Now, we have at least two problems:
+ *
* - if this code is called twice and the second _fetch completes before the
* first, the end state will be the result of the first _fetch, which is
* not what we expect
* - in any cases, the user interface will rerender twice, which is bad.
*
- * Now, if we have a DropPrevious:
+ * Now, if we have a DropPrevious::
*
* this.dropPrevious = new DropPrevious();
*
* Then we can wrap the _fetch in a DropPrevious and have the expected
- * result:
+ * result::
*
* this.dropPrevious
* .add(this._fetch())
@@ -153,7 +154,7 @@ return {
/**
* Registers a new deferred and rejects the previous one
*
- * @param {Deferred} the new deferred
+ * @param {Deferred} deferred the new deferred
* @returns {Promise}
*/
add: function (deferred) {
@@ -171,7 +172,7 @@ return {
*
* Imagine that we have a function to fetch some data _load(), which returns
* a deferred which resolves to something useful. Now, we have some code
- * looking like this:
+ * looking like this::
*
* return this._load().then(function (result) {
* this.state = result;
@@ -179,11 +180,11 @@ return {
*
* If this code is run twice, but the second execution ends before the
* first, then the final state will be the result of the first call to
- * _load. However, if we have a mutex:
+ * _load. However, if we have a mutex::
*
* this.mutex = new Mutex();
*
- * and if we wrap the calls to _load in a mutex:
+ * and if we wrap the calls to _load in a mutex::
*
* return this.mutex.exec(function() {
* return this._load().then(function (result) {
diff --git a/addons/web/static/src/js/core/dialog.js b/addons/web/static/src/js/core/dialog.js
index 88bfae2b545..8c75db392fb 100644
--- a/addons/web/static/src/js/core/dialog.js
+++ b/addons/web/static/src/js/core/dialog.js
@@ -9,17 +9,17 @@ var QWeb = core.qweb;
var _t = core._t;
/**
- A useful class to handle dialogs.
-
- Attributes:
- - $footer: A jQuery element targeting a dom part where buttons can be added. It always exists
- during the lifecycle of the dialog.
-*/
+ * A useful class to handle dialogs.
+ * Attributes:
+ *
+ * ``$footer``
+ * A jQuery element targeting a dom part where buttons can be added. It
+ * always exists during the lifecycle of the dialog.
+ **/
var Dialog = Widget.extend({
xmlDependencies: ['/web/static/src/xml/dialog.xml'],
/**
- * @constructor
* @param {Widget} parent
* @param {Object} [options]
* @param {string} [options.title=Odoo]
diff --git a/addons/web/static/src/js/core/dom.js b/addons/web/static/src/js/core/dom.js
index 7bae1bc29a5..6ca13f18e4e 100644
--- a/addons/web/static/src/js/core/dom.js
+++ b/addons/web/static/src/js/core/dom.js
@@ -115,10 +115,14 @@ return {
}
},
/**
- * jQuery find function behavior is:
+ * jQuery find function behavior is::
+ *
* $('A').find('A B') <=> $('A A B')
- * The searches behavior to find options' DOM needs to be
+ *
+ * The searches behavior to find options' DOM needs to be::
+ *
* $('A').find('A B') <=> $('A B')
+ *
* This is what this function does.
*
* @param {jQuery} $from - the jQuery element(s) from which to search
diff --git a/addons/web/static/src/js/core/mixins.js b/addons/web/static/src/js/core/mixins.js
index cc99cc1aaa4..79de054bf10 100644
--- a/addons/web/static/src/js/core/mixins.js
+++ b/addons/web/static/src/js/core/mixins.js
@@ -10,6 +10,9 @@ var AbstractService = require('web.AbstractService');
* relationship. Each object can a have a parent and multiple children.
* When an object is destroyed, all its children are destroyed too releasing
* any resource they could have reserved before.
+ *
+ * @name ParentedMixin
+ * @mixin
*/
var ParentedMixin = {
__parentedMixin : true,
@@ -57,21 +60,21 @@ var ParentedMixin = {
return this.__parentedDestroyed;
},
/**
- Utility method to only execute asynchronous actions if the current
- object has not been destroyed.
-
- @param {$.Deferred} promise The promise representing the asynchronous
- action.
- @param {bool} [reject=false] If true, the returned promise will be
- rejected with no arguments if the current
- object is destroyed. If false, the
- returned promise will never be resolved
- or rejected.
- @returns {$.Deferred} A promise that will mirror the given promise if
- everything goes fine but will either be rejected
- with no arguments or never resolved if the
- current object is destroyed.
- */
+ * Utility method to only execute asynchronous actions if the current
+ * object has not been destroyed.
+ *
+ * @param {$.Deferred} promise The promise representing the asynchronous
+ * action.
+ * @param {bool} [reject=false] If true, the returned promise will be
+ * rejected with no arguments if the current
+ * object is destroyed. If false, the
+ * returned promise will never be resolved
+ * or rejected.
+ * @returns {$.Deferred} A promise that will mirror the given promise if
+ * everything goes fine but will either be rejected
+ * with no arguments or never resolved if the
+ * current object is destroyed.
+ */
alive: function (promise, reject) {
var self = this;
return $.Deferred(function (def) {
@@ -228,13 +231,16 @@ var Events = Class.extend({
});
/**
- Mixin containing an event system. Events are also registered by specifying the target object
- (the object which will receive the event when it is raised). Both the event-emitting object
- and the target object store or reference to each other. This is used to correctly remove all
- reference to the event handler when any of the object is destroyed (when the destroy() method
- from ParentedMixin is called). Removing those references is necessary to avoid memory leak
- and phantom events (events which are raised and sent to a previously destroyed object).
-*/
+ * Mixin containing an event system. Events are also registered by specifying the target object
+ * (the object which will receive the event when it is raised). Both the event-emitting object
+ * and the target object store or reference to each other. This is used to correctly remove all
+ * reference to the event handler when any of the object is destroyed (when the destroy() method
+ * from ParentedMixin is called). Removing those references is necessary to avoid memory leak
+ * and phantom events (events which are raised and sent to a previously destroyed object).
+ *
+ * @name EventDispatcherMixin
+ * @mixin
+ */
var EventDispatcherMixin = _.extend({}, ParentedMixin, {
__eventDispatcherMixin: true,
custom_events: {},
@@ -349,6 +355,10 @@ var EventDispatcherMixin = _.extend({}, ParentedMixin, {
}
});
+/**
+ * @name PropertiesMixin
+ * @mixin
+ */
var PropertiesMixin = _.extend({}, EventDispatcherMixin, {
init: function () {
EventDispatcherMixin.init.call(this);
@@ -432,6 +442,10 @@ odoo.define('web.ServicesMixin', function (require) {
var rpc = require('web.rpc');
+/**
+ * @mixin
+ * @name ServicesMixin
+ */
var ServicesMixin = {
call: function (service, method) {
var args = Array.prototype.slice.call(arguments, 2);
@@ -450,9 +464,9 @@ var ServicesMixin = {
* Builds and executes RPC query. Returns a deferred's promise resolved with
* the RPC result.
*
- * @param {string} arg1 either a route or a model
- * @param {string} method if a model is given, this argument is a method
- * @returns {Deferred's Promise}
+ * @param {string} params either a route or a model
+ * @param {string} options if a model is given, this argument is a method
+ * @returns {Promise}
*/
_rpc: function (params, options) {
var query = rpc.buildQuery(params);
diff --git a/addons/web/static/src/js/core/pyeval.js b/addons/web/static/src/js/core/pyeval.js
index 502c6a4ce90..ee4ac697fd9 100644
--- a/addons/web/static/src/js/core/pyeval.js
+++ b/addons/web/static/src/js/core/pyeval.js
@@ -530,11 +530,11 @@ datetime.date = py.type('date', null, {
}),
});
/**
- Returns the current local date, which means the date on the client (which can be different
- compared to the date of the server).
-
- @return {datetime.date}
-*/
+ * Returns the current local date, which means the date on the client (which can be different
+ * compared to the date of the server).
+ *
+ * @return {datetime.date}
+ */
function context_today() {
var d = new Date();
return py.PY_call(
diff --git a/addons/web/static/src/js/core/session.js b/addons/web/static/src/js/core/session.js
index fc45e669407..0ecea92fb71 100644
--- a/addons/web/static/src/js/core/session.js
+++ b/addons/web/static/src/js/core/session.js
@@ -321,8 +321,6 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, {
* @param {String} url RPC endpoint
* @param {Object} params call parameters
* @param {Object} options additional options for rpc call
- * @param {Function} success_callback function to execute on RPC call success
- * @param {Function} error_callback function to execute on RPC call failure
* @returns {jQuery.Deferred} jquery-provided ajax deferred
*/
rpc: function (url, params, options) {
@@ -413,7 +411,7 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, {
* (host system settings) to UTC, for a given date. The offset is positive
* if the local timezone is behind UTC, and negative if it is ahead.
*
- * @param {string || moment} date a valid string date or moment instance
+ * @param {string | moment} date a valid string date or moment instance
* @returns {integer}
*/
getTZOffset: function (date) {
diff --git a/addons/web/static/src/js/core/translation.js b/addons/web/static/src/js/core/translation.js
index fae44774a07..76493fdb432 100644
--- a/addons/web/static/src/js/core/translation.js
+++ b/addons/web/static/src/js/core/translation.js
@@ -71,6 +71,16 @@ var TranslationDataBase = Class.extend(/** @lends instance.TranslationDataBase#
}
});
+/**
+ * Eager translation function, performs translation immediately at call
+ * site. Beware using this outside of method bodies (before the
+ * translation database is loaded), you probably want :func:`_lt`
+ * instead.
+ *
+ * @function _t
+ * @param {String} source string to translate
+ * @returns {String} source translated into the current locale
+ */
var _t = new TranslationDataBase().build_translation_function();
/**
* Lazy translation function, only performs the translation when actually
diff --git a/addons/web/static/src/js/core/utils.js b/addons/web/static/src/js/core/utils.js
index 585be4d37b8..9eefc12944c 100644
--- a/addons/web/static/src/js/core/utils.js
+++ b/addons/web/static/src/js/core/utils.js
@@ -107,7 +107,7 @@ var utils = {
/**
* Returns a human readable size
*
- * @param {Number} number of bytes
+ * @param {Number} size number of bytes
*/
human_size: function (size) {
var units = _t("Bytes,Kb,Mb,Gb,Tb,Pb,Eb,Zb,Yb").split(',');
@@ -271,8 +271,8 @@ var utils = {
/**
* performs a half up rounding with a fixed amount of decimals, correcting for float loss of precision
* See the corresponding float_round() in server/tools/float_utils.py for more info
- * @param {Number} the value to be rounded
- * @param {Number} the number of decimals. eg: round_decimals(3.141592,2) -> 3.14
+ * @param {Number} value the value to be rounded
+ * @param {Number} decimals the number of decimals. eg: round_decimals(3.141592,2) -> 3.14
*/
round_decimals: function (value, decimals) {
return utils.round_precision(value, Math.pow(10,-decimals));
@@ -319,9 +319,9 @@ var utils = {
},
/**
* Create a cookie
- * @param {String} name : the name of the cookie
- * @param {String} value : the value stored in the cookie
- * @param {Integer} ttl : time to live of the cookie in millis. -1 to erase the cookie.
+ * @param {String} name the name of the cookie
+ * @param {String} value the value stored in the cookie
+ * @param {Integer} ttl time to live of the cookie in millis. -1 to erase the cookie.
*/
set_cookie: function (name, value, ttl) {
ttl = ttl || 24*60*60*365;
diff --git a/addons/web/static/src/js/core/widget.js b/addons/web/static/src/js/core/widget.js
index 8ef141a6020..c47deff7330 100644
--- a/addons/web/static/src/js/core/widget.js
+++ b/addons/web/static/src/js/core/widget.js
@@ -7,50 +7,51 @@ var mixins = require('web.mixins');
var ServicesMixin = require('web.ServicesMixin');
/**
- * Base class for all visual components. Provides a lot of functionalities helpful
+ * Base class for all visual components. Provides a lot of functions helpful
* for the management of a part of the DOM.
*
* Widget handles:
+ *
* - Rendering with QWeb.
- * - Life-cycle management and parenting (when a parent is destroyed, all its children are
- * destroyed too).
+ * - Life-cycle management and parenting (when a parent is destroyed, all its
+ * children are destroyed too).
* - Insertion in DOM.
*
- * Guide to create implementations of the Widget class:
- * ==============================================
+ * **Guide to create implementations of the Widget class**
*
- * Here is a sample child class:
+ * Here is a sample child class::
*
- * MyWidget = openerp.base.Widget.extend({
- * // the name of the QWeb template to use for rendering
- * template: "MyQWebTemplate",
+ * var MyWidget = openerp.base.Widget.extend({
+ * // the name of the QWeb template to use for rendering
+ * template: "MyQWebTemplate",
*
- * init: function(parent) {
- * this._super(parent);
- * // stuff that you want to init before the rendering
- * },
- * start: function() {
- * // stuff you want to make after the rendering, `this.$el` holds a correct value
- * this.$(".my_button").click(/* an example of event binding * /);
+ * init: function(parent) {
+ * this._super(parent);
+ * // stuff that you want to init before the rendering
+ * },
+ * start: function() {
+ * // stuff you want to make after the rendering, `this.$el` holds a correct value
+ * this.$(".my_button").click(/* an example of event binding * /);
*
- * // if you have some asynchronous operations, it's a good idea to return
- * // a promise in start()
- * var promise = this._rpc(...);
- * return promise;
- * }
- * });
+ * // if you have some asynchronous operations, it's a good idea to return
+ * // a promise in start()
+ * var promise = this._rpc(...);
+ * return promise;
+ * }
+ * });
*
- * Now this class can simply be used with the following syntax:
+ * Now this class can simply be used with the following syntax::
*
- * var my_widget = new MyWidget(this);
- * my_widget.appendTo($(".some-div"));
+ * var my_widget = new MyWidget(this);
+ * my_widget.appendTo($(".some-div"));
*
- * With these two lines, the MyWidget instance was inited, rendered, it was inserted into the
- * DOM inside the ".some-div" div and its events were binded.
+ * With these two lines, the MyWidget instance was initialized, rendered,
+ * inserted into the DOM inside the ``.some-div`` div and its events were
+ * bound.
*
- * And of course, when you don't need that widget anymore, just do:
+ * And of course, when you don't need that widget anymore, just do::
*
- * my_widget.destroy();
+ * my_widget.destroy();
*
* That will kill the widget in a clean way and erase its content from the dom.
*/
@@ -67,7 +68,7 @@ var Widget = core.Class.extend(mixins.PropertiesMixin, ServicesMixin, {
* The name of the QWeb template that will be used for rendering. Must be
* redefined in subclasses or the default render() method can not be used.
*
- * @type string
+ * @type {String}
*/
template: null,
/**
@@ -82,8 +83,6 @@ var Widget = core.Class.extend(mixins.PropertiesMixin, ServicesMixin, {
/**
* Constructs the widget and sets its parent if a parent is given.
*
- * @constructs openerp.Widget
- *
* @param {openerp.Widget} parent Binds the current instance to the given Widget instance.
* When that widget is destroyed by calling destroy(), the current instance will be
* destroyed too. Can be null.
@@ -238,7 +237,7 @@ var Widget = core.Class.extend(mixins.PropertiesMixin, ServicesMixin, {
* (if any) by the new one in the DOM.
*
* @param {HTMLElement | jQuery} $el
- * @returns {*} this
+ * @returns {Widget} this
*/
replaceElement: function ($el) {
var $oldel = this.$el;
@@ -257,13 +256,14 @@ var Widget = core.Class.extend(mixins.PropertiesMixin, ServicesMixin, {
* Re-sets the widget's root element (el/$el/$el).
*
* Includes:
+ *
* * re-delegating events
* * re-binding sub-elements
* * if the widget already had a root element, replacing the pre-existing
* element in the DOM
*
* @param {HTMLElement | jQuery} element new root element for the widget
- * @return {*} this
+ * @return {Widget} this
*/
setElement: function (element) {
// NB: completely useless, as WidgetMixin#init creates a $el
diff --git a/addons/web/static/src/js/fields/abstract_field.js b/addons/web/static/src/js/fields/abstract_field.js
index bdb745298b2..894ee57c813 100644
--- a/addons/web/static/src/js/fields/abstract_field.js
+++ b/addons/web/static/src/js/fields/abstract_field.js
@@ -59,6 +59,8 @@ var AbstractField = Widget.extend({
specialData: false,
/**
* to override to indicate which field types are supported by the widget
+ *
+ * @type Array<String>
*/
supportedFieldTypes: [],
@@ -196,7 +198,7 @@ var AbstractField = Widget.extend({
* will have the cursor at the very end.
*
* @param {Object} [options]
- * @param {boolean} [noselect=false] if false and the input
+ * @param {boolean} [options.noselect=false] if false and the input
* is of type text or textarea, the content will also be selected
* @param {Event} [options.event] the event which fired this activation
* @returns {boolean} true if the widget was activated, false if the
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
diff --git a/addons/web/static/src/js/fields/field_utils.js b/addons/web/static/src/js/fields/field_utils.js
index cbb2a856337..369dda9f037 100644
--- a/addons/web/static/src/js/fields/field_utils.js
+++ b/addons/web/static/src/js/fields/field_utils.js
@@ -80,7 +80,7 @@ function formatChar(value, field, options) {
* Returns a string representing a date. If the value is false, then we return
* an empty string. Note that this is dependant on the localization settings
*
- * @param {Moment|false}
+ * @param {Moment|false} value
* @param {Object} [field]
* a description of the field (note: this parameter is ignored)
* @param {Object} [options] additional options
@@ -258,7 +258,7 @@ function formatX2Many(value) {
* @param {Object} [options]
* additional options to override the values in the python description of
* the field.
- * @param {Object} [options.currency] - the description of the currency to use
+ * @param {Object} [options.currency] the description of the currency to use
* @param {integer} [options.currency_id]
* the id of the 'res.currency' to use (ignored if options.currency)
* @param {string} [options.currency_field]
@@ -336,7 +336,7 @@ function formatSelection(value, field, options) {
* Create an Date object
* The method toJSON return the formated value to send value server side
*
- * @param {string}
+ * @param {string} value
* @param {Object} [field]
* a description of the field (note: this parameter is ignored)
* @param {Object} [options] additional options
@@ -375,7 +375,7 @@ function parseDate(value, field, options) {
* Create an Date object
* The method toJSON return the formated value to send value server side
*
- * @param {string}
+ * @param {string} value
* @param {Object} [field]
* a description of the field (note: this parameter is ignored)
* @param {Object} [options] additional options
diff --git a/addons/web/static/src/js/fields/special_fields.js b/addons/web/static/src/js/fields/special_fields.js
index 7a0bb9ed092..19db97fe985 100644
--- a/addons/web/static/src/js/fields/special_fields.js
+++ b/addons/web/static/src/js/fields/special_fields.js
@@ -10,10 +10,10 @@ var _t = core._t;
/**
- * This widget is intended to display a warning near a label of a 'timezone' field
- * indicating if the browser timezone is identical (or not) to the selected timezone.
- * This widget depends on a field given with the param 'tz_offset_field', which contains
- * the time difference between UTC time and local time, in minutes.
+ * This widget is intended to display a warning near a label of a 'timezone' field
+ * indicating if the browser timezone is identical (or not) to the selected timezone.
+ * This widget depends on a field given with the param 'tz_offset_field', which contains
+ * the time difference between UTC time and local time, in minutes.
*/
var FieldTimezoneMismatch = FieldSelection.extend({
/**
diff --git a/addons/web/static/src/js/fields/upgrade_fields.js b/addons/web/static/src/js/fields/upgrade_fields.js
index 9d61036ab8b..119a64881e3 100644
--- a/addons/web/static/src/js/fields/upgrade_fields.js
+++ b/addons/web/static/src/js/fields/upgrade_fields.js
@@ -112,7 +112,7 @@ var AbstractFieldUpgrade = {
/**
* @private
- * @param {MouseEvent}
+ * @param {MouseEvent} event
*/
_onInputClicked: function (event) {
if ($(event.currentTarget).prop("checked")) {
diff --git a/addons/web/static/src/js/services/config.js b/addons/web/static/src/js/services/config.js
index 9b8d6c03e2f..f892801a593 100644
--- a/addons/web/static/src/js/services/config.js
+++ b/addons/web/static/src/js/services/config.js
@@ -16,23 +16,31 @@ var config = {
/**
* debug is a boolean flag. It is only considered true if the flag is set
* in the url
+ *
+ * @type Boolean
*/
debug: ($.deparam($.param.querystring()).debug !== undefined),
device: {
/**
* touch is a boolean, true if the device supports touch interaction
+ *
+ * @type Boolean
*/
touch: 'ontouchstart' in window || 'onmsgesturechange' in window,
/**
* size_class is an integer: 0, 1, 2 or 3, depending on the (current)
* size of the device. This is a dynamic property, updated whenever the
* browser is resized
+ *
+ * @type Number
*/
size_class: null,
/**
* A frequent use case is to have a different render in 'mobile' mode,
* meaning when the screen is small. This flag (boolean) is true when
* the size is not 3. It is also updated dynamically.
+ *
+ * @type Boolean
*/
isMobile: null,
/**
diff --git a/addons/web/static/src/js/services/core.js b/addons/web/static/src/js/services/core.js
index 0a52da1c521..86937c0e2c5 100644
--- a/addons/web/static/src/js/services/core.js
+++ b/addons/web/static/src/js/services/core.js
@@ -7,6 +7,11 @@ var QWeb = require('web.QWeb');
var Registry = require('web.Registry');
var translation = require('web.translation');
+/**
+ * Whether the client is currently in "debug" mode
+ *
+ * @type Boolean
+ */
var debug = $.deparam($.param.querystring()).debug !== undefined;
var bus = new Bus ();
@@ -43,8 +48,11 @@ return {
one2many_view_registry: new Registry(),
search_filters_registry: new Registry(),
search_widgets_registry: new Registry(),
-
+ /**
+ * @type {String}
+ */
csrf_token: odoo.csrf_token,
+ a_thing: 42,
};
});
diff --git a/addons/web/static/src/js/services/crash_manager.js b/addons/web/static/src/js/services/crash_manager.js
index 533cac6f3ad..3ce280c3aa8 100644
--- a/addons/web/static/src/js/services/crash_manager.js
+++ b/addons/web/static/src/js/services/crash_manager.js
@@ -161,19 +161,19 @@ var CrashManager = core.Class.extend({
});
/**
- An interface to implement to handle exceptions. Register implementation in instance.web.crash_manager_registry.
+ * An interface to implement to handle exceptions. Register implementation in instance.web.crash_manager_registry.
*/
var ExceptionHandler = {
/**
- @param parent The parent.
- @param error The error object as returned by the JSON-RPC implementation.
- */
+ * @param parent The parent.
+ * @param error The error object as returned by the JSON-RPC implementation.
+ */
init: function(parent, error) {},
/**
- Called to inform to display the widget, if necessary. A typical way would be to implement
- this interface in a class extending instance.web.Dialog and simply display the dialog in this
- method.
- */
+ * Called to inform to display the widget, if necessary. A typical way would be to implement
+ * this interface in a class extending instance.web.Dialog and simply display the dialog in this
+ * method.
+ */
display: function() {},
};
diff --git a/addons/web/static/src/js/services/data_manager.js b/addons/web/static/src/js/services/data_manager.js
index 4bf1748fbab..22c7e86ba7d 100644
--- a/addons/web/static/src/js/services/data_manager.js
+++ b/addons/web/static/src/js/services/data_manager.js
@@ -64,9 +64,11 @@ return core.Class.extend({
* Loads various information concerning views: fields_view for each view,
* the fields of the corresponding model, and optionally the filters.
*
- * @param {Object} [dataset] the dataset for which the views are loaded
- * @param {Array} [views_descr] array of [view_id, view_type]
- * @param {Object} [options] dictionnary of various options:
+ * @param {Object} params
+ * @param {String} params.model
+ * @param {Object} params.context
+ * @param {Array} params.views_descr array of [view_id, view_type]
+ * @param {Object} [options] dictionary of various options:
* - options.load_filters: whether or not to load the filters,
* - options.action_id: the action_id (required to load filters),
* - options.toolbar: whether or not a toolbar will be displayed,
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, {
/**
diff --git a/addons/web/static/src/js/widgets/date_picker.js b/addons/web/static/src/js/widgets/date_picker.js
index 655e94f9f43..26b73c27ac5 100644
--- a/addons/web/static/src/js/widgets/date_picker.js
+++ b/addons/web/static/src/js/widgets/date_picker.js
@@ -104,7 +104,7 @@ var DateWidget = Widget.extend({
}
},
/**
- * @param {Moment|false}
+ * @param {Moment|false} value
*/
setValue: function (value) {
this.set({'value': value});
@@ -121,7 +121,7 @@ var DateWidget = Widget.extend({
/**
* @private
- * @param {Moment}
+ * @param {Moment} v
* @returns {string}
*/
_formatClient: function (v) {
@@ -129,7 +129,7 @@ var DateWidget = Widget.extend({
},
/**
* @private
- * @param {string|false}
+ * @param {string|false} v
* @returns {Moment}
*/
_parseClient: function (v) {
@@ -137,7 +137,7 @@ var DateWidget = Widget.extend({
},
/**
* @private
- * @param {boolean}
+ * @param {boolean} readonly
*/
_setReadonly: function (readonly) {
this.readonly = readonly;
diff --git a/addons/web/static/src/js/widgets/domain_selector.js b/addons/web/static/src/js/widgets/domain_selector.js
index 74572e81b39..8b273ed5aac 100644
--- a/addons/web/static/src/js/widgets/domain_selector.js
+++ b/addons/web/static/src/js/widgets/domain_selector.js
@@ -51,7 +51,6 @@ var DomainNode = Widget.extend({
"mouseleave button": "_onButtonLeft",
},
/**
- * @constructor
* A DomainNode needs a model and domain to work. It can also receive a set
* of options.
*
@@ -427,11 +426,12 @@ var DomainTree = DomainNode.extend({
* DomainTree specialization to use to have a fully working widget.
*
* Known limitations:
- * - Some operators like "child_of", "parent_of", "like", "not like",
- * "=like", "=ilike" will come only if you use them from demo data or
- * debug input.
- * - Some kind of domain can not be build right now
- * e.g ("country_id", "in", [1,2,3]) but you can insert from debug input.
+ *
+ * - Some operators like "child_of", "parent_of", "like", "not like",
+ * "=like", "=ilike" will come only if you use them from demo data or
+ * debug input.
+ * - Some kind of domain can not be build right now
+ * e.g ("country_id", "in", [1,2,3]) but you can insert from debug input.
*/
var DomainSelector = DomainTree.extend({
template: "DomainSelector",
diff --git a/addons/web/static/src/js/widgets/domain_selector_dialog.js b/addons/web/static/src/js/widgets/domain_selector_dialog.js
index c8f48d0ddc8..5f41973951d 100644
--- a/addons/web/static/src/js/widgets/domain_selector_dialog.js
+++ b/addons/web/static/src/js/widgets/domain_selector_dialog.js
@@ -7,6 +7,9 @@ var DomainSelector = require("web.DomainSelector");
var _t = core._t;
+/**
+ * @class DomainSelectorDialog
+ */
return Dialog.extend({
init: function (parent, model, domain, options) {
this.model = model;
diff --git a/addons/web/static/src/js/widgets/iframe_widget.js b/addons/web/static/src/js/widgets/iframe_widget.js
index cf5bc15c950..77d27fac5b4 100644
--- a/addons/web/static/src/js/widgets/iframe_widget.js
+++ b/addons/web/static/src/js/widgets/iframe_widget.js
@@ -6,7 +6,8 @@ var Widget = require('web.Widget');
/**
* Generic widget to create an iframe that listens for clicks
*
- * It should be extended by overwritting the methods:
+ * It should be extended by overwriting the methods::
+ *
* init: function(parent) {
* this._super(parent, <url_of_iframe>);
* },