Skip to content

Conversation

@eduezerouali-tecnativa
Copy link
Contributor

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.

sergio-teruel and others added 16 commits October 3, 2025 07:11
[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/
@eduezerouali-tecnativa eduezerouali-tecnativa force-pushed the 18.0-mig-stock_picking_import_serial_number branch 2 times, most recently from bd092ee to 06d274a Compare October 13, 2025 08:19
@pedrobaeza
Copy link
Member

/ocabot migration stock_picking_import_serial_number

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 13, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 13, 2025
80 tasks
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")
Copy link
Member

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.

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'"
Copy link
Contributor Author

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.

Copy link
Member

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.

@eduezerouali-tecnativa eduezerouali-tecnativa force-pushed the 18.0-mig-stock_picking_import_serial_number branch 2 times, most recently from 9437904 to 926ec11 Compare October 16, 2025 14:17
wiz.action_import()
smls = self.picking_in_01.move_line_ids.filtered("lot_name")
self.assertEqual(len(smls), 3)
self.assertEqual(len(smls), 6)
Copy link
Member

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...

@eduezerouali-tecnativa eduezerouali-tecnativa force-pushed the 18.0-mig-stock_picking_import_serial_number branch from 926ec11 to b414d86 Compare October 21, 2025 09:06
@eduezerouali-tecnativa eduezerouali-tecnativa force-pushed the 18.0-mig-stock_picking_import_serial_number branch from b414d86 to c0b4496 Compare October 21, 2025 09:09
@eduezerouali-tecnativa
Copy link
Contributor Author

@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)
Copy link
Member

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":
Copy link
Member

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?

Copy link
Contributor Author

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 ?

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.