changeset dee4f72ef04b in modules/product_cost_history:default
details: 
https://hg.tryton.org/modules/product_cost_history?cmd=changeset&node=dee4f72ef04b
description:
        Include outgoing moves in history computation

        issue10206
        review366171003
diffstat:

 product.py |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (19 lines):

diff -r ddb0a53aa41f -r dee4f72ef04b product.py
--- a/product.py        Thu Oct 21 00:13:42 2021 +0200
+++ b/product.py        Thu Oct 28 08:58:56 2021 +0200
@@ -104,10 +104,11 @@
 
         tables, clause = Move.search_domain([
                 ('state', '=', 'done'),
-                Product()._domain_moves_cost(),
-                # Incoming moves
-                ('to_location.type', '=', 'storage'),
-                ('from_location.type', '!=', 'storage'),
+                Product._domain_moves_cost(),
+                ['OR',
+                    Product._domain_in_moves_cost(),
+                    Product._domain_out_moves_cost(),
+                    ],
                 ], tables={
                 None: (move, None),
                 })

Reply via email to