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][MIG] stock_quant_manual_assign #2071

Open
wants to merge 64 commits into
base: 17.0
Choose a base branch
from

Conversation

mav-adhoc
Copy link
Contributor

No description provided.

@rousseldenis
Copy link
Contributor

/ocabot migration stock_quant_manual_assign

@OCA-git-bot
Copy link
Contributor

The migration issue (#1883) has not been updated to reference the current pull request because a previous pull request (#1973) is not closed.
Perhaps you should check that there is no duplicate work.
CC @siemenv

@rousseldenis
Copy link
Contributor

@mav-adhoc Could you review #1973 instead ?

@mav-adhoc
Copy link
Contributor Author

@rousseldenis Hi! i can't review a PR in OCA but if you prefer i can close this PR.

@rousseldenis
Copy link
Contributor

@mav-adhoc Ok, thanks.

@rousseldenis
Copy link
Contributor

@mav-adhoc So, could you fix this ?

fanha99 and others added 16 commits July 23, 2024 09:54
* Better layout
* Remove active_id dependency in some computed fields
* Clean code
* Refine constraint
* Take into account if the current line is previously reserved before clicking on the button.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_quant_manual_assign
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_quant_manual_assign/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_quant_manual_assign
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_quant_manual_assign/
@mav-adhoc mav-adhoc force-pushed the 17.0-mig-stock_quant_manual_assign branch from c67cdaf to e5b0e65 Compare September 3, 2024 17:17
@mav-adhoc
Copy link
Contributor Author

@rousseldenis Suggested changes done! I think the PR is ready to be merged.

Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Thanks for the updates!

@mav-adhoc
Copy link
Contributor Author

@antoniocanovas Can you review again please? Thanks!

@mav-adhoc
Copy link
Contributor Author

@rousseldenis I think the PR is ready to be merged! If you think i should make another change tell me! Thanks!

@mav-adhoc
Copy link
Contributor Author

@antoniocanovas Hi! Can you review the PR again please? Thanks!

@mav-adhoc
Copy link
Contributor Author

@rousseldenis Hi! Can we merge this PR? Thanks

@mav-adhoc
Copy link
Contributor Author

@tafaRU @sebalix @JordiBForgeFlow @jbaudoux Hi! can someone review this PR please? Thanks!

@rousseldenis
Copy link
Contributor

/ocabot migration stock_quant_manual_assign

@OCA-git-bot OCA-git-bot mentioned this pull request Oct 17, 2024
50 tasks
@florenciafrigieri2
Copy link
Contributor

@rousseldenis Hi! Is it possible to merge this PR?

@mav-adhoc
Copy link
Contributor Author

@rousseldenis @tafaRU @sebalix @JordiBForgeFlow @jbaudoux Hi! Can we merge this PR? We need to migrate this module to 18.0

@mav-adhoc
Copy link
Contributor Author

@rousseldenis Hi! Sorry to bother you! I am just worried why this PR is not moving forward

@yostashiro
Copy link
Member

@mav-adhoc This PR seems to be missing the following commits. Can you please include them?

9f3eeb2
c7dc47b

@LoisRForgeFlow
Copy link
Contributor

@mav-adhoc A friendly reminder here, would you take care of the previous @yostashiro comment?

@mav-adhoc
Copy link
Contributor Author

@yostashiro @LoisRForgeFlow Done!

@LoisRForgeFlow
Copy link
Contributor

@mav-adhoc Thanks! could you now check CI? It is failing in one of the tests of this module https://github.com/OCA/stock-logistics-warehouse/actions/runs/12869470900/job/35878347321?pr=2071#step:8:412

@yostashiro
Copy link
Member

The changes from my commit need to be adjusted (simplified) because of #2071 (comment)...

@mav-adhoc mav-adhoc force-pushed the 17.0-mig-stock_quant_manual_assign branch 2 times, most recently from 4f2a3ac to 3707b31 Compare January 20, 2025 17:25
This commit fixes the following issues:

- The previous code does not handle the immediate transfer scenario when
  auto_fill_qty_done is selected in the operation type. This raises a missing-record
  error, trying to update qty_done on non-existing move line records.
- move._do_unreserve() keeps existing stock.move.line records if there is some
  qty_done set, which is not a desirable outcome. All the linked move line records
  should be unlinked before selected quants are assigned.
@mav-adhoc mav-adhoc force-pushed the 17.0-mig-stock_quant_manual_assign branch from 3707b31 to 5a0657a Compare January 20, 2025 17:38
@mav-adhoc
Copy link
Contributor Author

@yostashiro What do you recommend me to do?

@yostashiro
Copy link
Member

@AungKoKoLin1997 Can you please help suggest adjustments? I'm a bit tied up.

Comment on lines +66 to +72
if move.picking_type_id.auto_fill_qty_done:
if move.from_immediate_transfer:
move.quantity_done = self.lines_qty
else:
# Auto-fill all lines as done
for ml in move.move_line_ids:
ml.qty_done = ml.reserved_uom_qty
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no auto_fill_qty_done anymore and the distinction between immediate and planned transfers is eliminated from odoo17. Then, qty done and reserved qty are merged into one column as quantity field.
So, I think we can remove this part.

2,
"There are 2 quants selected",
)
self.assertEqual(sum(self.move.move_line_ids.mapped("qty_done")), 0.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.assertEqual(sum(self.move.move_line_ids.mapped("qty_done")), 0.0)
self.assertEqual(sum(self.move.move_line_ids.mapped("quantity")), 150.0)

wizard = self._create_wizard()
self._process_basic_manual_assign_steps(wizard)
wizard.assign_quants()
self.assertEqual(sum(self.move.move_line_ids.mapped("qty_done")), 150.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.assertEqual(sum(self.move.move_line_ids.mapped("qty_done")), 150.0)
self.assertEqual(sum(self.move.move_line_ids.mapped("quantity")), 150.0)

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.