Skip to content

Commit

Permalink
[16.0][FIX] pos_product_multi_barcode: stop finding barcodes from arc…
Browse files Browse the repository at this point in the history
…hived products at PoS
  • Loading branch information
luisnore committed Nov 2, 2024
1 parent 5a2bd27 commit e17fff8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pos_product_multi_barcode/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 22 in pos_product_multi_barcode/models/product.py

View check run for this annotation

Codecov / codecov/patch

pos_product_multi_barcode/models/product.py#L22

Added line #L22 was not covered by tests
else:
product.barcodes_json = "[]"

Check warning on line 24 in pos_product_multi_barcode/models/product.py

View check run for this annotation

Codecov / codecov/patch

pos_product_multi_barcode/models/product.py#L24

Added line #L24 was not covered by tests

0 comments on commit e17fff8

Please sign in to comment.