Commit 263c35e2 by Yvon

make meal_voucher module compatible with old version of logiciel impression etiquettes produits

parent 1d62cd4b
......@@ -91,4 +91,7 @@ FL_SHELFS = []
VRAC_SHELFS = []
# Should block service exchange if old service is happening in less than 24h
BLOCK_SERVICE_EXCHANGE_24H_BEFORE = False
\ No newline at end of file
BLOCK_SERVICE_EXCHANGE_24H_BEFORE = False
# Fix incompatibility between meal voucher module and an old version of michel bibikoff product label printer software used in supercafoutch
DO_NOT_SHOW_MEAL_VOUCHER_OK_LINE_IN_PRODUCT_INFO_FOR_LABEL = True
\ No newline at end of file
......@@ -57,6 +57,8 @@ class CagetteProduct(models.Model):
fields = ['barcode', 'product_tmpl_id', 'pricetag_rackinfos',
'price_weight_net', 'price_volume', 'list_price',
'weight_net', 'volume', 'to_weight', 'meal_voucher_ok']
if getattr(settings, 'DO_NOT_SHOW_MEAL_VOUCHER_OK_LINE_IN_PRODUCT_INFO_FOR_LABEL', False):
fields.remove('meal_voucher_ok')
additionnal_fields = getattr(settings, 'SHELF_LABELS_ADD_FIELDS', [])
fields += additionnal_fields
product_data = api.search_read('product.product', cond, fields)
......
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