From 4004446b8fd31c978f9c0b7994b83659ada99890 Mon Sep 17 00:00:00 2001 From: Carlos Dauden Date: Thu, 4 Jul 2024 15:55:33 +0200 Subject: [PATCH] [IMP] stock_barcodes: Discard product packaging with empty product TT49951 --- stock_barcodes/wizard/stock_barcodes_read.py | 1 + 1 file changed, 1 insertion(+) diff --git a/stock_barcodes/wizard/stock_barcodes_read.py b/stock_barcodes/wizard/stock_barcodes_read.py index 9ee31290699..23cc9b9aa2b 100644 --- a/stock_barcodes/wizard/stock_barcodes_read.py +++ b/stock_barcodes/wizard/stock_barcodes_read.py @@ -373,6 +373,7 @@ def set_info_from_quants(self, quants): def process_barcode_packaging_id(self): domain = self._barcode_domain(self.barcode) if self.env.user.has_group("product.group_stock_packaging"): + domain.append(("product_id", "!=", False)) packaging = self.env["product.packaging"].search(domain) if packaging: if len(packaging) > 1: