From adc4cf19a5156a102a27caf6a035466f54298ecd Mon Sep 17 00:00:00 2001
From: Meritxell Abellan <meritxell.abellan@forgeflow.com>
Date: Thu, 28 Nov 2024 11:08:29 +0100
Subject: [PATCH] [MIG] stock_quant_reservation_info: Migration to 17.0

---
 stock_quant_reservation_info/__manifest__.py           | 2 +-
 stock_quant_reservation_info/models/stock_quant.py     | 2 +-
 stock_quant_reservation_info/views/stock_move_line.xml | 4 ++--
 stock_quant_reservation_info/views/stock_quant.xml     | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/stock_quant_reservation_info/__manifest__.py b/stock_quant_reservation_info/__manifest__.py
index e43eb2f70356..8a0e02f7788f 100644
--- a/stock_quant_reservation_info/__manifest__.py
+++ b/stock_quant_reservation_info/__manifest__.py
@@ -4,7 +4,7 @@
 {
     "name": "Stock Move Reservation Info",
     "summary": "Allows to see the reserved info of Products",
-    "version": "16.0.1.0.1",
+    "version": "17.0.1.0.1",
     "author": "ForgeFlow, Odoo Community Association (OCA)",
     "website": "https://github.com/OCA/stock-logistics-warehouse",
     "category": "Generic",
diff --git a/stock_quant_reservation_info/models/stock_quant.py b/stock_quant_reservation_info/models/stock_quant.py
index 26d3d8b8d86f..bbb16760ed23 100644
--- a/stock_quant_reservation_info/models/stock_quant.py
+++ b/stock_quant_reservation_info/models/stock_quant.py
@@ -28,7 +28,7 @@ def action_reserved_moves(self):
             "context": {},
             "domain": [
                 ("product_id", "=", self.product_id.id),
-                ("reserved_uom_qty", ">", 0),
+                ("quantity_product_uom", ">", 0),
                 ("location_id", "=", self.location_id.id),
                 ("lot_id", "=", self.lot_id.id),
                 ("owner_id", "=", self.owner_id.id),
diff --git a/stock_quant_reservation_info/views/stock_move_line.xml b/stock_quant_reservation_info/views/stock_move_line.xml
index d6edf189ac77..5884cdf9669f 100644
--- a/stock_quant_reservation_info/views/stock_move_line.xml
+++ b/stock_quant_reservation_info/views/stock_move_line.xml
@@ -12,10 +12,10 @@
                     class="btn btn-link text-info"
                     icon="fa-arrow-right"
                     title="Related Document"
-                    attrs="{'invisible': [('picking_id', '=', False)]}"
+                    invisible="not picking_id"
                 />
                 <field name="origin" />
-                <field name="reserved_uom_qty" />
+                <field name="quantity_product_uom" />
             </tree>
         </field>
     </record>
diff --git a/stock_quant_reservation_info/views/stock_quant.xml b/stock_quant_reservation_info/views/stock_quant.xml
index 75cb611c4608..381f0996068e 100644
--- a/stock_quant_reservation_info/views/stock_quant.xml
+++ b/stock_quant_reservation_info/views/stock_quant.xml
@@ -9,7 +9,7 @@
                 <button
                     name="action_reserved_moves"
                     type="object"
-                    attrs="{'invisible': [('reserved_quantity', '=', 0)]}"
+                    invisible="reserved_quantity == 0"
                     class="btn btn-link text-info"
                     icon="fa-info-circle"
                     title="Reserved Moves"
@@ -28,7 +28,7 @@
                 <button
                     name="action_reserved_moves"
                     type="object"
-                    attrs="{'invisible': [('reserved_quantity', '=', 0)]}"
+                    invisible="reserved_quantity == 0"
                     class="btn btn-link text-info"
                     icon="fa-info-circle"
                     title="Reserved Moves"