Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @classmethod
- def validate(cls, lots):
- super().validate(lots)
- for lot in lots:
- lot.check_description_length()
- def check_description_length(self):
- Warning = Pool().get('res.user.warning')
- if (self.packaging_description
- and len(self.packaging_description) > 20):
- key = '%s@%s' % (self.__name__, self.id)
- if Warning.check(key):
- raise LotPackagingWarning(key, gettext(
- 'preciball.msg_lot_packaging_description_length'))
Add Comment
Please, Sign In to add comment