Example #1
0
 def clean(self):
     pre_clean.send(type(self), instance=self)
     super(ShopProduct, self).clean()
     if self.display_unit:
         if self.display_unit.internal_unit != self.product.sales_unit:
             raise ValidationError({'display_unit': _(
                 "Error! Invalid display unit: Internal unit of "
                 "the selected display unit does not match "
                 "with the sales unit of the product.")})
     post_clean.send(type(self), instance=self)
Example #2
0
 def clean(self):
     pre_clean.send(type(self), instance=self)
     super(ShopProduct, self).clean()
     if self.display_unit:
         if self.display_unit.internal_unit != self.product.sales_unit:
             raise ValidationError({'display_unit': _(
                 "Invalid display unit: Internal unit of "
                 "the selected display unit does not match "
                 "with the sales unit of the product")})
     post_clean.send(type(self), instance=self)
Example #3
0
 def clean(self):
     pre_clean.send(type(self), instance=self)
     super(Product, self).clean()
     post_clean.send(type(self), instance=self)
Example #4
0
 def clean(self):
     pre_clean.send(type(self), instance=self)
     super(Product, self).clean()
     post_clean.send(type(self), instance=self)