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 committed Nov 9, 2018
1 parent 26b0a54 commit 0f47cdc
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 0f47cdc

Please sign in to comment.