mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
auto-fill price break with default quantity
This commit is contained in:
parent
9d19029ba9
commit
67a73c1fbf
@ -16,6 +16,8 @@ from InvenTree.views import AjaxCreateView, AjaxUpdateView, AjaxDeleteView
|
||||
from InvenTree.status_codes import OrderStatus
|
||||
from InvenTree.helpers import str2bool
|
||||
|
||||
from common.models import Currency
|
||||
|
||||
from .models import Company
|
||||
from .models import SupplierPart
|
||||
from .models import SupplierPriceBreak
|
||||
@ -330,6 +332,13 @@ class PriceBreakCreate(AjaxCreateView):
|
||||
|
||||
initials['part'] = self.get_part()
|
||||
|
||||
# Pre-select the default currency
|
||||
try:
|
||||
base = Currency.objects.get(base=True)
|
||||
initials['currency'] = base
|
||||
except Currency.DoesNotExist:
|
||||
pass
|
||||
|
||||
return initials
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user