summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-01-16 13:29:35 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-01-16 13:29:35 +0700
commit6424192cdcb34ff2ea57a19b5ee41bf4bf68870c (patch)
tree8d9cd83a99a427bbfc13a4ff1c59e3f019174057 /indoteknik_custom/models/product_template.py
parent3d672f12eecd77af9a805cebd8ce3a7083957a1f (diff)
push
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
-rwxr-xr-xindoteknik_custom/models/product_template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 5bedae13..29608297 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -416,7 +416,7 @@ class ProductProduct(models.Model):
box_size=5,
border=4,
)
- qr.add_data(rec.default_code)
+ qr.add_data(rec.barcode if rec.barcode else rec.default_code)
qr.make(fit=True)
img = qr.make_image(fill_color="black", back_color="white")