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

[17.0][IMP] RMA - refactor to use procurement run #397

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

victoralmau
Copy link
Member

@victoralmau victoralmau commented Jun 25, 2024

FWP from 16.0: #402 + #392

Extra changes:

  • Change reception_move_ids to reception_move_id
  • Add test_rma_replace_pick_ship
  • Code and method reduction to simplify logic
  • Set route_ids (in/out) from procurements

Please @pedrobaeza and @chienandalu can you review it?

@Tecnativa TT48789

@OCA-git-bot
Copy link
Contributor

Hi @chienandalu, @pedrobaeza,
some modules you are maintaining are being modified, check this out!

rma/models/stock_picking.py Outdated Show resolved Hide resolved
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pedrobaeza pedrobaeza added this to the 17.0 milestone Jun 27, 2024
@pedrobaeza
Copy link
Member

Testing in the runboat http://oca-rma-17-0-pr397-605691345d56.runboat.odoo-community.org to return a delivery order marking the RMA option, I get:

imagen

@victoralmau
Copy link
Member Author

victoralmau commented Jun 28, 2024

Reviewing the error you indicate, I see that it is a side effect of something that already happens currently in v17 and v16, if the user does NOT have the locations permission, the picking that is created does NOT have the correct data (location and picking_type_id).

This does not happen in tests because the user that is used does have this permission, I will review it to fix it.

victoralmau and others added 2 commits June 28, 2024 17:11
The location_id field is important and its value is required, we need to add it
to the wizard (even if it is hidden) so that it is saved and the picking is
created correctly.

Before, the location_id value was only saved (although the field was not in the
wizard) if the user had the "Technical / Manage Multiple Stock Locations" permission.
Extra changes:
- Change reception_move_ids to reception_move_id
- Add test_rma_replace_pick_ship
- Code and method reduction to simplify logic
- Set route_ids (in/out) from procurements

Co-authored-by: Michael Tietz

TT48789
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-397-by-pedrobaeza-bump-major, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d805a6c into OCA:17.0 Jul 1, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza pedrobaeza deleted the 17.0-imp-rma-TT48789 branch July 1, 2024 23:32
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.

None yet

5 participants