buttons in table footer

This commit is contained in:
2025-07-11 20:26:02 +03:00
parent d72cf0a0b3
commit d986fdf232
46 changed files with 1828 additions and 1720 deletions
+8 -6
View File
@@ -25,9 +25,11 @@ class ContainerExpeditionForm(ContainerBaseForm):
Inherits from ContainerBaseForm.
"""
class Meta(ContainerBaseForm.Meta):
exclude = ['created_on',
'created_by',
'deleted',
'deleted_on',
'deleted_by',
'received'] # Exclude fields that should not be set by the user
fields = ['number', 'expedition_vehicle', 'position', 'line', 'container_type', 'damages', 'heavy_damaged']
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
readonly_fields = ['number', 'position', 'line', 'container_type', 'damages', 'heavy_damaged']
for field in readonly_fields:
self.fields[field].widget.attrs['readonly'] = True
self.fields[field].disabled = True