it_manager/locations: редактор шаблона этикеток, раздельная печать QR/EAN и карточка поставщика.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-07 16:40:48 +03:00
parent 82ad90c661
commit d54f6fbe42
18 changed files with 1192 additions and 66 deletions
+6 -2
View File
@@ -118,7 +118,7 @@ class PortalVendorForm(forms.ModelForm):
fields = (
'name', 'location_region',
'street', 'house_number', 'building', 'apartment',
'comments', 'is_active',
'location', 'comments', 'is_active',
)
widgets = {
'name': forms.TextInput(attrs={
@@ -130,6 +130,10 @@ class PortalVendorForm(forms.ModelForm):
'house_number': forms.TextInput(attrs={'class': 'input'}),
'building': forms.TextInput(attrs={'class': 'input'}),
'apartment': forms.TextInput(attrs={'class': 'input'}),
'location': forms.TextInput(attrs={
'class': 'input',
'placeholder': '46.4825,30.7233',
}),
'comments': forms.Textarea(attrs={'class': 'input', 'rows': 2}),
'is_active': forms.CheckboxInput(),
}
@@ -138,7 +142,7 @@ class PortalVendorForm(forms.ModelForm):
super().__init__(*args, **kwargs)
self.fields['name'].required = True
self.fields['location_region'].widget.attrs['class'] = 'input'
for optional in ('street', 'house_number', 'building', 'apartment', 'comments'):
for optional in ('street', 'house_number', 'building', 'apartment', 'comments', 'location'):
self.fields[optional].required = False
def clean_name(self):