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

Module: Sales

Entity: sale.order

Compute Method: _compute_amount_undiscounted

Inputs Method Outputs
  • discount
  • price_subtotal
  • price_unit
  • product_uom_qty
for order in self:
            total = 0.0
            for line in order.order_line:
                total += (line.price_subtotal * 100)/(100-line.discount) if line.discount != 100 else (line.price_unit * line.product_uom_qty)
            order.amount_undiscounted = total

Back to entity