changeset 622190993208 in modules/product_cost_history:6.0
details: 
https://hg.tryton.org/modules/product_cost_history?cmd=changeset&node=622190993208
description:
        Take the full partition as frame to get last value of cost

        issue10861
        review366091002
        (grafted from ddb0a53aa41faf0790fbbe0ce474b9dca6c03c84)
diffstat:

 product.py |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r ef63f4c46b84 -r 622190993208 product.py
--- a/product.py        Mon May 03 15:44:26 2021 +0200
+++ b/product.py        Thu Oct 21 00:13:42 2021 +0200
@@ -97,6 +97,7 @@
         if database.has_window_functions():
             window = Window(
                 [move.effective_date, move.product],
+                frame='ROWS', start=None, end=None,
                 order_by=[move.write_date.asc, move.id.asc])
             cost_price = LastValue(move.cost_price, window=window)
         else:
@@ -124,6 +125,7 @@
         if database.has_window_functions():
             window = Window(
                 [price_date, history.product],
+                frame='ROWS', start=None, end=None,
                 order_by=[price_datetime.asc])
             cost_price = LastValue(history.cost_price, window=window)
         else:

Reply via email to