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

Module: Shipment Advice

Entity: stock.picking

Compute Method: _compute_loaded_in_shipment

Inputs Method Outputs
for picking in self:
            # NOTE: Make overloading containers possible,
            # otherwise overloaded container would be marked as partially loaded
            picking.is_fully_loaded_in_shipment = (
                all(
                    line.shipment_advice_id and line.picked
                    for line in picking.move_line_ids
                )
                if picking.move_line_ids
                else False
            )
            picking.is_partially_loaded_in_shipment = (
                not picking.is_fully_loaded_in_shipment
                and any(
                    line.shipment_advice_id and line.picked
                    for line in picking.move_line_ids
                )
            )
            picking.loaded_shipment_advice_ids = (
                picking.move_line_ids.shipment_advice_id
            )

Back to entity