mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX][account_reversal] When period is set on the reversal wizard. reversal_period_id is never transformed to a recordset
This commit is contained in:
committed by
Jordi Ballester
parent
776a7edb34
commit
49ddda5406
@@ -68,7 +68,9 @@ class account_move(models.Model):
|
||||
self.ensure_one()
|
||||
period_obj = self.env['account.period']
|
||||
|
||||
if not reversal_period_id:
|
||||
if reversal_period_id:
|
||||
reversal_period_id = period_obj.browse([reversal_period_id])[0]
|
||||
else:
|
||||
reversal_period_id = period_obj.with_context(
|
||||
company_id=self.company_id.id,
|
||||
account_period_prefer_normal=True).find(reversal_date)[0]
|
||||
|
||||
Reference in New Issue
Block a user