コード例 #1
0
ファイル: _product_shops.py プロジェクト: Bobby00/boss_shuup
 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)
コード例 #2
0
ファイル: _product_shops.py プロジェクト: ruqaiya/shuup
 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)
コード例 #3
0
 def clean(self):
     pre_clean.send(type(self), instance=self)
     super(Product, self).clean()
     post_clean.send(type(self), instance=self)
コード例 #4
0
ファイル: _products.py プロジェクト: ruqaiya/shuup
 def clean(self):
     pre_clean.send(type(self), instance=self)
     super(Product, self).clean()
     post_clean.send(type(self), instance=self)