Calculate cached quantities for inactive locations when closing a stock period
Closes #14664 (grafted from 33b64863cfc720f5f65754f1898a93cf09419d63) --HG-- branch : 6.0
This commit is contained in:
@@ -115,9 +115,10 @@ class Period(Workflow, ModelSQL, ModelView):
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute(*query)
|
||||
|
||||
locations = Location.search([
|
||||
('type', 'not in', ['warehouse', 'view']),
|
||||
], order=[])
|
||||
with Transaction().set_context(active_test=False):
|
||||
locations = Location.search([
|
||||
('type', 'not in', ['warehouse', 'view']),
|
||||
], order=[])
|
||||
today = Date.today()
|
||||
|
||||
recent_date = max(period.date for period in periods)
|
||||
|
||||
Reference in New Issue
Block a user