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

Add 'currency' option for company

- e.g. an external supplier might have a default currency
- Adds a form input which only allows selection of allowed currency codes
- Add unit testing for currency validation
This commit is contained in:
Oliver Walters
2020-11-12 11:02:10 +11:00
parent ebac06ebee
commit 1532be9c1e
7 changed files with 158 additions and 19 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 3.0.7 on 2020-11-11 23:22
import InvenTree.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('company', '0028_remove_supplierpricebreak_cost'),
]
operations = [
migrations.AddField(
model_name='company',
name='currency',
field=models.CharField(blank=True, help_text='Default currency used for this company', max_length=3, validators=[InvenTree.validators.validate_currency_code], verbose_name='Currency'),
),
]