if self.state == 'unchanged':
return self.valid
else:
+ if self.definition.homo=='information' : return 1
valid = 1
v = self.valeur
# verification presence
#
if valid and self.definition.validators:
try:
+ if hasattr(self.definition.validators, 'set_MCSimp'):
+ self.definition.validators.set_MCSimp(self)
self.definition.validators.convert(lval)
except ValError as e:
self.cr.fatal("invalid keyword {}:{}\nCriteria : {}".format(tr(self.nom), str(e), self.definition.validators.info()))
valid = 0
+ except Exception as e:
+ self.cr.fatal("invalid keyword {}:{}\nCritere Catalogue : {}".format(tr(self.nom), str(e), self.definition.validators.info()))
+ valid = 0
else:
# si pas de cr demande, on sort a la toute premiere erreur
try:
intoProto.adapt(val)
cardProto.adapt(lval)
if self.definition.validators:
+ # Attention, ne fonctionne pas avec OrVal ou AndVal
if hasattr(self.definition.validators, 'set_MCSimp'):
self.definition.validators.set_MCSimp(self)
self.definition.validators.convert(lval)
except ValError as e:
valid = 0
+ except Exception as e:
+ valid = 0
self.setValid(valid)
return self.valid