[MIG] stock_picking_report_product_sticker: Migration to 16.0

This commit is contained in:
Eduardo De Miguel
2024-07-31 10:17:14 +02:00
parent 8280f82b2e
commit 40b4233c23
3 changed files with 7 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Stock Picking Report - Product Sticker",
"version": "15.0.1.0.2",
"version": "16.0.1.0.0",
"author": "Moduon, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/stock-logistics-reporting",
@@ -18,6 +18,6 @@
"report/report_deliveryslip.xml",
"data/menus.xml",
],
"maintainers": ["Shide"],
"maintainers": ["Shide", "rafaelbn"],
"installable": True,
}

View File

@@ -30,13 +30,13 @@ class StockPicking(models.Model):
picking.picking_type_id.show_product_stickers
)
@api.depends("show_product_stickers", "move_lines.product_id")
@api.depends("show_product_stickers", "move_line_ids.product_id")
def _compute_sticker_ids(self):
self.sticker_ids = False
for picking in self:
if not picking.show_product_stickers:
continue
products = picking.move_lines.product_id
products = picking.move_line_ids.product_id
stickers = products.get_product_stickers()
if stickers:
picking.sticker_ids = stickers

View File

@@ -24,17 +24,16 @@ class ProductStickerStockCommon(ProductStickerCommon):
"picking_type_id": picking_type.id,
"location_id": self.stock_location.id,
"location_dest_id": self.supplier_location.id,
"move_lines": [
"move_line_ids": [
(
0,
0,
{
"name": product.name,
"product_id": product.id,
"product_uom": product.uom_id.id,
"product_uom_id": product.uom_id.id,
"location_id": self.stock_location.id,
"location_dest_id": self.supplier_location.id,
"product_uom_qty": 1,
"qty_done": 1,
},
)
for product in products