Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
for line in self: total_cost = line.purchase_price * line._get_product_qty() line.margin = line._get_subtotal() - total_cost
Back to entity