-
-
Notifications
You must be signed in to change notification settings - Fork 882
[18.0][MIG] purchase_stock_secondary_unit: Migration to version 18.0 #2811
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
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] purchase_stock_secondary_unit: Migration to version 18.0 #2811
Conversation
…ss the secondary unit from a purchase order to the related pickings
…r a purchase order is confirmed
Must be AGPL, as it depends on AGPL.
1. Automatic module migration to 14.0 by odoo-module-migrator 2. migrate failing unit test: Replace action_done by button_validate 3. black, isort, prettier (pre-commit) 4. setup added 5. added german translation
…ndary_qty from procurement
Currently translated at 100.0% (2 of 2 strings) Translation: purchase-workflow-15.0/purchase-workflow-15.0-purchase_stock_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_stock_secondary_unit/es/
… uom on stock moves linked to po lines
… as qty_done in sml's
649edcc
to
37b8b93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
self.assertEqual(picking.move_lines.secondary_uom_qty, 0.0) | ||
self.assertFalse(picking.move_lines.secondary_uom_id) | ||
self.assertEqual(picking.move_lines.product_uom_qty, 10.0) | ||
self.assertEqual(picking.move_line_ids.secondary_uom_qty, 0.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you changing model operations (stock.move) by model detailed operations (stock.move.line)
The same applies to several of the changes in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right no need, should be move_ids.
37b8b93
to
15e660e
Compare
picking = self.purchase_order.picking_ids | ||
picking.action_assign() | ||
picking.move_line_ids.qty_done = picking.move_lines.product_uom_qty | ||
picking.move_ids.quantity = picking.move_ids.product_uom_qty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is needed change picking.move_line_ids
?
Test was changed due to now odoo auto set quantity if available.
15e660e
to
b907393
Compare
cc @Tecnativa TT57652
ping @carlosdauden @sergio-teruel