History Save
Bases: Model
Attributes
save_model_history
When set, history will be saved. By default, ALL models must save history.
Classes
Functions
save
OverRides save for keeping model history.
Not a Full-Override as this is just to add to existing.
Before to fetch from DB to ensure the changed value is the actual changed value and the after is the data that was saved to the DB.
save_history
Save Model History
This method must be re-implemented by the model class in question so that the history model can be passed to this function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
before |
dict
|
Model data before the change |
required |
after |
dict
|
Model data after the change |
required |
history_model |
Model
|
History model class |
None
|
Returns:
Name | Type | Description |
---|---|---|
False |
bool
|
Failed to save history |
True |
bool
|
Successfully saved history |
None |
None
|
history_model was not specified |
About:
This page forms part of our Project Centurion ERP.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2024-06-16
Date Edited: 2024-07-13
Contribution:
Would You like to contribute to our Centurion ERP project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors