From faba6daf7c8f95bfc865cc3f59297070c59e3e3b Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 8 May 2017 17:23:34 +0200 Subject: [PATCH] [FIX] models: attribute `pool` on a model's class's may be falsy but not `None` Modify the test to match `None` instead of any falsy value. The latter triggers a bug when installing a just-deinstalled module (point_of_sale). --- odoo/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/models.py b/odoo/models.py index c0a995e4405..264b9e45955 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -2768,7 +2768,7 @@ class BaseModel(object): cls = type(self) cls._setup_done = False # a model's base structure depends on its mro (without registry classes) - cls._model_cache_key = tuple(c for c in cls.mro() if not getattr(c, 'pool', None)) + cls._model_cache_key = tuple(c for c in cls.mro() if getattr(c, 'pool', None) is None) @api.model def _setup_base(self, partial):