-
-
Notifications
You must be signed in to change notification settings - Fork 729
[18.0][MIG] stock_picking_import_serial_number: Migration to version 18.0 #2133
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] stock_picking_import_serial_number: Migration to version 18.0 #2133
Conversation
[UPD] Update stock_picking_import_serial_number.pot
You can't use a static assignation in kw args, and less the empty string, which is assigned as is on the char fields (and being different from NULL values).
Don't pass `default_code` in vals if no reference is provided, for letting other modules to work properly in integration tests like `product_code_mandatory` + `product_sequence`. stock_picking_import_serial_number 13.0.1.0.2
[UPD] Update stock_picking_import_serial_number.pot [BOT] post-merge updates
Currently translated at 100.0% (29 of 29 strings) Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_import_serial_number Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_import_serial_number/es/
Translated using Weblate (Italian) Currently translated at 100.0% (29 of 29 strings) Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_import_serial_number Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_import_serial_number/it/ Translated using Weblate (Italian) Currently translated at 100.0% (29 of 29 strings) Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_import_serial_number Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_import_serial_number/it/
Currently translated at 100.0% (29 of 29 strings) Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_import_serial_number Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_import_serial_number/it/
Adds the possibility to set the package name (stock.quant.package) in the import file to be auto-created with that name. TT47271 [UPD] Update stock_picking_import_serial_number.pot [BOT] post-merge updates Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_import_serial_number Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_import_serial_number/
Currently translated at 100.0% (32 of 32 strings) Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_import_serial_number Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_import_serial_number/it/
Currently translated at 100.0% (32 of 32 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_import_serial_number Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_import_serial_number/it/
bd092ee to
06d274a
Compare
|
/ocabot migration stock_picking_import_serial_number |
| cls.lot_obj = cls.env["stock.lot"] | ||
| cls.warehouse = cls.env.ref("stock.warehouse0") | ||
| cls.picking_type_in = cls.env.ref("stock.picking_type_in") | ||
| cls.picking_type_in = cls.env.ref("stock.picking_type_out") |
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 changing this? We want to try on incoming receptions.
stock_picking_import_serial_number/tests/test_stock_picking_import_serial_number.py
Outdated
Show resolved
Hide resolved
| name="%(action_import_serial_number)d" | ||
| string="Import S/N" | ||
| attrs="{'invisible': ['|', ('state', '!=', 'assigned'), ('picking_type_code', '!=', 'incoming')]}" | ||
| invisible="state != 'assigned' or picking_type_code != 'incoming'" |
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.
@pedrobaeza it should only work at the moment whit incoming, right? Anyways i do not see why it wont work with outgoings.
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.
With outgoing pickings, you have to check also for reservations, so there are so few steps. That's why the extra tests you removed.
9437904 to
926ec11
Compare
| wiz.action_import() | ||
| smls = self.picking_in_01.move_line_ids.filtered("lot_name") | ||
| self.assertEqual(len(smls), 3) | ||
| self.assertEqual(len(smls), 6) |
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 this change in the numbers? This shows that the implementation is not the same...
926ec11 to
b414d86
Compare
b414d86 to
c0b4496
Compare
|
@pedrobaeza I did change test to check for outgoings. |
| # TODO: Check if product is present on initial demand?? | ||
| # elif product and picking.move_lines.filtered(lambda ln: ln.product_id == product) | ||
| # elif product and picking.move_lines.filtered( | ||
| # lambda ln: ln.product_id == product) |
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.
Remove this commented code.
| ) | ||
| if picking.picking_type_id.show_reserved: | ||
| smls = stock_move_lines.filtered(lambda ln: ln.product_id == product) | ||
| if picking.picking_type_code == "incoming": |
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 this condition equivalent to the previous one?
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.
Actually it should be the other way around ( != ), but test keep failing. My question is if there is not show_reserved now, so everything is working as if show_reserved was false or am I missing something ?
cc @Tecnativa TT57280
ping @victoralmau @sergio-teruel
I change the test as show_reserved is no longer available in 18.0, I did remove that part as IMHO I think it is unnecessary.