summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/tukar_guling.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py
index 1f5e786f..740bb7d7 100644
--- a/indoteknik_custom/models/tukar_guling.py
+++ b/indoteknik_custom/models/tukar_guling.py
@@ -366,10 +366,11 @@ class TukarGuling(models.Model):
# Create return lines
return_lines = []
for move in picking.move_lines:
- if move.quantity_done > 0:
+ qty = move.quantity_done or move.product_uom_qty
+ if qty > 0:
return_lines.append((0, 0, {
'product_id': move.product_id.id,
- 'quantity': move.quantity_done,
+ 'quantity': qty,
'move_id': move.id,
}))
if not return_lines: