Browse Source

fix

pull/1085/head
Lois Rilo 7 years ago
parent
commit
0cb5724a21
  1. 7
      base_tier_validation/models/tier_definition.py

7
base_tier_validation/models/tier_definition.py

@ -20,8 +20,6 @@ class TierDefinition(models.Model):
model_id = fields.Many2one( model_id = fields.Many2one(
comodel_name="ir.model", comodel_name="ir.model",
string="Referenced Model", string="Referenced Model",
domain=lambda self: [
('model', 'in', self._get_tier_validation_model_names())],
) )
model = fields.Char( model = fields.Char(
related='model_id.model', index=True, store=True, related='model_id.model', index=True, store=True,
@ -51,3 +49,8 @@ class TierDefinition(models.Model):
default=lambda self: self.env["res.company"]._company_default_get( default=lambda self: self.env["res.company"]._company_default_get(
"tier.definition"), "tier.definition"),
) )
@api.onchange('model_id')
def onchange_model_id(self):
return {'domain': {
'model_id': [('model', 'in', self._get_tier_validation_model_names())]}}
Loading…
Cancel
Save