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

Module: Contract Price Revision

Entity: contract.line

Compute Method: _compute_variation_percent

Inputs Method Outputs
for line in self:
            if line.price_unit and line.previous_price:
                line.variation_percent = (
                    line.price_unit / line.previous_price - 1
                ) * 100
            else:
                line.variation_percent = 0.0

Back to entity