Browse Source

mistery

pull/1085/head
Lois Rilo 7 years ago
parent
commit
2de92a0779
  1. 6
      base_tier_validation/models/tier_definition.py

6
base_tier_validation/models/tier_definition.py

@ -12,9 +12,6 @@ class TierDefinition(models.Model):
@api.model @api.model
def _get_tier_validation_model_names(self): def _get_tier_validation_model_names(self):
res = [] 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 return res
model_id = fields.Many2one( model_id = fields.Many2one(
@ -53,4 +50,5 @@ class TierDefinition(models.Model):
@api.onchange('model_id') @api.onchange('model_id')
def onchange_model_id(self): def onchange_model_id(self):
return {'domain': { return {'domain': {
'model_id': [('model', 'in', self._get_tier_validation_model_names())]}}
'model_id': [
('model', 'in', self._get_tier_validation_model_names())]}}
Loading…
Cancel
Save