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

[18.0][MIG] stock_restrict_lot #1880

Open
wants to merge 29 commits into
base: 18.0
Choose a base branch
from

Conversation

StefanRijnhart
Copy link
Member

@StefanRijnhart StefanRijnhart commented Feb 20, 2025

Continued from #1880

Tests were refactored to reflect that Odoo two-step delivery now uses a push from outgoing to customer.
Propagation of restricted lot was implemented for push operations.

@StefanRijnhart StefanRijnhart force-pushed the 18.0-mig-stock_restrict_lot branch from 2110566 to e5336be Compare February 20, 2025 16:17
@StefanRijnhart StefanRijnhart force-pushed the 18.0-mig-stock_restrict_lot branch 3 times, most recently from 851370d to ba3f065 Compare February 20, 2025 16:22
newtratip and others added 21 commits February 20, 2025 17:25
stock_restrict_lot 14.0.1.1.1
[UPD] Update stock_restrict_lot.pot

[UPD] README.rst
…rict_lot_id

Odoo tries to avoid extra stock.move while generating stock.picking from
pull/push rules. We must tell odoo to not merge stock.move if they are restricted
different lot.

To reproduce this behaviour using sale_order_lot_selection you have to:
* setup inventory with multi-step routes
* setup warehouse with two steps outgoing shipments
* receive products with different lot
* create a sale order with different quantities per lot
* validate the sale order

Before this PR stock.move in the internal stock.picking pick order are merged

After this PR we have one line per selected lot in internal stock.picking pick order

stock_restrict_lot 15.0.0.0.2
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_restrict_lot
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_restrict_lot/
Currently translated at 100.0% (6 of 6 strings)

Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_restrict_lot
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_restrict_lot/es/
Currently translated at 100.0% (8 of 8 strings)

Translation: stock-logistics-workflow-17.0/stock-logistics-workflow-17.0-stock_restrict_lot
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-stock_restrict_lot/it/
DavidJForgeFlow and others added 2 commits February 20, 2025 17:26
The outgoing quantity is different depending on whether mrp is loaded, as the
demo data of that module adds an outgoing quantity of 3.
In the test, use a copy of the demo product to ensure there are no preexisting
stock operations.

Fixes
```
odoo.addons.stock_restrict_lot.tests.test_restrict_lot: FAIL: TestRestrictLot.test_compute_quantites
Traceback (most recent call last):
  File "/__w/stock-logistics-workflow/stock-logistics-workflow/stock_restrict_lot/tests/test_restrict_lot.py", line 254, in test_compute_quantites
    self.assertEqual(product.outgoing_qty, 2)
AssertionError: 5.0 != 2
```
@StefanRijnhart StefanRijnhart force-pushed the 18.0-mig-stock_restrict_lot branch 2 times, most recently from f90b710 to 94fec85 Compare February 20, 2025 16:39
@StefanRijnhart StefanRijnhart marked this pull request as draft February 20, 2025 16:50
Tests were refactored to reflect that Odoo two-step delivery now uses a push
from outgoing to customer. Propagation of restricted lot was implemented for
push operations.
@StefanRijnhart StefanRijnhart force-pushed the 18.0-mig-stock_restrict_lot branch from 94fec85 to 7595f3f Compare February 20, 2025 17:31
@StefanRijnhart StefanRijnhart marked this pull request as ready for review February 20, 2025 17:35
@StefanRijnhart
Copy link
Member Author

/ocabot migration stock_restrict_lot

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Feb 20, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 20, 2025
41 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.