Skip to content

Commit 9e565c1

Browse files
authored
[6505][IMP] stock_outgoing_shipment_report: fall back to product template to identify stock secondary UoM (#250)
[6505][IMP] stock_outgoing_shipment_report: fall back to product template to identify stock secondary UoM (#250)
1 parent 31a4e04 commit 9e565c1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

stock_outgoing_shipment_report/models/stock_picking.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def generate_stock_outgoing_shipment_report(self):
2727
"client_order_ref": sale_line.client_order_ref,
2828
"memo": sale_line.note[:9] if sale_line.note else False,
2929
}
30-
secondary_uom = move.product_id.stock_secondary_uom_id
30+
secondary_uom = (
31+
product.stock_secondary_uom_id
32+
or move.product_tmpl_id.stock_secondary_uom_id
33+
)
3134
if secondary_uom:
3235
factor = secondary_uom.factor * move.product_uom.factor
3336
vals.update({"case_qty": int(move.quantity / (factor or 1.0))})

0 commit comments

Comments
 (0)