mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_inventory_preparation_filter: Filtering by lots is adding all lots of products
Before this patch, if we create a stock inventory for some lots, we get a line for each lot of the products difined on lots. After this patch, we get the lines for the lots defined.
This commit is contained in:
committed by
Pedro M. Baeza
parent
b7259bbce3
commit
42fbf75768
@@ -71,6 +71,7 @@ Contributors
|
||||
* Pedro M. Baeza
|
||||
* David Vidal
|
||||
* Sergio Teruel
|
||||
* Carlos Roca
|
||||
|
||||
* Xavier Jimenez <xavier.jimenez@qubiq.es>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
* Pedro M. Baeza
|
||||
* David Vidal
|
||||
* Sergio Teruel
|
||||
* Carlos Roca
|
||||
|
||||
* Xavier Jimenez <xavier.jimenez@qubiq.es>
|
||||
|
||||
@@ -420,6 +420,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<li>Pedro M. Baeza</li>
|
||||
<li>David Vidal</li>
|
||||
<li>Sergio Teruel</li>
|
||||
<li>Carlos Roca</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Xavier Jimenez <<a class="reference external" href="mailto:xavier.jimenez@qubiq.es">xavier.jimenez@qubiq.es</a>></li>
|
||||
|
||||
Reference in New Issue
Block a user