summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/views/basic')
-rw-r--r--addons/web/static/src/js/views/basic/basic_model.js6
-rw-r--r--addons/web/static/src/js/views/basic/basic_renderer.js12
2 files changed, 17 insertions, 1 deletions
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 4bd12bf2bc3..c16f635a604 100644
--- a/addons/web/static/src/js/views/basic/basic_model.js
+++ b/addons/web/static/src/js/views/basic/basic_model.js
@@ -1588,7 +1588,9 @@ var BasicModel = AbstractModel.extend({
return $.when.apply($, defs).then(function () {
// ensure to fetch up to 'limit' records (may be useful if records of
// the current page have been removed)
- return self._readUngroupedList(list);
+ return self._readUngroupedList(list).then(function () {
+ return self._fetchX2ManysBatched(list);
+ });
});
},
/**
@@ -2516,6 +2518,8 @@ var BasicModel = AbstractModel.extend({
changes[fieldName] = value ?
this.localData[value].model + ',' + this.localData[value].res_id :
false;
+ } else if (type === 'char' && changes[fieldName] === '') {
+ changes[fieldName] = false;
} else if (changes[fieldName] === null) {
changes[fieldName] = false;
}
diff --git a/addons/web/static/src/js/views/basic/basic_renderer.js b/addons/web/static/src/js/views/basic/basic_renderer.js
index 543ce01191e..21fabbc2274 100644
--- a/addons/web/static/src/js/views/basic/basic_renderer.js
+++ b/addons/web/static/src/js/views/basic/basic_renderer.js
@@ -357,6 +357,17 @@ var BasicRenderer = AbstractRenderer.extend({
return this.state.count !== 0;
},
/**
+ * This function is called each time a field widget is created, when it is
+ * ready (after its willStart and Start methods are complete). This is the
+ * place where work having to do with $el should be done.
+ *
+ * @private
+ * @param {Widget} widget the field widget instance
+ * @param {Object} node the attrs coming from the arch
+ */
+ _postProcessField: function (widget, node) {
+ },
+ /**
* Registers or updates the modifiers data associated to the given node.
* This method is quiet complex as it handles all the needs of the basic
* renderers:
@@ -524,6 +535,7 @@ var BasicRenderer = AbstractRenderer.extend({
));
},
}, modifiersOptions || {}));
+ self._postProcessField(widget, node);
});
return widget;