forked from erp-dev/erp
feat: added migrate for set id init value into 8000 of plate_order
This commit is contained in:
@@ -9,7 +9,7 @@ from . import models
|
||||
class PlateOrderAdmin(admin.ModelAdmin):
|
||||
list_display = (
|
||||
'id',
|
||||
'design_code',
|
||||
'design_code_display',
|
||||
'customer_name',
|
||||
'style_name',
|
||||
'plate_type',
|
||||
@@ -47,7 +47,7 @@ class PlateOrderAdmin(admin.ModelAdmin):
|
||||
'fields': ['customer', 'area', 'default_address', 'salesperson', 'merchandiser']
|
||||
}),
|
||||
('产品信息', {
|
||||
'fields': ['style_name', 'fabric', 'width', 'production_method']
|
||||
'fields': ['style_name', 'fabric', 'fabric_source', 'width', 'production_method']
|
||||
}),
|
||||
('开版信息', {
|
||||
'fields': [
|
||||
@@ -76,6 +76,10 @@ class PlateOrderAdmin(admin.ModelAdmin):
|
||||
}),
|
||||
]
|
||||
|
||||
@admin.display(description='设计编号')
|
||||
def design_code_display(self, obj):
|
||||
return obj.design_code or (str(obj.id) if obj.id else '-')
|
||||
|
||||
@admin.display(description='客户')
|
||||
def customer_name(self, obj):
|
||||
return obj.customer.name if obj.customer else '-'
|
||||
|
||||
Reference in New Issue
Block a user