projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25bc377
)
[FIX] account: tax mapping logic was broken by 7508b7c
author
Olivier Dony
<odo@openerp.com>
Tue, 28 Oct 2014 12:30:26 +0000
(13:30 +0100)
committer
Olivier Dony
<odo@openerp.com>
Wed, 29 Oct 2014 15:44:55 +0000
(16:44 +0100)
The original tax should not be applied
if at least one destination tax was
applied. It should only be applied if
explicitly included in target taxes.
(Re-)Fixes #2261
addons/account/partner.py
patch
|
blob
|
history
diff --git
a/addons/account/partner.py
b/addons/account/partner.py
index
fa6dd0e
..
74fbbe1
100644
(file)
--- a/
addons/account/partner.py
+++ b/
addons/account/partner.py
@@
-79,11
+79,13
@@
class account_fiscal_position(osv.osv):
def map_tax(self, taxes):
result = self.env['account.tax'].browse()
for tax in taxes:
+ tax_count = 0
for t in self.tax_ids:
if t.tax_src_id == tax:
if t.tax_dest_id:
+ tax_count += 1
result |= t.tax_dest_id
- else:
+ if not tax_count:
result |= tax
return result