mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] Avoid a crash when the next period doesn't exist (for example : you are in December 2013 and FY 2014 is not created yet).
Add prefer_normal_period in period selection.
This commit is contained in:
@@ -65,6 +65,7 @@ class account_move(orm.Model):
|
||||
period_obj = self.pool.get('account.period')
|
||||
period_ctx = context.copy()
|
||||
period_ctx['company_id'] = move.company_id.id
|
||||
period_ctx['account_period_prefer_normal'] = True
|
||||
|
||||
if not reversal_period_id:
|
||||
reversal_period_id = period_obj.find(
|
||||
|
||||
Reference in New Issue
Block a user