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

[MIG][17.0] scrap_reason_code: Migration to 17.0 #1906

Merged
merged 38 commits into from
Jan 17, 2024

Conversation

john-herholz-dt
Copy link

No description provided.

Bhavesh Odedra and others added 30 commits December 21, 2023 11:02
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/
Ivorra78 and others added 8 commits December 21, 2023 11:02
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/
@rousseldenis
Copy link
Contributor

/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])
Copy link
Contributor

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.

Copy link
Author

@john-herholz-dt john-herholz-dt Dec 22, 2023

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.

Copy link
Contributor

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,...)

Copy link
Contributor

@rousseldenis rousseldenis left a 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

@gurneyalex
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-1906-by-gurneyalex-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 16cded5 into OCA:17.0 Jan 17, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 40f2504. Thanks a lot for contributing to OCA. ❤️

@john-herholz-dt john-herholz-dt deleted the 17.0-mig-scrap_reason_code branch January 17, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.