Skip to content

Commit 8a3ae8c

Browse files
eLBatiTonyMasciI
authored andcommitted
IMP l10n_it_account adding _get_tax_amount to be used by electronic invoices (OCA#606)
1 parent e9d677e commit 8a3ae8c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

l10n_it_account/models/account_tax.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ class AccountTax(models.Model):
1717
'account.tax', 'account_tax_filiation_rel', 'child_tax', 'parent_tax',
1818
string='Parent Taxes')
1919

20+
def _get_tax_amount(self):
21+
self.ensure_one()
22+
res = 0.0
23+
if self.amount_type == 'group':
24+
for child in self.children_tax_ids:
25+
res += child.amount
26+
else:
27+
res = self.amount
28+
return res
29+
2030
def _get_tax_name(self):
2131
self.ensure_one()
2232
name = self.name

0 commit comments

Comments
 (0)