Commit e34556c0 by Arnaud B Committed by François C.

suppression de la colonne Autres pour La Cagette uniquement

parent b4b9fae1
...@@ -275,7 +275,8 @@ function initLists() { ...@@ -275,7 +275,8 @@ function initLists() {
title:"Autres", title:"Autres",
defaultContent: "<select class='select_product_action'><option value=''></option><option value='supplier_shortage'>Rupture fournisseur</option></select>", defaultContent: "<select class='select_product_action'><option value=''></option><option value='supplier_shortage'>Rupture fournisseur</option></select>",
className:"dt-body-center", className:"dt-body-center",
orderable: false orderable: false,
visible: display_autres
} }
], ],
rowId : "product_id.0", rowId : "product_id.0",
...@@ -350,6 +351,7 @@ function initLists() { ...@@ -350,6 +351,7 @@ function initLists() {
title:"Autres", title:"Autres",
className:"dt-body-center", className:"dt-body-center",
orderable: false, orderable: false,
visible: display_autres,
render: function (data, type, full) { render: function (data, type, full) {
let disabled = (full.supplier_shortage) ? "disabled" : ''; let disabled = (full.supplier_shortage) ? "disabled" : '';
......
...@@ -76,7 +76,9 @@ def get_list_orders(request): ...@@ -76,7 +76,9 @@ def get_list_orders(request):
def produits(request, id): def produits(request, id):
""" Gets Order details """ """ Gets Order details """
context = {'title': 'Réception des produits', context = {'title': 'Réception des produits',
"TOOLS_SERVER": settings.TOOLS_SERVER} "TOOLS_SERVER": settings.TOOLS_SERVER,
"DISPLAY_AUTRES": "false" if (settings.COMPANY_NAME == "La Cagette") else "true",
}
fixed_barcode_prefix = '0490' fixed_barcode_prefix = '0490'
if hasattr(settings, 'RECEPTION_PB'): if hasattr(settings, 'RECEPTION_PB'):
......
...@@ -183,6 +183,7 @@ ...@@ -183,6 +183,7 @@
<script type="text/javascript"> <script type="text/javascript">
var tools_server = '{{TOOLS_SERVER}}' var tools_server = '{{TOOLS_SERVER}}'
var fixed_barcode_prefix = '{{FIXED_BARCODE_PREFIX}}' var fixed_barcode_prefix = '{{FIXED_BARCODE_PREFIX}}'
var display_autres = {{DISPLAY_AUTRES}};
</script> </script>
<script src="{% static "js/all_common.js" %}?v="></script> <script src="{% static "js/all_common.js" %}?v="></script>
<script src='{% static "js/barcodes.js" %}?v='></script> <script src='{% static "js/barcodes.js" %}?v='></script>
......
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