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
  • Loading branch information
Maximiliano Mezzavilla authored and pablohmontenegro committed Jan 27, 2023
1 parent 44e10c3 commit 8f3e3d7
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -60,6 +60,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 @@ -191,7 +195,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 @@ -220,7 +224,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 8f3e3d7

Please sign in to comment.