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

Module: Inventory

Entity: stock.picking

Compute Method: _compute_shipping_weight

Inputs Method Outputs
for picking in self:
            # if shipping weight is not assigned => default to calculated product weight
            packages_weight = picking.move_line_ids.result_package_id.sudo()._get_weight(picking.id)
            picking.shipping_weight = (
                picking.weight_bulk +
                sum(pack.shipping_weight or packages_weight[pack] for pack in picking.move_line_ids.result_package_id)
            )

Back to entity