mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Currency migrations - stop migrations when defaults change (#4975)
* make currency choices independend * replace hard coded default currency * use function for psql? * use callable default * revert some fields * also migrat all currency codes
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -2,6 +2,7 @@
|
||||
|
||||
from django.db import migrations
|
||||
import djmoney.models.fields
|
||||
import common.settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -14,6 +15,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='purchase_price',
|
||||
field=djmoney.models.fields.MoneyField(blank=True, decimal_places=4, default_currency='USD', help_text='Single unit purchase price at time of purchase', max_digits=19, null=True, verbose_name='Purchase Price'),
|
||||
field=djmoney.models.fields.MoneyField(blank=True, decimal_places=4, default_currency=common.settings.currency_code_default(), help_text='Single unit purchase price at time of purchase', max_digits=19, null=True, verbose_name='Purchase Price'),
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user