[FIX] put back old behavior about save and readonly fields in form view

bzr revid: nicolas.vanhoren@openerp.com-20121016123101-huzasphtqujf87b3
This commit is contained in:
niv-openerp 2012-10-16 14:31:01 +02:00
parent 431d504c13
commit 886e1fcdd9
1 changed files with 1 additions and 1 deletions

View File

@ -845,7 +845,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
if (!first_invalid_field) {
first_invalid_field = f;
}
} else if (f.name !== 'id' && (!self.datarecord.id || (!f.get("readonly") && f._dirty_flag))) {
} else if (f.name !== 'id' && !f.get("readonly") && (!self.datarecord.id || f._dirty_flag)) {
// Special case 'id' field, do not save this field
// on 'create' : save all non readonly fields
// on 'edit' : save non readonly modified fields