Browse Source

Bug sur les dates local

12.0
Juliana 5 years ago
parent
commit
2d48b4edd5
  1. 14
      datas/vracoop.time.csv
  2. 4
      models/vracoop_point_retrait.py

14
datas/vracoop.time.csv

@ -1,8 +1,8 @@
id,name,first_noon_heure,first_morning_heure,last_noon_heure,last_morning_heure,availability_time,preparation_time id,name,first_noon_heure,first_morning_heure,last_noon_heure,last_morning_heure,availability_time,preparation_time
__export__.vracoop_time_lundi,Lundi,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_mardi,Mardi,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_mercredi,Mercredi,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_jeudi,Jeudi,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_vendredi,Vendredi,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_samedi,Samedi,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_dimanche,Dimanche,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_lundi,1,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_mardi,2,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_mercredi,3,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_jeudi,4,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_vendredi,5,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_samedi,6,14.0,9.0,17.0,12.0,2.0,1.0
__export__.vracoop_time_dimanche,0,14.0,9.0,17.0,12.0,2.0,1.0

4
models/vracoop_point_retrait.py

@ -22,13 +22,13 @@ class VracoopPointRetrait(models.Model):
vracoop_time_ids = self.env['vracoop.time'].search([]) vracoop_time_ids = self.env['vracoop.time'].search([])
vracoop_retrait_time_ids = [] vracoop_retrait_time_ids = []
for vracoop_time_id in vracoop_time_ids: for vracoop_time_id in vracoop_time_ids:
if vracoop_time_id.name == 'samedi' or vracoop_time_id.name == 'dimanche':
if vracoop_time_id.name == 6 or vracoop_time_id.name == 0:
active_day = False active_day = False
else: else:
active_day = True active_day = True
vals = { vals = {
'vracoop_time_id': vracoop_time_id.id, 'vracoop_time_id': vracoop_time_id.id,
'name': vracoop_time_id.name,
'name': int(vracoop_time_id.name),
'first_morning_heure': vracoop_time_id.first_morning_heure, 'first_morning_heure': vracoop_time_id.first_morning_heure,
'last_morning_heure': vracoop_time_id.last_morning_heure, 'last_morning_heure': vracoop_time_id.last_morning_heure,
'first_noon_heure': vracoop_time_id.first_noon_heure, 'first_noon_heure': vracoop_time_id.first_noon_heure,

Loading…
Cancel
Save