[FIX] account: correct v8 version of map_tax() method of account.fiscal.postion
This commit is contained in:
parent
c5b517696d
commit
e29a7b7b4c
|
@ -66,16 +66,16 @@ class account_fiscal_position(osv.osv):
|
||||||
result.add(t.id)
|
result.add(t.id)
|
||||||
return list(result)
|
return list(result)
|
||||||
|
|
||||||
@api.v8
|
@api.v8 # noqa
|
||||||
def map_tax(self, taxes):
|
def map_tax(self, taxes):
|
||||||
result = taxes.browse()
|
result = set()
|
||||||
for tax in taxes:
|
for tax in taxes:
|
||||||
found = False
|
|
||||||
for t in self.tax_ids:
|
for t in self.tax_ids:
|
||||||
if t.tax_src_id == tax:
|
if t.tax_src_id == tax:
|
||||||
|
if t.tax_dest_id:
|
||||||
result |= t.tax_dest_id
|
result |= t.tax_dest_id
|
||||||
found = True
|
break
|
||||||
if not found:
|
else:
|
||||||
result |= tax
|
result |= tax
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue