-
-
Notifications
You must be signed in to change notification settings - Fork 782
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
[18.0][MIG] account_journal_lock_date: Migration to 18.0 #2007
[18.0][MIG] account_journal_lock_date: Migration to 18.0 #2007
Conversation
The test failed on travis (not on a local install) because the admin users if part of the Adviser group. Make sure we have the right group and add a test for that feature too.
- Change in journal the existing 'Lock date' by two dates, the same as in company. - Add a wizard to allows a massive update of those dates for several journals at the same time.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-financial-tools-13.0/account-financial-tools-13.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-13-0/account-financial-tools-13-0-account_journal_lock_date/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-financial-tools-13.0/account-financial-tools-13.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-13-0/account-financial-tools-13-0-account_journal_lock_date/
Currently translated at 20.0% (4 of 20 strings) Translation: account-financial-tools-14.0/account-financial-tools-14.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-14-0/account-financial-tools-14-0-account_journal_lock_date/it/
…vent test errors since odoo/odoo@81aac30 TT33774
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_journal_lock_date/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_journal_lock_date/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_journal_lock_date/
Currently translated at 100.0% (19 of 19 strings) Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_journal_lock_date/it/
Currently translated at 100.0% (19 of 19 strings) Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_journal_lock_date/ca/
Currently translated at 100.0% (19 of 19 strings) Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_journal_lock_date Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_journal_lock_date/ca/
16ffc18
to
9a720d9
Compare
6ce7f06
to
085819e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason to refactor the tests? Was it just to increase coverage or were some of the tests no longer working?
/ocabot migration account_journal_lock_date |
48d3436
to
fea736b
Compare
Please check test failure:
|
fea736b
to
67c5f1a
Compare
@StefanRijnhart, Thanks for the suggestion.Please Review. |
|
||
# Use patch as a context manager as you're doing now | ||
with patch.object( | ||
type(self.account_move_obj), "_get_chains_to_hash", patched_get_chains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to patch this method? I'm thinking, assertRaisesRegex
famously does not apply a cursor savepoint like assertRaises does (I suggested odoo/odoo#134471 for that). Maybe the error is also prevented by applying a savepoint explicitely on line 74:
with self.assertRaisesRegex(
UserError, ".*prior to and inclusive of the lock date.*"
):
with self.env.cr.savepoint():
Can you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the savepoint context manager, but I was hoping it could replace the patch above. Did you check if that works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StefanRijnhart, i changed as per your suggestions! Thanks.Please Review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But now the test no longer demonstrates the mechanisms to avoid the checks. Why did you change that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And please tell me you do not just feed my comments to your AI codebot.
67c5f1a
to
cc49fa7
Compare
@StefanRijnhart, Please Review. |
156372c
to
5b055b9
Compare
5b055b9
to
7b347f7
Compare
I'm sorry, I don't like how large changes to tests appear and then disappear without any clarification, and you did not deny that you were just feeding my comments to an LLM. You're asking for a rereview before tests are green so I'm superseding this with #2048 which IMHO is a more comprehensive migration. |
No description provided.