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
AccountTax = self.env['account.tax']
for order in self:
            subtotal = 0
            for line in order.order_line:
                base_line = line._prepare_base_line_for_taxes_computation(discount=0)
                # Exclude global discounts and down payments
                if not base_line.get('special_type'):
                    AccountTax._add_tax_details_in_base_line(base_line, order.company_id)
                    subtotal += base_line['tax_details']['raw_total_excluded_currency']
            order.amount_undiscounted = subtotal

Back to entity