Commit 987c1533 by François C.

Adapt shelf product label file content to fit printing soft

parent bf5e21af
Pipeline #4147 canceled with stage
...@@ -107,6 +107,8 @@ class CagetteProduct(models.Model): ...@@ -107,6 +107,8 @@ class CagetteProduct(models.Model):
v = round(float(price) / float(product['volume']), 2) v = round(float(price) / float(product['volume']), 2)
if directory != "/product_labels/" or (directory == "/product_labels/" and k != "meal_voucher_ok"): if directory != "/product_labels/" or (directory == "/product_labels/" and k != "meal_voucher_ok"):
# add parameter to text unless it's for a product label and parameter is meal_voucher_ok # add parameter to text unless it's for a product label and parameter is meal_voucher_ok
if str(v) == "0.0" and k == "price_weight_net":
v = ''
txt += k + '=' + str(v).strip() + "\r\n" txt += k + '=' + str(v).strip() + "\r\n"
if directory == '/labels/' and meal_voucher_found is False: if directory == '/labels/' and meal_voucher_found is False:
txt += 'meal_voucher_ok=' + "\r\n" txt += 'meal_voucher_ok=' + "\r\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment