[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).
This commit is contained in:
Raphael Collet
2017-05-09 11:31:52 +02:00
parent 71410e3c99
commit faba6daf7c
+1 -1
View File
@@ -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):