changeset 0b95c5a1588d in modules/stock_quantity_issue:6.2 details: https://hg.tryton.org/modules/stock_quantity_issue?cmd=changeset&node=0b95c5a1588d description: Use company from user and filter moves on company
issue11025 review374411002 (grafted from 0d7834d5ffefdc0ed74d22f468cd4c8abdb36378) diffstat: stock.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (27 lines): diff -r d43bc9d76c49 -r 0b95c5a1588d stock.py --- a/stock.py Mon Nov 01 17:15:59 2021 +0100 +++ b/stock.py Thu Dec 16 22:21:10 2021 +0100 @@ -195,13 +195,13 @@ If warehouses is specified it checks the stock only for them. """ pool = Pool() - Company = pool.get('company.company') Date = pool.get('ir.date') Location = pool.get('stock.location') Move = pool.get('stock.move') Product = pool.get('product.product') ProductQuantitiesByWarehouse = pool.get( 'stock.product_quantities_warehouse') + User = pool.get('res.user') transaction = Transaction() today = Date.today() @@ -210,7 +210,7 @@ ('type', '=', 'warehouse'), ]) if company is None: - company = Company(transaction.context.get('company')) + company = User(Transaction().user).company # Do not keep former open issues as they may no more be valid opens = cls.search([