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
  • tax_dest_active
  • tax_src_id
  • tax_src_id.id
  • tax_dest_id
  • tax_dest_id.id
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
            position.tax_map = dict(tax_map)

Back to entity