-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
[MIG][17.0] scrap_reason_code: Migration to 17.0 #1906
[MIG][17.0] scrap_reason_code: Migration to 17.0 #1906
Conversation
Also redefine reason code form view a bit.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-scrap_reason_code Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-scrap_reason_code/
Currently translated at 77.7% (14 of 18 strings) Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-scrap_reason_code Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-scrap_reason_code/es/
Currently translated at 100.0% (18 of 18 strings) Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-scrap_reason_code Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-scrap_reason_code/es/
Currently translated at 100.0% (18 of 18 strings) Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-scrap_reason_code Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-scrap_reason_code/fr/
Currently translated at 100.0% (18 of 18 strings) Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-scrap_reason_code Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-scrap_reason_code/it/
71eb11b
to
7d4b9c6
Compare
/ocabot migration scrap_reason_code |
move = scrap.move_id | ||
self.assertEqual(move.reason_code_id.id, self.reason_code.id) | ||
moves = scrap.move_ids | ||
self.assertEqual(moves.mapped("reason_code_id.id"), [self.reason_code.id]) |
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.
FYI, Odoo supports mapping through all relational records with dot. So, moves.reason_code_id.id
will work.
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.
@rousseldenis Thanks for looking into it.
I know that, but isn't there a technical possibility that moves are more than one record and moves.reason_code_id.id might end up in a singleton error?
edit: ...but maybe not in the context of this test, true.
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.
@john-herholz-dt The only case where you have that is if you put in the chain (without mapped()) another field (Boolean, Selection, Char,...)
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.
LGTM. Code and functional review
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 40f2504. Thanks a lot for contributing to OCA. ❤️ |
No description provided.