Use company from user and filter moves on company

issue11025
review374411002
(grafted from 0d7834d5ffefdc0ed74d22f468cd4c8abdb36378)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2021-12-16 22:21:10 +01:00
1 parent a2dec3809c
commit a11de4cfc5
1 file changed
+2 -2
+2 -2
View File
@@ -195,13 +195,13 @@ class QuantityIssue(
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 @@ class QuantityIssue(
('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([