Skip to content

Commit

Permalink
[IMP] l10n_ar_account_tax_settlement: Se creo el metodo get_account_id
Browse files Browse the repository at this point in the history
Task: 28331
X-original-commit: 1ea2509
  • Loading branch information
Maximiliano Mezzavilla authored and pablohmontenegro committed Oct 9, 2023
1 parent 57eec2b commit 64625b6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class InflationAdjustment(models.TransientModel):
string="Asiento de apertura",
)

def get_account_id(self, line):

return line.get('account_id')[0]

@api.model
def default_get(self, field_list):
res = super(InflationAdjustment, self).default_get(field_list)
Expand Down Expand Up @@ -187,7 +191,7 @@ def FormatAmount(amount):
else:
adjustment = self.company_id.currency_id.round(adjustment)
lines.append({
'account_id': line.get('account_id')[0],
'account_id': self.get_account_id(line),
'name': _('Ajuste por inflación cuentas al inicio '
'(%s * %.2f%%)') % (
FormatAmount(line.get('balance')), initial_factor * 100.0),
Expand Down Expand Up @@ -215,7 +219,7 @@ def FormatAmount(amount):
else:
adjustment = self.company_id.currency_id.round(adjustment)
lines.append({
'account_id': line.get('account_id')[0],
'account_id': self.get_account_id(line),
'name': _('Ajuste por inflación %s '
'(%s * %.2f%%)') % (
format_date(self.env, date_from, date_format='MM/Y'),
Expand Down

0 comments on commit 64625b6

Please sign in to comment.