From 40b4233c231a08cd07badd359d9e04069c89ed40 Mon Sep 17 00:00:00 2001 From: Eduardo De Miguel Date: Wed, 31 Jul 2024 10:17:14 +0200 Subject: [PATCH] [MIG] stock_picking_report_product_sticker: Migration to 16.0 --- stock_picking_report_product_sticker/__manifest__.py | 4 ++-- .../models/stock_picking.py | 4 ++-- stock_picking_report_product_sticker/tests/common.py | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/stock_picking_report_product_sticker/__manifest__.py b/stock_picking_report_product_sticker/__manifest__.py index c9e935b..ba0eff0 100644 --- a/stock_picking_report_product_sticker/__manifest__.py +++ b/stock_picking_report_product_sticker/__manifest__.py @@ -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, } diff --git a/stock_picking_report_product_sticker/models/stock_picking.py b/stock_picking_report_product_sticker/models/stock_picking.py index caf00c7..007218f 100644 --- a/stock_picking_report_product_sticker/models/stock_picking.py +++ b/stock_picking_report_product_sticker/models/stock_picking.py @@ -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 diff --git a/stock_picking_report_product_sticker/tests/common.py b/stock_picking_report_product_sticker/tests/common.py index d11ea9e..35f14f8 100644 --- a/stock_picking_report_product_sticker/tests/common.py +++ b/stock_picking_report_product_sticker/tests/common.py @@ -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