[FIX] models: do not copy translations of fields that are not copied
authorRaphael Collet <rco@openerp.com>
Thu, 6 Nov 2014 15:16:00 +0000 (16:16 +0100)
committerRaphael Collet <rco@openerp.com>
Thu, 6 Nov 2014 15:42:41 +0000 (16:42 +0100)
Fixes #3272.

openerp/models.py

index 5cce6a6..0dd16a6 100644 (file)
@@ -4666,6 +4666,8 @@ class BaseModel(object):
         trans_obj = self.pool.get('ir.translation')
 
         for field_name, field in self._fields.iteritems():
+            if not field.copy:
+                continue
             # removing the lang to compare untranslated values
             context_wo_lang = dict(context, lang=None)
             old_record, new_record = self.browse(cr, uid, [old_id, new_id], context=context_wo_lang)