Commit 972db44b by Yvon Kerdoncuff

completely remove code removing 15 minutes at the end of shift (actually this…

completely remove code removing 15 minutes at the end of shift (actually this code was even buggy as -15 min operation was done twice)
parent 55fb5560
Pipeline #4171 failed with stage
in 0 seconds
...@@ -115,7 +115,6 @@ SHOP_BOTTOM_VALIDATION_MSG = 'Message personnalisable' ...@@ -115,7 +115,6 @@ SHOP_BOTTOM_VALIDATION_MSG = 'Message personnalisable'
#VALIDATION_ORDER_MAIL_TEMPLATE = 'shop/lgds_validation_mail.html' #VALIDATION_ORDER_MAIL_TEMPLATE = 'shop/lgds_validation_mail.html'
EM_URL = '' EM_URL = ''
REMOVE_15_MINUTES_AT_SHIFT_END = False
CAN_ADD_SHIFT = True CAN_ADD_SHIFT = True
COOP_CAN_CHANGE_SHIFT_TEMPLATE = True COOP_CAN_CHANGE_SHIFT_TEMPLATE = True
......
...@@ -153,8 +153,6 @@ CAN_ADD_SHIFT = True ...@@ -153,8 +153,6 @@ CAN_ADD_SHIFT = True
ALLOW_FOUR_DIGITS_IN_RECEPTION_PRICE = True ALLOW_FOUR_DIGITS_IN_RECEPTION_PRICE = True
REMOVE_15_MINUTES_AT_SHIFT_END = False
# Fix incompatibility between meal voucher module and an old version of michel bibikoff product label printer software used in supercafoutch # Fix incompatibility between meal voucher module and an old version of michel bibikoff product label printer software used in supercafoutch
SHOW_MEAL_VOUCHER_OK_LINE_IN_PRODUCT_INFO_FOR_LABEL = False SHOW_MEAL_VOUCHER_OK_LINE_IN_PRODUCT_INFO_FOR_LABEL = False
......
...@@ -498,10 +498,6 @@ ...@@ -498,10 +498,6 @@
Define duration, in hours, before shift starts within exchange is not more available, for standard shift_type member Define duration, in hours, before shift starts within exchange is not more available, for standard shift_type member
- REMOVE_15_MINUTES_AT_SHIFT_END = False
True by default. Remove 15 minutes to Odoo shift end (https://redmine.cooperatic.fr/issues/1680)
- ALLOW_FTOP_TO_DELETE_SHIFT = False - ALLOW_FTOP_TO_DELETE_SHIFT = False
If True, allow ftop member to delete futur shifts If True, allow ftop member to delete futur shifts
......
...@@ -31,7 +31,6 @@ def get_list_shift_calendar(request, partner_id): ...@@ -31,7 +31,6 @@ def get_list_shift_calendar(request, partner_id):
cs = CagetteShift() cs = CagetteShift()
[registerPartner, is_ftop] = shifts.fonctions.get_shift_partner(cs.o_api, partner_id) [registerPartner, is_ftop] = shifts.fonctions.get_shift_partner(cs.o_api, partner_id)
remove_15_minutes_at_shift_end = getattr(settings, 'REMOVE_15_MINUTES_AT_SHIFT_END', True)
listRegisterPartner = [] listRegisterPartner = []
listMakeUpShift = [] listMakeUpShift = []
for v in registerPartner: for v in registerPartner:
...@@ -66,9 +65,7 @@ def get_list_shift_calendar(request, partner_id): ...@@ -66,9 +65,7 @@ def get_list_shift_calendar(request, partner_id):
event["start"] = shifts.fonctions.dateIsoUTC(value['date_begin_tz']) event["start"] = shifts.fonctions.dateIsoUTC(value['date_begin_tz'])
datetime_object = datetime.datetime.strptime(value['date_end_tz'], "%Y-%m-%d %H:%M:%S") - datetime.timedelta(minutes=15) datetime_object = datetime.datetime.strptime(value['date_end_tz'], "%Y-%m-%d %H:%M:%S")
if remove_15_minutes_at_shift_end is True:
datetime_object -= datetime.timedelta(minutes=15)
event["end"] = shifts.fonctions.dateIsoUTC(datetime_object.strftime("%Y-%m-%d %H:%M:%S")) event["end"] = shifts.fonctions.dateIsoUTC(datetime_object.strftime("%Y-%m-%d %H:%M:%S"))
if len(l) > 0: if len(l) > 0:
......
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