Skip to content

Commit

Permalink
[FIX] l10n_ar_account_tax_settlement: analytic account asiento ajuste…
Browse files Browse the repository at this point in the history
… inflación

Ticket: 64177
  • Loading branch information
pablohmontenegro committed Aug 1, 2023
1 parent c2be400 commit d21ab2e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions l10n_ar_account_tax_settlement/wizards/inflation_adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class InflationAdjustment(models.TransientModel):
domain=[('deprecated', '=', False)],
required=True,
)
analytic_account_id = fields.Many2one(
'account.analytic.account',
'Analytic Account',
analytic_distribution = fields.Json(
)
start_index = fields.Float(
compute='_compute_index',
Expand Down Expand Up @@ -197,7 +195,7 @@ def FormatAmount(amount):
FormatAmount(line.get('balance')), initial_factor * 100.0),
'date_maturity': before_date_from,
'debit' if adjustment > 0 else 'credit': abs(adjustment),
'analytic_account_id': self.analytic_account_id.id,
'analytic_distribution': line.analytic_distribution,
})
adjustment_total[
'debit' if adjustment > 0 else 'credit'] += abs(adjustment)
Expand Down Expand Up @@ -228,7 +226,7 @@ def FormatAmount(amount):
period.get('factor') * 100.0),
'date_maturity': period.get('date_from'),
'debit' if adjustment > 0 else 'credit': abs(adjustment),
'analytic_account_id': self.analytic_account_id.id,
'analytic_distribution': line.analytic_distribution,
})
adjustment_total[
'debit' if adjustment > 0 else 'credit'] += abs(adjustment)
Expand All @@ -248,7 +246,7 @@ def FormatAmount(amount):
self.date_from, self.date_to),
'debit' if adj_diff < 0 else 'credit': abs(adj_diff),
'date_maturity': self.date_to,
'analytic_account_id': self.analytic_account_id.id,
'analytic_distribution': line.analytic_distribution,
})

# Generate account.move
Expand Down

0 comments on commit d21ab2e

Please sign in to comment.