From 2de92a0779a1459186d8517cf4dd165d9c299f99 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Wed, 28 Feb 2018 17:08:54 +0100 Subject: [PATCH] mistery --- base_tier_validation/models/tier_definition.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/base_tier_validation/models/tier_definition.py b/base_tier_validation/models/tier_definition.py index 2c22e2d16..ffa81446e 100644 --- a/base_tier_validation/models/tier_definition.py +++ b/base_tier_validation/models/tier_definition.py @@ -12,9 +12,6 @@ class TierDefinition(models.Model): @api.model def _get_tier_validation_model_names(self): res = [] - for n, m in self.env.registry.models.iteritems(): - if hasattr(m, '_inherit') and 'tier.validation' in m._inherit: - res.append(n) return res model_id = fields.Many2one( @@ -53,4 +50,5 @@ class TierDefinition(models.Model): @api.onchange('model_id') def onchange_model_id(self): return {'domain': { - 'model_id': [('model', 'in', self._get_tier_validation_model_names())]}} \ No newline at end of file + 'model_id': [ + ('model', 'in', self._get_tier_validation_model_names())]}}