mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[fix] similarly fix another _get_period
This commit is contained in:
@@ -576,9 +576,12 @@ class AccountBankSatementLine(Model):
|
||||
"""Return matching period for a date."""
|
||||
if context is None:
|
||||
context = {}
|
||||
period_obj = self.pool['account.period']
|
||||
date = context.get('date')
|
||||
local_context = context.copy()
|
||||
local_context['account_period_prefer_normal'] = True
|
||||
try:
|
||||
periods = self.pool.get('account.period').find(cr, uid, dt=date)
|
||||
periods = period_obj.find(cr, uid, dt=date, context=local_context)
|
||||
except osv.except_osv:
|
||||
# if no period defined, we are certainly at installation time
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user