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

Module: Valued Picking Report

Entity: stock.picking

Compute Method: _compute_amount_all

Inputs Method Outputs
  • sale_price_subtotal
  • sale_price_tax
"""This is computed with sudo for avoiding problems if you don't have
        access to sales orders (stricter warehouse users, inter-company
        records...).
        """
for pick in self:
            amount_untaxed = amount_tax = 0.0
            for line in pick.move_line_ids:
                amount_untaxed += line.sale_price_subtotal
                amount_tax += line.sale_price_tax
            pick.update(
                {
                    "amount_untaxed": amount_untaxed,
                    "amount_tax": amount_tax,
                    "amount_total": amount_untaxed + amount_tax,
                }
            )

Back to entity