Skip to content
Extraits de code Groupes Projets
Valider f0550d22 rédigé par Hugo Trentesaux's avatar Hugo Trentesaux
Parcourir les fichiers

[FIX] domain validation

parent e2976a7f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -56,17 +56,6 @@ class RouteExposition(models.Model): ...@@ -56,17 +56,6 @@ class RouteExposition(models.Model):
def _onchange_model_id(self): def _onchange_model_id(self):
self.field_ids = None self.field_ids = None
@api.onchange("domain")
def _onchange_domain(self):
try:
d = self.get_domain()
if not isinstance(d, list):
raise SyntaxError("The domain is not a list")
if not all(isinstance(x, tuple) for x in d):
raise SyntaxError("The domain list does not contains tuple")
except SyntaxError as e:
raise ValidationError(f"Uhoh, the domain seems wrong: {e}") from SyntaxError
# ------------------------------------------------------ # ------------------------------------------------------
# Compute # Compute
# ------------------------------------------------------ # ------------------------------------------------------
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<group> <group>
<group> <group>
<field name="model_id" options="{'no_create':true}" /> <field name="model_id" options="{'no_create':true}" />
<field name="domain" /> <field name="domain" widget="domain"/>
<field name="active_test" /> <field name="active_test" />
<field name="route_name" /> <field name="route_name" />
</group> </group>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter