2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 04:30:56 +00:00

replace MoneyFields with inherited classes

This commit is contained in:
2021-07-01 00:13:38 +02:00
parent 56b23389d3
commit 3a57093b4e
6 changed files with 20 additions and 18 deletions

View File

@ -15,7 +15,6 @@ from django.db.utils import IntegrityError, OperationalError
from django.conf import settings
from djmoney.settings import CURRENCY_CHOICES
from djmoney.models.fields import MoneyField
from djmoney.contrib.exchange.models import convert_money
from djmoney.contrib.exchange.exceptions import MissingRate
@ -743,7 +742,7 @@ class PriceBreak(models.Model):
help_text=_('Price break quantity'),
)
price = MoneyField(
price = InvenTree.fields.InvenTreeModelMoneyField(
max_digits=19,
decimal_places=4,
default_currency=lambda: common.settings.currency_code_default(),