2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +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

@ -26,8 +26,6 @@ from markdownx.models import MarkdownxField
from mptt.models import MPTTModel, TreeForeignKey
from djmoney.models.fields import MoneyField
from decimal import Decimal, InvalidOperation
from datetime import datetime, timedelta
from InvenTree import helpers
@ -38,7 +36,7 @@ import label.models
from InvenTree.status_codes import StockStatus, StockHistoryCode
from InvenTree.models import InvenTreeTree, InvenTreeAttachment
from InvenTree.fields import InvenTreeURLField
from InvenTree.fields import InvenTreeModelMoneyField, InvenTreeURLField
from users.models import Owner
@ -533,7 +531,7 @@ class StockItem(MPTTModel):
help_text=_('Stock Item Notes')
)
purchase_price = MoneyField(
purchase_price = InvenTreeModelMoneyField(
max_digits=19,
decimal_places=4,
default_currency=currency_code_default(),