From e17fff80d6e0699137e6883c4cfe99704d45fdc3 Mon Sep 17 00:00:00 2001 From: luis Date: Sat, 2 Nov 2024 11:44:06 +0100 Subject: [PATCH] [16.0][FIX] pos_product_multi_barcode: stop finding barcodes from archived products at PoS --- pos_product_multi_barcode/models/product.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pos_product_multi_barcode/models/product.py b/pos_product_multi_barcode/models/product.py index 09aa3b39f5..e58bd80a3d 100644 --- a/pos_product_multi_barcode/models/product.py +++ b/pos_product_multi_barcode/models/product.py @@ -17,5 +17,8 @@ class ProductProduct(models.Model): def _compute_barcodes_json(self): for product in self: - barcodes = [barcode for barcode in product.mapped("barcode_ids.name")] - product.barcodes_json = json.dumps(barcodes) + if product.active: + barcodes = [barcode for barcode in product.mapped("barcode_ids.name")] + product.barcodes_json = json.dumps(barcodes) + else: + product.barcodes_json = "[]"