|
|
@@ -26,6 +26,7 @@ class BasketLineForm(forms.ModelForm):
|
|
26
|
26
|
return qty
|
|
27
|
27
|
|
|
28
|
28
|
def check_max_allowed_quantity(self, qty):
|
|
|
29
|
+ self.instance.basket.strategy = self.strategy
|
|
29
|
30
|
is_allowed, reason = self.instance.basket.is_quantity_allowed(qty)
|
|
30
|
31
|
if not is_allowed:
|
|
31
|
32
|
raise forms.ValidationError(reason)
|
|
|
@@ -40,7 +41,7 @@ class BasketLineForm(forms.ModelForm):
|
|
40
|
41
|
class Meta:
|
|
41
|
42
|
model = Line
|
|
42
|
43
|
exclude = ('basket', 'product', 'stockrecord', 'line_reference',
|
|
43
|
|
- 'price_excl_tax', 'price_incl_tax')
|
|
|
44
|
+ 'price_excl_tax', 'price_incl_tax', 'price_currency')
|
|
44
|
45
|
|
|
45
|
46
|
|
|
46
|
47
|
class BaseBasketLineFormSet(BaseModelFormSet):
|