summaryrefslogtreecommitdiff
path: root/addons/base/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/base/static/src')
-rw-r--r--addons/base/static/src/js/form.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/base/static/src/js/form.js b/addons/base/static/src/js/form.js
index 9bbbfda3346..90357325928 100644
--- a/addons/base/static/src/js/form.js
+++ b/addons/base/static/src/js/form.js
@@ -72,8 +72,9 @@ openerp.base.FormView = openerp.base.View.extend( /** @lends openerp.base.FormV
do_show: function () {
var self = this;
self.$element.show();
- if (this.dataset.index === null) {
+ if (this.dataset.index === null || (this.dataset.index === 0 && this.dataset.ids.length == 0)) {
// null index means we should start a new record
+ // 0 index with empty ids means we called the form with empty dataset (wizards, switched to form from empty list, ...)
this.on_button_new();
} else {
this.dataset.read_index(_.keys(this.fields_view.fields), this.on_record_loaded);