changeset 0d7834d5ffef in modules/stock_quantity_issue:default
details:
https://hg.tryton.org/modules/stock_quantity_issue?cmd=changeset&node=0d7834d5ffef
description:
Use company from user and filter moves on company
issue11025
review374411002
diffstat:
stock.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 6e1c4685eaeb -r 0d7834d5ffef stock.py
--- a/stock.py Mon Dec 13 23:10:12 2021 +0100
+++ b/stock.py Thu Dec 16 22:21:10 2021 +0100
@@ -194,13 +194,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()
@@ -209,7 +209,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([