- def _check_ean(self, cr, uid, ids, context=None):
- return all(
- openerp.addons.product.product.check_ean(user.ean13) == True
- for user in self.browse(cr, uid, ids, context=context)
- )
-
- _constraints = [
- (_check_ean, "Error: Invalid ean code", ['ean13'],),
- ]
-