|
@ -99,6 +99,7 @@ class VracoopPointRetrait(models.Model): |
|
|
if exclure_the_day: |
|
|
if exclure_the_day: |
|
|
pass |
|
|
pass |
|
|
else: |
|
|
else: |
|
|
|
|
|
print("----- week.strftime -----", str(week.strftime("%A"))) |
|
|
corresponding_line = rec.vracoop_retrait_time_ids.search([ |
|
|
corresponding_line = rec.vracoop_retrait_time_ids.search([ |
|
|
('vracoop_point_retrait_id', '=', rec.id), |
|
|
('vracoop_point_retrait_id', '=', rec.id), |
|
|
('name', '=', week.strftime("%A"))]) |
|
|
('name', '=', week.strftime("%A"))]) |
|
@ -204,6 +205,10 @@ class VracoopPointRetrait(models.Model): |
|
|
slot_per_day_noon = slot_per_day_noon + timedelta( |
|
|
slot_per_day_noon = slot_per_day_noon + timedelta( |
|
|
hours=corresponding_line.availability_time) |
|
|
hours=corresponding_line.availability_time) |
|
|
last_slot = slot_per_day_noon.strftime("%H:%M") |
|
|
last_slot = slot_per_day_noon.strftime("%H:%M") |
|
|
|
|
|
|
|
|
|
|
|
first_slot_hour = first_slot.split(":") |
|
|
|
|
|
first_slot_float = float( |
|
|
|
|
|
'%s.%s' % (first_slot_hour[0], first_slot_hour[1])) |
|
|
nb_sale_slot = self.env['sale.order'].search_count( |
|
|
nb_sale_slot = self.env['sale.order'].search_count( |
|
|
[('vracoop_point_retrait_id', '=', rec.id), |
|
|
[('vracoop_point_retrait_id', '=', rec.id), |
|
|
('day_retrait', '=', week.date()), |
|
|
('day_retrait', '=', week.date()), |
|
|