Skip to content

[18.0][MIG] stock_quant_manual_assign: Migration to 18.0#46

Open
oihane wants to merge 72 commits intoOCA:18.0from
avanzosc:18.0-mig-stock_quant_manual_assign
Open

[18.0][MIG] stock_quant_manual_assign: Migration to 18.0#46
oihane wants to merge 72 commits intoOCA:18.0from
avanzosc:18.0-mig-stock_quant_manual_assign

Conversation

@oihane
Copy link

@oihane oihane commented Dec 29, 2025

No description provided.

fanha99 and others added 30 commits December 29, 2025 13:44
* 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/
There are cases where auto-filling of qty_done of stock move line is not desirable.
e.g. you assign quants manually for some of the moves in a picking and not the others,
in such case you need to go over all the moves in the picking to either remove qty_done
or fill it in to proceed with the validation of the entire moves. Auto-fill behavior is
also troublesome when this function is used in a manufacturing order. i.e. having
qty_done of the component move live messes up the outcome of the production.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_quant_manual_assign
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_quant_manual_assign/
Currently translated at 100.0% (31 of 31 strings)

Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_quant_manual_assign
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_quant_manual_assign/fr/
Rodrigo Macedo and others added 12 commits December 29, 2025 13:44
Currently translated at 100.0% (34 of 34 strings)

Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_quant_manual_assign
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_quant_manual_assign/pt_BR/
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.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-17.0/stock-logistics-warehouse-17.0-stock_quant_manual_assign
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-stock_quant_manual_assign/
Currently translated at 100.0% (30 of 30 strings)

Translation: stock-logistics-warehouse-17.0/stock-logistics-warehouse-17.0-stock_quant_manual_assign
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-stock_quant_manual_assign/hr/
@oihane
Copy link
Author

oihane commented Dec 29, 2025

As required by @jbaudoux in #7 full commit history

cc @mav-adhoc

Copy link
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

Can you reduce the changes in stock_quant_manual_assign/tests/test_stock_quant_manual_assign.py to what is really required ?

@oihane oihane force-pushed the 18.0-mig-stock_quant_manual_assign branch 2 times, most recently from 7a8e923 to eed1a11 Compare December 29, 2025 16:39
@oihane
Copy link
Author

oihane commented Dec 29, 2025

Can you reduce the changes in stock_quant_manual_assign/tests/test_stock_quant_manual_assign.py to what is really required ?

@jbaudoux Changes done

Copy link

@Tisho99 Tisho99 left a comment

Choose a reason for hiding this comment

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

Thank you for the migration.

I have carried out both a functional and technical review, and the module works very well.

However, I have found two minor issues. Could they be reviewed?

@florian-dacosta
Copy link

Hello,

I have a question on this one.
In recent versions, such as the 18, it is possible to manually reserve a line selecting a stock quant.
image

From what I understand, this module do the same, in an other way. But I did not read anything about this in the README.

Would it be possible to explain the reason to use this module instead of sticking with the native way of doing it in the README?

@oihane oihane force-pushed the 18.0-mig-stock_quant_manual_assign branch from eed1a11 to d0ec635 Compare January 8, 2026 13:18
@Tisho99
Copy link

Tisho99 commented Jan 8, 2026

I agree with Florian that adding an explanation to the README stating that this feature is already covered by Odoo, and clarifying the reasons for using this module would be very helpful.

For me, the main reasons are a better user interface and legacy purposes.

@DavidJForgeFlow
Copy link

Hi @oihane , Thanks for the migration! There is this commit from v16.0 and pending to merge in v17.0 that would be good to include OCA/stock-logistics-warehouse#2418. Thanks!

@anajuaristi
Copy link

@florian-dacosta @Tisho99
It's not the same
With this module you select exactly the quants that you want to take from your inventory, including lot, package...
With standar option you are just creating stock_move_lines filling several fields for after done quant selection but you are not defining exactly the quant you want to use/reserve for this move.

Quite difficult to explain

Copy link

@Tisho99 Tisho99 left a comment

Choose a reason for hiding this comment

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

LGTM. Technical review.

However, I still think that explaining in the README the reason for using this module instead of the native approach would be a very nice improvement, as several users have raised this question.

@@ -0,0 +1,2 @@
from . import models
Copy link

Choose a reason for hiding this comment

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

This folder could also be deleted, as it is empty

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

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.