From 80d05a3ba16c09e356a699ab1b1db837f785d313 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 24 May 2021 12:53:13 +0300 Subject: Added currency --- servo/models/product.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'servo/models') diff --git a/servo/models/product.py b/servo/models/product.py index 83bef0e..379df9d 100644 --- a/servo/models/product.py +++ b/servo/models/product.py @@ -2,14 +2,14 @@ import re from os.path import basename +from decimal import Decimal, ROUND_CEILING from django.db import models from django.db import connection +from django.urls import reverse from django.conf import settings from django.core.files import File from django.core.cache import cache -from decimal import Decimal, ROUND_CEILING -from django.urls import reverse from django.contrib.contenttypes.fields import GenericRelation @@ -108,6 +108,12 @@ class AbstractBaseProduct(models.Model): verbose_name=_("VAT %") ) + currency = models.CharField( + max_length=3, + default='', + editable=False, + ) + fixed_price = models.BooleanField( default=False, help_text=_("Don't update price when recalculating prices or importing parts") -- cgit v1.2.3