Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Invoicing
Entity: account.fiscal.position
Compute Method: _compute_tax_map
| Inputs | Method | Outputs |
|---|---|---|
|
for position in self:
tax_map = defaultdict(list)
- for tl in position.tax_ids:
- if tl.tax_dest_active:
- tax_map[tl.tax_src_id.id].append(tl.tax_dest_id.id)
- else:
- tax_map[tl.tax_src_id.id] # map to an empty list
+ for dest_tax in position.tax_ids:
+ for src_tax in dest_tax.original_tax_ids:
+ tax_map[src_tax.id].append(dest_tax.id)
position.tax_map = dict(tax_map)
|
|
