-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
[FIX] product_configurator (Sessions being removed) #65
[FIX] product_configurator (Sessions being removed) #65
Conversation
Hi @PCatinean, |
@dreispt Here is the fix PR for the session deleting issue and it's ready for your review. Also, Travis was failing due to a compute method singleton error so this also includes the small fix to make this green. |
@patrickrwilson @dreispt I doubt that the vacuum method of the TransientModel is deleting the session. |
@bizzappdev thanks for your feedback, we did originally look at the website module as the culprit however it wasn't installed which lead us down the path to discover the vacuum being the cause. I worked with @dreispt to troubleshoot and sure enough after a bit of time when the vacuum would run the sessions would be 'cleaned' out, which causes problems since sessions can contain pertanent information like custom values. |
@patrickrwilson thank you for your answer. if it was not that cron. then something else.
|
Hello @bizzappdev, we are pretty sure the Autovacuum is deleting the records. The objects are already regular Models, and then we see code inheriting them as TransientModel, which is not something that should be done, and should be fixed anyway. It is correct you want to clean up old sessions. |
@patrickrwilson I'm thinking, we need to leave the workbench clean when we leave: should these files be moved out of the Wizards subdiretory? |
I will also try to investigate why it is marking the Session as a transient model. |
@dreispt @patrickrwilson |
@bizzappdev thank you for your input, I was able to test commenting out the unlink method and the sessions do stay now and do not get deleted when the vacuum runs. |
@patrickrwilson I like better to just comment out the unlink method Bizzappdev pointed out. |
Revert "[IMP] Change from Transient to regular Model" This reverts commit 88cc8fe. [FIX] commented out unlink method
Travis failed due to singleton error while
e345b58
to
ee3b1bf
Compare
@bizzappdev can you review please? |
LGTM |
This PR has the |
@dreispt proceed further for the merge. it has been approved. and it is a critical bug fix. |
/ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 3654af6. Thanks a lot for contributing to OCA. ❤️ |
The product.config.session model is a regular model however the wizards that inherit are set a transient models. This is causing sessions to be deleted when the vacuum cleaner runs. Since sessions can contain important information like custom values, they shouldn't be deleted by the vacuum so this changes the transient models to regular models.
If it's desired to 'clean' sessions periodically a scheduled action is suggested as it can provide more control over cleanup depending on individual needs.