diff --git a/MetaAnalytic.py b/MetaAnalytic.py
index 583e8b05243f86e173edee7c052110541d6a2da3_TWV0YUFuYWx5dGljLnB5..abe6fa2872620af27f2efd88102063b65223ec7f_TWV0YUFuYWx5dGljLnB5 100644
--- a/MetaAnalytic.py
+++ b/MetaAnalytic.py
@@ -239,6 +239,8 @@
         elif isinstance(dimension, str):
             dimension = {"name": dimension}
 
+        automatic_generation = dimension.get("automatic", True)
+
         dimension_name = dimension.get("name", None)
         if dimension_name is None:
             dimension_name = nmspc.get("_description", False) or orm_name
@@ -261,7 +263,9 @@
 
         parent_column = dimension.get("parent_column", column)
 
-        bound_code_is_required = dimension.get("required", True)
+        bound_code_is_required = dimension.get(
+            "required", automatic_generation
+        )
 
         rel_name = dimension.get("rel_name", tuple())
         if rel_name is True:
@@ -466,17 +470,5 @@
 
             return new_code, vals
 
-        @AddMethod(superclass)
-        @api.model
-        @api.returns(orm_name, lambda value: value.id)
-        def create(self, vals, **kwargs):
-            """Create the analytic code."""
-
-            context = self.env.context
-            code_vals = {}
-
-            if sync_parent:
-                cp = self._get_code_parent(vals)
-                if cp is not None and cp:
-                    code_vals["code_parent_id"] = cp.id
+        if automatic_generation:
 
@@ -482,8 +474,7 @@
 
-            # Direct changes to the 'bound analytic code' field are ignored
-            # unless the 'force_code_id' context key is passed as True.
-            force_code_id = vals.pop(column, False)
-
-            # Will be set if a new code is created
-            new_code = False
+            @AddMethod(superclass)
+            @api.model
+            @api.returns(orm_name, lambda value: value.id)
+            def create(self, vals, **kwargs):
+                """Create the analytic code."""
 
@@ -489,17 +480,9 @@
 
-            if context and context.get("force_code_id", False):
-                self._force_code(force_code_id, code_vals)
-                vals[column] = force_code_id
-
-            else:
-                new_code, vals = self._create_analytic_code(vals, code_vals)
-
-            res = super(superclass, self).create(vals, **kwargs)
-
-            if not getattr(res, column):
+                context = self.env.context
+                code_vals = {}
 
                 if sync_parent:
                     cp = self._get_code_parent(vals)
                     if cp is not None and cp:
                         code_vals["code_parent_id"] = cp.id
 
@@ -500,17 +483,10 @@
 
                 if sync_parent:
                     cp = self._get_code_parent(vals)
                     if cp is not None and cp:
                         code_vals["code_parent_id"] = cp.id
 
-                new_code, vals = self._create_analytic_code(
-                    {
-                        field: extract(getattr(res, field), field_data["type"])
-                        for field, field_data in list(res.fields_get().items())
-                        if field
-                        in (list(vals.keys()) + [code_name, code_description])
-                    },
-                    code_vals,
-                )
-                super(superclass, res).write({column: new_code.id})
+                # Direct changes to the 'bound analytic code' field are ignored
+                # unless the 'force_code_id' context key is passed as True.
+                force_code_id = vals.pop(column, False)
 
@@ -516,4 +492,4 @@
 
-            if code_ref_ids:
-                self._generate_code_ref_id(res)
+                # Will be set if a new code is created
+                new_code = False
 
@@ -519,7 +495,5 @@
 
-            if new_code:
-                # These are behind-the-scenes links so bypass security rules.
-                new_code.sudo().write(
-                    {"origin_id": "{},{}".format(self._name, res.id)}
-                )
+                if context and context.get("force_code_id", False):
+                    self._force_code(force_code_id, code_vals)
+                    vals[column] = force_code_id
 
@@ -525,10 +499,6 @@
 
-            return res
-
-        @AddMethod(superclass)
-        @api.multi
-        def write(self, vals, **kwargs):
-            """Update the analytic code's name if it is not inherited,
-            and its parent code if parent-child relations are synchronized.
-            """
+                else:
+                    new_code, vals = self._create_analytic_code(
+                        vals, code_vals
+                    )
 
@@ -534,6 +504,3 @@
 
-            context = self.env.context
-            code_vals = {}
-            news = []
-            standard_process = False
+                res = super(superclass, self).create(vals, **kwargs)
 
@@ -539,12 +506,8 @@
 
-            if sync_parent:
-                cp = self._get_code_parent(vals)
-                if cp is not None and cp:
-                    code_vals["code_parent_id"] = cp.id
-                else:
-                    parent = getattr(self, sync_parent)
-                    if parent:
-                        cp = getattr(parent, parent_column)
+                if not getattr(res, column):
+
+                    if sync_parent:
+                        cp = self._get_code_parent(vals)
                         if cp is not None and cp:
                             code_vals["code_parent_id"] = cp.id
 
@@ -548,7 +511,21 @@
                         if cp is not None and cp:
                             code_vals["code_parent_id"] = cp.id
 
-            # Direct changes to the 'bound analytic code' field are ignored
-            # unless the 'force_code_id' context key is passed as True.
-            force_code_id = vals.pop(column, False)
+                    new_code, vals = self._create_analytic_code(
+                        {
+                            field: extract(
+                                getattr(res, field), field_data["type"]
+                            )
+                            for field, field_data in list(
+                                res.fields_get().items()
+                            )
+                            if field
+                            in (
+                                list(vals.keys())
+                                + [code_name, code_description]
+                            )
+                        },
+                        code_vals,
+                    )
+                    super(superclass, res).write({column: new_code.id})
 
@@ -554,5 +531,4 @@
 
-            if context and context.get("force_code_id", False):
-                self._force_code(force_code_id, code_vals)
-                vals[column] = force_code_id
+                if code_ref_ids:
+                    self._generate_code_ref_id(res)
 
@@ -558,4 +534,10 @@
 
-            elif use_inherits:
-                vals.update(code_vals)
+                if new_code:
+                    # These are behind-the-scenes links so bypass security
+                    # rules.
+                    new_code.sudo().write(
+                        {"origin_id": "{},{}".format(self._name, res.id)}
+                    )
+
+                return res
 
@@ -561,12 +543,13 @@
 
-            else:
-                name_col = rel_name[1] if rel_name else code_name
-                description_col = (
-                    rel_description[1] if rel_description else code_description
-                )
-                if name_col in vals:
-                    code_vals["name"] = vals[name_col]
-                if description_col in vals:
-                    code_vals["description"] = vals[description_col]
-                standard_process = True
+            @AddMethod(superclass)
+            @api.multi
+            def write(self, vals, **kwargs):
+                """Update the analytic code's name if it is not inherited,
+                and its parent code if parent-child relations are synchronized.
+                """
+
+                context = self.env.context
+                code_vals = {}
+                news = []
+                standard_process = False
 
@@ -572,3 +555,12 @@
 
-            res = super(superclass, self).write(vals, **kwargs)
+                if sync_parent:
+                    cp = self._get_code_parent(vals)
+                    if cp is not None and cp:
+                        code_vals["code_parent_id"] = cp.id
+                    else:
+                        parent = getattr(self, sync_parent)
+                        if parent:
+                            cp = getattr(parent, parent_column)
+                            if cp is not None and cp:
+                                code_vals["code_parent_id"] = cp.id
 
@@ -574,5 +566,5 @@
 
-            # If updating records with no code, create these.
-            if standard_process:
-                code_obj = self.env["analytic.code"]
+                # Direct changes to the 'bound analytic code' field are ignored
+                # unless the 'force_code_id' context key is passed as True.
+                force_code_id = vals.pop(column, False)
 
@@ -578,5 +570,5 @@
 
-                for rec in self:
-
-                    code = getattr(rec, column)
+                if context and context.get("force_code_id", False):
+                    self._force_code(force_code_id, code_vals)
+                    vals[column] = force_code_id
 
@@ -582,4 +574,4 @@
 
-                    rec_code_vals = code_vals.copy()
-                    rec_vals = dict().copy()
+                elif use_inherits:
+                    vals.update(code_vals)
 
@@ -585,10 +577,27 @@
 
-                    if not rec_code_vals.get("name"):
-                        rec_code_vals["name"] = rec.read([name_col])[0][
-                            name_col
-                        ]
-                    if not rec_code_vals.get("description"):
-                        rec_code_vals["description"] = self.read(
-                            [description_col]
-                        )[0][description_col]
+                else:
+                    name_col = rel_name[1] if rel_name else code_name
+                    description_col = (
+                        rel_description[1]
+                        if rel_description
+                        else code_description
+                    )
+                    if name_col in vals:
+                        code_vals["name"] = vals[name_col]
+                    if description_col in vals:
+                        code_vals["description"] = vals[description_col]
+                    standard_process = True
+
+                res = super(superclass, self).write(vals, **kwargs)
+
+                # If updating records with no code, create these.
+                if standard_process:
+                    code_obj = self.env["analytic.code"]
+
+                    for rec in self:
+
+                        code = getattr(rec, column)
+
+                        rec_code_vals = code_vals.copy()
+                        rec_vals = dict().copy()
 
@@ -594,13 +603,10 @@
 
-                    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"] = "{},{}".format(
-                            self._name, rec.id
-                        )
-                        # These are behind-the-scenes links so bypass security
-                        # rules.
-                        rec_vals[column] = (
-                            code_obj.sudo().create(rec_code_vals).id
-                        )
+                        if not rec_code_vals.get("name"):
+                            rec_code_vals["name"] = rec.read([name_col])[0][
+                                name_col
+                            ]
+                        if not rec_code_vals.get("description"):
+                            rec_code_vals["description"] = self.read(
+                                [description_col]
+                            )[0][description_col]
 
@@ -606,3 +612,15 @@
 
-                        super(superclass, rec).write(rec_vals, **kwargs)
+                        if not code and rec_code_vals.get("name"):
+                            news.append(rec.id)
+                            rec_code_vals[
+                                "nd_id"
+                            ] = rec._get_bound_dimension_id()  # noqa: E501
+                            rec_code_vals["origin_id"] = "{},{}".format(
+                                self._name, rec.id
+                            )
+                            # These are behind-the-scenes links so bypass
+                            # security rules.
+                            rec_vals[column] = (
+                                code_obj.sudo().create(rec_code_vals).id
+                            )
 
@@ -608,6 +626,3 @@
 
-                    elif rec_code_vals:
-                        # These are behind-the-scenes links so bypass security
-                        # rules.
-                        code.sudo().write(rec_code_vals)
+                            super(superclass, rec).write(rec_vals, **kwargs)
 
@@ -613,5 +628,6 @@
 
-            if code_ref_ids and news is not False:
-                for new in news:
-                    self._generate_code_ref_id(new)
+                        elif rec_code_vals:
+                            # These are behind-the-scenes links so bypass
+                            # security rules.
+                            code.sudo().write(rec_code_vals)
 
@@ -617,5 +633,9 @@
 
-            return res
+                if code_ref_ids and news is not False:
+                    for new in news:
+                        self._generate_code_ref_id(new)
+
+                return res
 
         @AddMethod(superclass)
         def unlink(self, **kwargs):