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: Migration to 18.0 #1762

Closed
wants to merge 42 commits into from

Conversation

mav-adhoc
Copy link

No description provided.

@mav-adhoc mav-adhoc force-pushed the 18.0-mig-stock_restrict_lot branch 2 times, most recently from ced0f5b to 0a8d27d Compare November 12, 2024 20:26
@mav-adhoc mav-adhoc mentioned this pull request Nov 12, 2024
42 tasks
@mav-adhoc mav-adhoc force-pushed the 18.0-mig-stock_restrict_lot branch 2 times, most recently from a4d0fd8 to b031bfc Compare December 6, 2024 13:10
@rousseldenis
Copy link
Contributor

/ocabot migration stock_restrict_lot

@@ -1,7 +1,7 @@
{
"name": "Stock Restrict Lot",
"summary": "Base module that add back the concept of restrict lot on stock move",
"version": "17.0.1.1.0",
"version": "18.0.1.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to reset trailing numbers too (18.0.1.0.0). Thanks

@mav-adhoc mav-adhoc force-pushed the 18.0-mig-stock_restrict_lot branch from b031bfc to a13d2e7 Compare December 6, 2024 13:56
Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

Some tests from this module seem to be failing.

@mav-adhoc
Copy link
Author

@StefanRijnhart What should i do? Change the test? There is no change on the module's models

@StefanRijnhart
Copy link
Member

@mav-adhoc It must mean that the logic of the module no longer fits the exact processes in Odoo that it tries to change. This could be a very small detail, or it could mean that the Odoo process has been revised completely in the new edition. You'll have to study the changes in the way that Odoo handles lots between 17.0 and 18.0. You can start out by checking if all the methods that this module overrides still exist, and if their signatures are still the same.
Another strategy is to trace the tests in the old and new versions and see where the results start to diverge.

@mav-adhoc mav-adhoc force-pushed the 18.0-mig-stock_restrict_lot branch from a13d2e7 to 144b022 Compare December 26, 2024 17:19
@mav-adhoc
Copy link
Author

@StefanRijnhart Working on it!

@DavidJForgeFlow
Copy link
Contributor

Hi! Please add the changes added in #1840, thanks!

@mav-adhoc mav-adhoc force-pushed the 18.0-mig-stock_restrict_lot branch from 144b022 to e4f8c06 Compare January 24, 2025 16:42
@StefanRijnhart
Copy link
Member

This one needs to be included as well: #1859

badbole and others added 21 commits January 31, 2025 15:36
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/hr/
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/it/
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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/
@mav-adhoc mav-adhoc force-pushed the 18.0-mig-stock_restrict_lot branch from 1b007bb to 8cccde6 Compare January 31, 2025 18:42
DavidJForgeFlow and others added 2 commits February 3, 2025 11:53
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
```
@mav-adhoc mav-adhoc force-pushed the 18.0-mig-stock_restrict_lot branch from 8cccde6 to 7763851 Compare February 3, 2025 14:54
@rjaraspearhead
Copy link

@mav-adhoc, Can you review the tests to ensure they pass the actions?

pickings = self.env["stock.picking"].search(
[("group_id", "=", procurement_group.id)]
)
self.assertEqual(len(pickings), 1)

Choose a reason for hiding this comment

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

Not sure why this has been changed from 2 to 1 when the test comment above still mentions creating two pickings

@StefanRijnhart
Copy link
Member

Superseded by #1880

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.