mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[fix] on the first/last day on the year, avoid choosing the opening/closing period.
This commit is contained in:
@@ -213,7 +213,10 @@ class AccountBankSatement(Model):
|
|||||||
"""
|
"""
|
||||||
Find matching period for date, used in the statement line creation.
|
Find matching period for date, used in the statement line creation.
|
||||||
"""
|
"""
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
period_obj = self.pool.get('account.period')
|
period_obj = self.pool.get('account.period')
|
||||||
|
context['account_period_prefer_normal'] = True
|
||||||
periods = period_obj.find(cr, uid, dt=date, context=context)
|
periods = period_obj.find(cr, uid, dt=date, context=context)
|
||||||
return periods and periods[0] or False
|
return periods and periods[0] or False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user