Skip to content

Commit

Permalink
[MERGE] [FIX] FormView: avoid multiple creations of the same line in …
Browse files Browse the repository at this point in the history
…o2m fields when the save action fails (e.g. forgot one required field)

This is done by removing the added action 'prepend_on_create' that can be present as many time as we pressed the save button

lp bug: https://launchpad.net/bugs/1265705 fixed

bzr revid: mat@openerp.com-20140414081003-290q4v21q01m4rsi
  • Loading branch information
mart-e committed Apr 14, 2014
2 parents 001a034 + f9d143c commit 3a27186
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/web/static/src/js/view_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
});
}
return $.when();
}).fail(function() {
self.save_list.pop();
return $.when();
});
};
return iterate();
Expand Down

0 comments on commit 3a27186

Please sign in to comment.