Skip to content

Commit

Permalink
IMP l10n_it_account adding _get_tax_amount to be used by electronic i…
Browse files Browse the repository at this point in the history
…nvoices (OCA#606)
  • Loading branch information
eLBati authored and TheMule71 committed Nov 11, 2022
1 parent 4310145 commit 14c29ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions l10n_it_account/models/account_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ class AccountTax(models.Model):
'account.tax', 'account_tax_filiation_rel', 'child_tax', 'parent_tax',
string='Parent Taxes')

def _get_tax_amount(self):
self.ensure_one()
res = 0.0
if self.amount_type == 'group':
for child in self.children_tax_ids:
res += child.amount
else:
res = self.amount
return res

def _get_tax_name(self):
self.ensure_one()
name = self.name
Expand Down

0 comments on commit 14c29ca

Please sign in to comment.