mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[MIG] stock_picking_report_product_sticker: Migration to 16.0
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user