changeset 3e9a4bf90473 in modules/stock:4.8
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=3e9a4bf90473
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 14e8a2ce3a7b -r 3e9a4bf90473 move.py
--- a/move.py   Wed Oct 16 21:27:48 2019 +0200
+++ b/move.py   Fri Oct 25 23:47:52 2019 +0200
@@ -1282,6 +1282,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