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
  • Loading branch information
eLBati committed Oct 31, 2018
1 parent d446220 commit ba4e228
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_it_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{
'name': 'Italian Localization - Account',
'version': '11.0.1.2.0',
'version': '11.0.1.2.1',
'category': 'Hidden',
'author': "Agile Business Group, Abstract, "
"Odoo Community Association (OCA)",
Expand Down
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 @@ -18,6 +18,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 ba4e228

Please sign in to comment.