changeset 3d301f66a371 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=3d301f66a371
description:
Filter by company when searching stock period for cache
issue8760
review282301002
diffstat:
move.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 47dab02eb748 -r 3d301f66a371 move.py
--- a/move.py Fri Oct 25 10:08:35 2019 +0200
+++ b/move.py Fri Oct 25 23:47:52 2019 +0200
@@ -1221,6 +1221,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