[FIX] Normal periods now take priority over special periods when importing statements.

This commit is contained in:
Tom Pickering
2013-12-13 10:45:24 +00:00
parent 29db41c860
commit 096e782550

View File

@@ -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