diff --git a/stock_inventory_preparation_filter/README.rst b/stock_inventory_preparation_filter/README.rst index 9cda631e3..a80dba9a4 100644 --- a/stock_inventory_preparation_filter/README.rst +++ b/stock_inventory_preparation_filter/README.rst @@ -64,6 +64,7 @@ Contributors * Pedro M. Baeza * David Vidal * Sergio Teruel + * Carlos Roca * Xavier Jimenez * Iván Todorovich diff --git a/stock_inventory_preparation_filter/models/stock_inventory.py b/stock_inventory_preparation_filter/models/stock_inventory.py index 2c67721ab..7cc1759e0 100644 --- a/stock_inventory_preparation_filter/models/stock_inventory.py +++ b/stock_inventory_preparation_filter/models/stock_inventory.py @@ -75,3 +75,9 @@ class StockInventory(models.Model): domain = safe_eval(self.product_domain) products = Product.search(domain) return products + + 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 4735cad78..c05b95e7c 100644 --- a/stock_inventory_preparation_filter/readme/CONTRIBUTORS.rst +++ b/stock_inventory_preparation_filter/readme/CONTRIBUTORS.rst @@ -4,6 +4,7 @@ * Pedro M. Baeza * David Vidal * Sergio Teruel + * Carlos Roca * Xavier Jimenez * Iván Todorovich diff --git a/stock_inventory_preparation_filter/static/description/index.html b/stock_inventory_preparation_filter/static/description/index.html index fc0bec3d1..01472a460 100644 --- a/stock_inventory_preparation_filter/static/description/index.html +++ b/stock_inventory_preparation_filter/static/description/index.html @@ -3,7 +3,7 @@ - + Extended Inventory Preparation Filters