From 8c24525cc4cd1532d395217f8f48c756ee0c6d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20G=C3=B6ttsch?= Date: Fri, 9 May 2025 16:20:12 +0200 Subject: [PATCH] [FIX] nfu_sale_order_batch_packaging: make open_packaging_qty sortable --- sale_order_batch/models/sale_order_batch_product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_order_batch/models/sale_order_batch_product.py b/sale_order_batch/models/sale_order_batch_product.py index 6bb4911..288634b 100644 --- a/sale_order_batch/models/sale_order_batch_product.py +++ b/sale_order_batch/models/sale_order_batch_product.py @@ -53,7 +53,7 @@ class SaleOrderBatchProduct(models.Model): def _compute_product_packaging_id(self): for line in self: # remove packaging if not match the product - if line.product_packaging_id.product_id != line.product_id: + if line.product_packaging_id and line.product_packaging_id.product_id != line.product_id: line.product_packaging_id = False # suggest always the first packaging if line.product_id and line.product_uom_qty and line.product_uom: