|
@@ -123,12 +123,17 @@ class InvoiceAdmin(admin.ModelAdmin):
|
|
|
"""
|
|
|
if obj and obj.validated:
|
|
|
if self.declared_fieldsets:
|
|
|
- return flatten_fieldsets(self.declared_fieldsets)
|
|
|
+ ro_fields = flatten_fieldsets(self.declared_fieldsets)
|
|
|
else:
|
|
|
- return list(set(
|
|
|
+ ro_fields = list(set(
|
|
|
[field.name for field in self.opts.local_fields] +
|
|
|
[field.name for field in self.opts.local_many_to_many]
|
|
|
))
|
|
|
+ try:
|
|
|
+ ro_fields.remove("status")
|
|
|
+ except:
|
|
|
+ pass
|
|
|
+ return ro_fields
|
|
|
return self.readonly_fields
|
|
|
|
|
|
def get_inline_instances(self, request, obj=None):
|