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.tax

Compute Method: _compute_is_used

Inputs Method Outputs
used_taxes = set(self.sudo().search([
            ('id', 'in', self.ids),
            '|',
            ('account_move_line_ids', '!=', False),
            ('account_reconcile_model_line_ids', '!=', False),
        ]))
for tax in self:
            tax.is_used = tax in used_taxes

Back to entity