Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea: invoice change history #502

Open
TreyWW opened this issue Sep 29, 2024 · 7 comments
Open

idea: invoice change history #502

TreyWW opened this issue Sep 29, 2024 · 7 comments
Assignees
Labels
discussion idea: accepted This idea has been accepted. Awaiting implementation. idea

Comments

@TreyWW
Copy link
Owner

TreyWW commented Sep 29, 2024

How big is this feature?

Small

Describe the problem

At the moment if a user changes something, apart from possibly an audit log, you can't recover it. It may be nice to have a version history of invoices when users change things. Even a table of audit logs, with the ability to "go back to" via a button.

awaiting more details, feel free to chip in!

Describe a possible solution

No response

@TreyWW TreyWW added idea discussion idea: accepted This idea has been accepted. Awaiting implementation. labels Sep 29, 2024
@tomasandrejdes
Copy link

Hello, I would like solve this issue.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 8, 2024

Hi @tomasandrejdes,

That's fine, may I just ask that you update the issue as you do research/any reviews of the code before you start making changes?

E.g documenting a possible solution, diagrams if easier, model structure, etc.

May I also ask for an ETA when this can be started? Just helps keep it organised. Otherwise we get old issues with no progress.

Thanks!

@tomasandrejdes
Copy link

Hi,
I plan to start in the following days. I will write here with my findings and potential solutions.

@tomasandrejdes
Copy link

Hi,
I want to ask, do you have a concrete idea of ​​how you would like it resolved?
Do you want the invoice history record to be editable again?
Or it is enough that the original record is only for display.
Can I create a new table in the database?

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 29, 2024

Hey @tomasandrejdes,

Yeah the history should basically just store every field. Similar to "Django-simple-history"

But no libraries.

So with this it should be really easy to "go back" to an old version and replace all content.

Yeah a new model will definitely be needed. It may need dynamic fields though and if we change a field it still needs to handle old versions.

Do let me know if you have anything else, more than happy to go over it. If you have discord feel free to
DM me, I'm much more active and will respond quicker there.

Thanks!

@tomasandrejdes
Copy link

Thanks for now, I will write when I have discrepancies

@tomasandrejdes
Copy link

Hello,
if you want we can switch to discord please send me your name.

I created a new InvoiceHistory model, I store the invoice id, timestamp, record version and a JSON field that should contain all the invoice attributes.
I also modified the manage.html template, for the history overview.
In the attachment, I am sending a screen of the overview.
Snímka obrazovky 2024-10-31 o 9 21 13
Snímka obrazovky 2024-10-31 o 14 47 09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion idea: accepted This idea has been accepted. Awaiting implementation. idea
Projects
None yet
Development

No branches or pull requests

2 participants