From 09c2e4a5bca68512be9440df14be3732443548e0 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 22 Sep 2016 16:15:26 +0200 Subject: [PATCH 1/2] [FIX] core: fix registry initialisation Registry.init_models now expect a list of model names instead of the models themself. --- odoo/modules/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/modules/registry.py b/odoo/modules/registry.py index 8de7172ae89..9be7fa15ae9 100644 --- a/odoo/modules/registry.py +++ b/odoo/modules/registry.py @@ -234,7 +234,7 @@ class Registry(Mapping): queue = deque(model_names) while queue: model = self[queue.popleft()] - models.add(model) + models.add(model._name) for func in funcs: queue.extend(func(model)) return models From de77992320c450a6b4a494db70d49af2386a0142 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 22 Sep 2016 17:01:54 +0200 Subject: [PATCH 2/2] [FIX] product: correct import order --- addons/product/models/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/product/models/__init__.py b/addons/product/models/__init__.py index 418438395a9..6c62fd17331 100644 --- a/addons/product/models/__init__.py +++ b/addons/product/models/__init__.py @@ -1,12 +1,18 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. +# flake8: noqa: F401 + import base_config_settings import decimal_precision + +# don't try to be a good boy and sort imports alphabetically. +# `product.template` should be initialised before `product.product` +import product_template import product + import product_attribute import product_pricelist -import product_template import product_uom import res_currency import res_company