[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)
This commit is contained in:
parent
6d509c0c6b
commit
6349048ba0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue