Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][IMP] l10n_ar_account_tax_settlement: Se creo el metodo get_account_id #173

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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