Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions stock_ux/models/stock_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _get_aggregated_product_quantities(self, **kwargs):
move_line_by_move = {}
for sml in self:
move = sml.move_id
if move and move.origin_description:
if move and move.origin_description and sml.picking_id.origin:
move_line_by_move.setdefault(
move.id,
{
Expand Down Expand Up @@ -143,7 +143,8 @@ def _get_aggregated_properties(self, move_line=False, move=False):
use_origin = (
self.env["ir.config_parameter"].sudo().get_param("stock_ux.delivery_slip_use_origin", "False") == "True"
)
if use_origin:
picking = move_line.picking_id if move_line else (move.picking_id if move else False)
if use_origin and picking and picking.origin:
move = move or move_line.move_id
uom = move.product_uom or move_line.product_uom_id
reference = move.product_id.display_name
Expand Down