From 6349048ba0e5e74c74e783ffce8c3c0083d2f060 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 3 Oct 2014 09:29:07 +0200 Subject: [PATCH] [FIX] web: force load record after reload page When reloading a page, the _actualize_mode is called before the record is loaded and the form is displayed partially in edit mode (o2m fields with delete/add icons). This patch forces to trigger a load_record when the datarecord has not been loaded yet in the do_show merthod (opw 607910) --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index ee15592c924..3e5d3860a48 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -282,7 +282,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.$el.add(this.$buttons).removeClass('oe_form_dirty'); var shown = this.has_been_loaded; - if (options.reload !== false) { + if (options.reload !== false || !this.datarecord.id) { shown = shown.then(function() { if (self.dataset.index === null) { // null index means we should start a new record