fix: responsive
This commit is contained in:
@@ -6,7 +6,7 @@ from django.shortcuts import get_object_or_404, render
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.views.generic import CreateView, DeleteView, DetailView, ListView, UpdateView, View
|
||||
|
||||
from backoffice.forms import ProductInitialPriceForm, ProductVariantForm
|
||||
from backoffice.forms import ProductInitialPriceForm, ProductPriceForm, ProductVariantForm
|
||||
from backoffice.mixins import (
|
||||
BackofficeCRUDMixin,
|
||||
BackofficeHtmxMixin,
|
||||
@@ -109,7 +109,7 @@ class ProductCreateView(BackofficeCRUDMixin, BackofficeStyledFormMixin, CreateVi
|
||||
if price_form.cleaned_data.get('price') is not None:
|
||||
ProductPrice.objects.create(
|
||||
product=self.object,
|
||||
price=price_form.cleaned_data['price'],
|
||||
price=price_form.get_price_without_tax(),
|
||||
tax=price_form.cleaned_data['tax'],
|
||||
current=True,
|
||||
)
|
||||
@@ -378,9 +378,9 @@ class ProductVariantDeleteView(BackofficeCRUDMixin, BackofficeModalDeleteMixin,
|
||||
|
||||
class ProductPriceCreateView(BackofficeCRUDMixin, BackofficeModalFormMixin, CreateView):
|
||||
model = ProductPrice
|
||||
form_class = ProductPriceForm
|
||||
permission_required = 'shop.add_productprice'
|
||||
section = SECTION
|
||||
fields = ('price', 'tax', 'current')
|
||||
template_name = 'backoffice/generic/form.html'
|
||||
fragment_template_name = FORM_FRAGMENT
|
||||
|
||||
@@ -408,9 +408,9 @@ class ProductPriceCreateView(BackofficeCRUDMixin, BackofficeModalFormMixin, Crea
|
||||
|
||||
class ProductVariantPriceCreateView(BackofficeCRUDMixin, BackofficeModalFormMixin, CreateView):
|
||||
model = ProductPrice
|
||||
form_class = ProductPriceForm
|
||||
permission_required = 'shop.add_productprice'
|
||||
section = SECTION
|
||||
fields = ('price', 'tax', 'current')
|
||||
template_name = 'backoffice/generic/form.html'
|
||||
fragment_template_name = FORM_FRAGMENT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user