[FIX] stock_account_quantity_history_location: Remove domains.

Remove domains introduced in f4f1466973 that make the valuation incorrect.
This commit is contained in:
Víctor Martínez
2022-08-25 15:17:36 +02:00
committed by Pedro M. Baeza
parent 9240fd7129
commit 8403ed5ff1

View File

@@ -35,15 +35,4 @@ class StockQuantityHistory(models.TransientModel):
[("stock_move_id.location_dest_id", "=", self.location_id.id)],
]
)
else:
# Show 0 quantities on Inventory Valuation to display Account Valuation
# anomalies, such as, non 0 stock_value on cost_method FIFO
if self.env.context.get("active_model") == "stock.valuation.layer":
action["domain"] = expression.AND(
[action["domain"], [("quantity", "!=", 0)]]
)
else:
action["domain"] = expression.AND(
[action["domain"], [("qty_available", "!=", 0)]]
)
return action