[fix] occasional problem when a form try to validate a o2m before it finished updating

bzr revid: nicolas.vanhoren@openerp.com-20111012091147-k9nm1yzftm2oalo1
This commit is contained in:
niv-openerp 2011-10-12 11:11:47 +02:00
parent bfbfbc4ac6
commit bd8f7a36a6
1 changed files with 2 additions and 0 deletions

View File

@ -2041,6 +2041,8 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
},
validate: function() {
this.invalid = false;
if (!this.viewmanager.views[this.viewmanager.active_view])
return;
var view = this.viewmanager.views[this.viewmanager.active_view].controller;
if (this.viewmanager.active_view === "form") {
for (var f in view.fields) {