Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Argentina - Payment Withholdings

Entity: l10n_ar.earnings.scale.line

Compute Method: _compute_fixed_amount

Inputs Method Outputs
for line in self:
            # ARCA publishes this column, but it only accumulates what the previous brackets withhold
            lower_brackets = line.scale_id.line_ids.filtered(lambda l: l.to_amount < line.to_amount)
            line.fixed_amount = sum(
                (bracket.to_amount - bracket.from_amount) * bracket.percentage / 100
                for bracket in lower_brackets
            )

Back to entity