Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Small improvements
Anna Siwikf6b4b56f0ed9
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.pyindex da64ad50a3..9c0610dd72 100644--- a/saleor/dashboard/product/forms.py+++ b/saleor/dashboard/product/forms.py@@ -293,6 +293,17 @@ class ProductVariantForm(forms.ModelForm, AttributesMixin):.prefetch_related('values'))self.prepare_fields_for_attributes()+ if include_taxes_in_prices():+ self.fields['price_override'].label = pgettext_lazy(+ 'Override price', 'Selling gross price override')+ self.fields['cost_price'].label = pgettext_lazy(+ 'Currency amount', 'Cost gross price')+ else:+ self.fields['price_override'].label = pgettext_lazy(+ 'Override price', 'Selling net price override')+ self.fields['cost_price'].label = pgettext_lazy(+ 'Currency amount', 'Cost net price')+def save(self, commit=True):attributes = self.get_saved_attributes()self.instance.attributes = attributesdiff --git a/templates/checkout/details.html b/templates/checkout/details.htmlindex 79a5719f7c..9d54f5c4e4 100644--- a/templates/checkout/details.html+++ b/templates/checkout/details.html@@ -69,25 +69,20 @@</div></div>{% with total=checkout.get_total %}- <div class="row checkout__review__section">- <div class="col-8">- {% if site.settings.display_gross_prices %}- <p>{% trans "Taxes (included)" context "Order review section title" %}</p>- {% else %}- <p>{% trans "Taxes" context "Order review section title" %}</p>- {% endif %}- </div>- <div class="col-4">- <p class="float-right">{% price total.tax %}</p>+ {% if checkout.are_taxes_handled %}+ <div class="row checkout__review__section">+ <div class="col-8">+ {% if site.settings.display_gross_prices %}+ <p>{% trans "Taxes (included)" context "Order review section title" %}</p>+ {% else %}+ <p>{% trans "Taxes" context "Order review section title" %}</p>+ {% endif %}+ </div>+ <div class="col-4">+ <p class="float-right">{% price total.tax %}</p>+ </div></div>- <div class="col-12">- {% if not checkout.are_taxes_handled %}- <small class="form-text text-muted">- <p>{% trans "Calculating tax rates in delivery country is not supported" context "Order review section title" %}</p>- </small>- {% endif %}- </div>- </div>+ {% endif %}<div class="row checkout__review__section"><div class="col-12"><h3>{% trans "Promo code" context "Order review section title" %}</h3>diff --git a/templates/dashboard/product/detail.html b/templates/dashboard/product/detail.htmlindex 627e894b59..d9785c94eb 100644--- a/templates/dashboard/product/detail.html+++ b/templates/dashboard/product/detail.html@@ -110,7 +110,7 @@{% trans "Net price" %}{% endif %}</th>- <th class="right-align">{% trans "Gross margin" %}</th>+ <th class="right-align">{% trans "Margin" %}</th>{% if perms.product.edit_product %}<th></th>{% endif %}@@ -213,11 +213,7 @@</tr><tr><td>- {% if site.settings.include_taxes_in_prices %}- {% trans "Gross margin" context "Product field" %}- {% else %}- {% trans "Net margin" context "Product field" %}- {% endif %}+ {% trans "Margin" context "Product field" %}</td><td class="right-align">{% if margin %}diff --git a/templates/dashboard/product/product_variant/detail.html b/templates/dashboard/product/product_variant/detail.htmlindex 002675539c..b3f97bbab3 100644--- a/templates/dashboard/product/product_variant/detail.html+++ b/templates/dashboard/product/product_variant/detail.html@@ -127,11 +127,7 @@</tr><tr><td>- {% if site.settings.include_taxes_in_prices %}- {% trans "Gross margin" context "Product field" %}- {% else %}- {% trans "Net margin" context "Product field" %}- {% endif %}+ {% trans "Margin" context "Product field" %}</td><td class="right-align">{% if margin %}diff --git a/templates/dashboard/taxes/list.html b/templates/dashboard/taxes/list.htmlindex 9bc63737f8..433d97b010 100644--- a/templates/dashboard/taxes/list.html+++ b/templates/dashboard/taxes/list.html@@ -124,7 +124,7 @@{% trans "Configure taxes" context "Site settings configure taxes action" %}</a><a class="btn-flat waves-effect load-action" href="{% url 'dashboard:fetch-tax-rates' %}">- {% trans "Fetch newest tax rates" context "Site settings fetch tax rates action" %}+ {% trans "Fetch tax rates" context "Site settings fetch tax rates action" %}</a></div>{% endif %}