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_from_amount

Inputs Method Outputs
for line in self:
            # A bracket starts where the previous one ends
            lower_brackets = line.scale_id.line_ids.filtered(lambda l: l.to_amount < line.to_amount)
            line.from_amount = max(lower_brackets.mapped('to_amount'), default=0.0)

Back to entity