changeset 362dd0ecb376 in modules/stock:5.0
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=362dd0ecb376
description:
        Filter by company when searching stock period for cache

        issue8760
        review282301002
        (grafted from 3d301f66a3713b2398e2a3baec5804f6dd2eecd9)
diffstat:

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

diffs (11 lines):

diff -r 9692cb9c1210 -r 362dd0ecb376 move.py
--- a/move.py   Wed Oct 16 21:27:48 2019 +0200
+++ b/move.py   Fri Oct 25 23:47:52 2019 +0200
@@ -1230,6 +1230,7 @@
             periods = Period.search([
                     ('date', '<=', context['stock_date_end']),
                     ('state', '=', 'closed'),
+                    ('company', '=', company.id if company else -1),
                     ], order=[('date', 'DESC')], limit=1)
             if periods:
                 period, = periods

Reply via email to