diff --git a/stock_inventory_preparation_filter/README.rst b/stock_inventory_preparation_filter/README.rst index e6784f253..1afa57aa1 100644 --- a/stock_inventory_preparation_filter/README.rst +++ b/stock_inventory_preparation_filter/README.rst @@ -71,6 +71,7 @@ Contributors * Pedro M. Baeza * David Vidal * Sergio Teruel + * Carlos Roca * Xavier Jimenez diff --git a/stock_inventory_preparation_filter/models/stock_inventory.py b/stock_inventory_preparation_filter/models/stock_inventory.py index 3128207dd..fa1281a47 100644 --- a/stock_inventory_preparation_filter/models/stock_inventory.py +++ b/stock_inventory_preparation_filter/models/stock_inventory.py @@ -67,3 +67,9 @@ class StockInventory(models.Model): if products: inventory.product_ids = [(6, 0, products.ids)] return super()._action_start() + + def _get_inventory_lines_values(self): + vals = super()._get_inventory_lines_values() + if self.filter == "lots": + vals = list(filter(lambda x: x["prod_lot_id"] in self.lot_ids.ids, vals)) + return vals diff --git a/stock_inventory_preparation_filter/readme/CONTRIBUTORS.rst b/stock_inventory_preparation_filter/readme/CONTRIBUTORS.rst index 73ee8a368..1f7433cf8 100644 --- a/stock_inventory_preparation_filter/readme/CONTRIBUTORS.rst +++ b/stock_inventory_preparation_filter/readme/CONTRIBUTORS.rst @@ -4,5 +4,6 @@ * Pedro M. Baeza * David Vidal * Sergio Teruel + * Carlos Roca * Xavier Jimenez diff --git a/stock_inventory_preparation_filter/static/description/index.html b/stock_inventory_preparation_filter/static/description/index.html index 2d7b90ae1..ca1cc5a6b 100644 --- a/stock_inventory_preparation_filter/static/description/index.html +++ b/stock_inventory_preparation_filter/static/description/index.html @@ -420,6 +420,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Pedro M. Baeza
  • David Vidal
  • Sergio Teruel
  • +
  • Carlos Roca
  • Xavier Jimenez <xavier.jimenez@qubiq.es>