diff --git a/MetaAnalytic.py b/MetaAnalytic.py
index 366e2faa25e78d195bf851147383d175e7f970d8_TWV0YUFuYWx5dGljLnB5..120224ee69e0c22ab7275490a5708a1ab779ad61_TWV0YUFuYWx5dGljLnB5 100644
--- a/MetaAnalytic.py
+++ b/MetaAnalytic.py
@@ -575,7 +575,8 @@
 
             context = self.env.context
             code_vals = {}
-            new = False
+            news = []
+            standard_process = False
 
             if sync_parent:
                 cp = self._get_code_parent(vals)
@@ -607,7 +608,7 @@
                     code_vals['name'] = vals[name_col]
                 if description_col in vals:
                     code_vals['description'] = vals[description_col]
-                codes = {rec: getattr(rec, column) for rec in self}
+                standard_process = True
 
             res = super(superclass, self).write(vals, **kwargs)
 
@@ -611,6 +612,4 @@
 
             res = super(superclass, self).write(vals, **kwargs)
 
-            news = []
-
             # If updating records with no code, create these.
@@ -616,4 +615,4 @@
             # If updating records with no code, create these.
-            if codes:
+            if standard_process:
                 code_obj = self.env['analytic.code']
 
@@ -618,7 +617,9 @@
                 code_obj = self.env['analytic.code']
 
-                for rec, code in codes.iteritems():
+                for rec in self:
+
+                    code = getattr(rec, column)
 
                     rec_code_vals = code_vals.copy()
                     rec_vals = dict().copy()
 
@@ -621,7 +622,7 @@
 
                     rec_code_vals = code_vals.copy()
                     rec_vals = dict().copy()
 
-                    if 'name' not in rec_code_vals:
+                    if not rec_code_vals.get('name'):
                         rec_code_vals['name'] = \
                             rec.read([name_col])[0][name_col]
@@ -626,8 +627,8 @@
                         rec_code_vals['name'] = \
                             rec.read([name_col])[0][name_col]
-                    if 'description' not in code_vals:
+                    if not rec_code_vals.get('description'):
                         rec_code_vals['description'] = (
                             self.read([description_col])[0]
                             [description_col]
                         )
 
@@ -629,9 +630,9 @@
                         rec_code_vals['description'] = (
                             self.read([description_col])[0]
                             [description_col]
                         )
 
-                    if not code and not getattr(rec, column):
+                    if not code and rec_code_vals.get('name'):
                         news.append(rec.id)
                         rec_code_vals['nd_id'] = rec._get_bound_dimension_id()
                         rec_code_vals['origin_id'] = \