Commit 563a1208 by François C.

Add param to show or not 'gestion des binômes' in members admin

parent 58fea6af
Pipeline #2356 passed with stage
in 1 minute 27 seconds
...@@ -313,7 +313,8 @@ def admin(request): ...@@ -313,7 +313,8 @@ def admin(request):
""" Administration des membres """ """ Administration des membres """
template = loader.get_template('members/admin/index.html') template = loader.get_template('members/admin/index.html')
context = {'title': 'BDM', context = {'title': 'BDM',
'module': 'Membres'} 'module': 'Membres',
'admin_binome_active': getattr(settings, 'ADMIN_BINOME_ACTIVE', True),}
return HttpResponse(template.render(context, request)) return HttpResponse(template.render(context, request))
def manage_makeups(request): def manage_makeups(request):
......
...@@ -419,6 +419,10 @@ ...@@ -419,6 +419,10 @@
If True, in BDM Admin manage shift template, on the calendar when subscribing a partner to a shift, "Volant" button is included If True, in BDM Admin manage shift template, on the calendar when subscribing a partner to a shift, "Volant" button is included
- ADMIN_BINOME_ACTIVE = False
By defaut, True. Show "Gestion des binômes" in bdm admin
### Miscellious ### Miscellious
- EXPORT_COMPTA_FORMAT = 'Quadratus' - EXPORT_COMPTA_FORMAT = 'Quadratus'
......
...@@ -88,7 +88,7 @@ class FieldsView(View): ...@@ -88,7 +88,7 @@ class FieldsView(View):
u"""Nous allons retourner les attributs Odoo correspondants.""" u"""Nous allons retourner les attributs Odoo correspondants."""
entity = request.POST.get("entity", "") entity = request.POST.get("entity", "")
fields = [] fields = []
if len(entity) > 1: if getattr(settings, 'APP_ENV', "prod") == "dev" and len(entity) > 1:
api = OdooAPI() api = OdooAPI()
fields = api.get_entity_fields(entity) fields = api.get_entity_fields(entity)
template = loader.get_template('common/entity_fields.html') template = loader.get_template('common/entity_fields.html')
......
...@@ -29,10 +29,12 @@ ...@@ -29,10 +29,12 @@
Gestion des présences Gestion des présences
<span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span> <span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span>
</button><br> </button><br>
{% if admin_binome_active %}
<button type="button" class="btn--primary management_type_button" id="manage_attached_button"> <button type="button" class="btn--primary management_type_button" id="manage_attached_button">
Gestion des binômes Gestion des binômes
<span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span> <span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span>
</button><br> </button><br>
{% endif %}
<button type="button" class="btn--primary management_type_button" id="manage_regular_shifts_button"> <button type="button" class="btn--primary management_type_button" id="manage_regular_shifts_button">
Gestion des créneaux Gestion des créneaux
<span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span> <span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span>
......
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