mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-03 09:00:57 +00:00
replace MoneyFields with inherited classes
This commit is contained in:
1 parent
56b23389d3
commit
3a57093b4e
6 files changed
+20
-18
No files matched your search
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user