Skip to content
Snippets Groups Projects
Commit 2ca6d903 authored by Juliana's avatar Juliana
Browse files

Bug slot non assigné

parent 03b6f0f1
Branches
No related tags found
No related merge requests found
...@@ -99,6 +99,7 @@ class VracoopPointRetrait(models.Model): ...@@ -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): ...@@ -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()),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment