changeset 4d1d16d227fe in modules/stock:5.2
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=4d1d16d227fe
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 18cbe374c267 -r 4d1d16d227fe move.py
--- a/move.py Wed Oct 16 21:27:48 2019 +0200
+++ b/move.py Fri Oct 25 23:47:52 2019 +0200
@@ -1213,6 +1213,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