EMA
* adds Ema model (basically Compensation inherited) * adds index view for EMAs * fixes drop-down link bug for menu 'More' in navbar * refactors some more forms to use process_request() * adds modified attribute to BaseResource for easy last_modified check * adds setting of modified attribute in all places where UserAction.EDITED is added to log * adds EMA_ACCOUNT_IDENTIFIER_LENGTH and EMA_ACCOUNT_IDENTIFIER_TEMPLATE to ema/settings.py * adds EmaAdmin to ema/admin.py * fixes wrong title in intervention detail view html for revocations * adds support for subtitle variable to BaseTable and generic_index.html * drops next_version attribute from models * adds/updates translations * adds default ordering for UserActionLogEntry * removes extra ordering in log modal rendering
This commit is contained in:
@@ -203,6 +203,8 @@ class EditInterventionForm(NewInterventionForm):
|
||||
action=UserAction.EDITED
|
||||
)
|
||||
self.instance.log.add(user_action)
|
||||
self.instance.modified = user_action
|
||||
self.instance.save()
|
||||
|
||||
return self.instance
|
||||
|
||||
@@ -381,6 +383,8 @@ class NewRevocationForm(BaseModalForm):
|
||||
document=document,
|
||||
created=created_action,
|
||||
)
|
||||
self.instance.modified = edited_action
|
||||
self.instance.save()
|
||||
self.instance.log.add(edited_action)
|
||||
self.instance.legal.revocation = revocation
|
||||
self.instance.legal.save()
|
||||
@@ -553,6 +557,8 @@ class NewWithdrawForm(BaseModalForm):
|
||||
action=UserAction.CREATED
|
||||
)
|
||||
self.instance.log.add(user_action_edit)
|
||||
self.instance.modified = user_action_edit
|
||||
self.instance.save()
|
||||
|
||||
# Create withdraw depending on Intervention or EcoAccount as the initial instance
|
||||
if self.is_intervention_initially:
|
||||
|
||||
Reference in New Issue
Block a user