mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] account_banking: Fix for bug whereby statement imports made on the first day of the year use the opening period rather than the normal period for that day.
This commit is contained in:
@@ -426,7 +426,10 @@ class account_bank_statement(osv.osv):
|
||||
'''
|
||||
Find matching period for date, not meant for _defaults.
|
||||
'''
|
||||
if context is None:
|
||||
context = {}
|
||||
period_obj = self.pool.get('account.period')
|
||||
context['account_period_prefer_normal'] = True
|
||||
periods = period_obj.find(cursor, uid, dt=date, context=context)
|
||||
return periods and periods[0] or False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user