Use only stock move with cost price for product cost price history

The cost price on stock move is only required by validation so we can not
ensure over time that all the stock moves selected have a cost price.

Closes #12468
(grafted from adea1ec5dd32ec8f1a353a6f3105b82707485914)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2023-08-12 20:10:06 +02:00
1 parent 696e8095cc
commit 0861096f67
1 file changed
+1
+1
View File
@@ -85,6 +85,7 @@ class ProductCostHistory(ModelSQL, ModelView):
database = Transaction().database
tables, clause = Move.search_domain([
('cost_price', '!=', None),
('state', '=', 'done'),
Product()._domain_moves_cost(),
# Incoming moves