You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.3 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. # © 2019 Le Filament (<http://www.le-filament.com>)
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo import models, fields
  4. class VracoopRetraitTime(models.Model):
  5. _name = "vracoop.retrait.time"
  6. _description = "Informations horaires par retrait"
  7. vracoop_time_id = fields.Many2one('vracoop.time', 'Conf time')
  8. name = fields.Selection([
  9. (1, 'Lundi'),
  10. (2, 'Mardi'),
  11. (3, 'Mercredi'),
  12. (4, 'Jeudi'),
  13. (5, 'Vendredi'),
  14. (6, 'Samedi'),
  15. (0, 'Dimanche')],
  16. string='Jour de la semaine')
  17. # name = fields.Selection([
  18. # ('lundi', 'Lundi'),
  19. # ('mardi', 'Mardi'),
  20. # ('mercredi', 'Mercredi'),
  21. # ('jeudi', 'Jeudi'),
  22. # ('vendredi', 'Vendredi'),
  23. # ('samedi', 'Samedi'),
  24. # ('dimanche', 'Dimanche')],
  25. # string='Jour de la semaine')
  26. first_morning_heure = fields.Float(string='Heure du 1er retrait (matin)')
  27. last_morning_heure = fields.Float(
  28. string='Heure du dernier retrait (matin)')
  29. first_noon_heure = fields.Float(string='Heure du 1er retrait (après-midi)')
  30. last_noon_heure = fields.Float(
  31. string='Heure du dernier retrait (après-midi)')
  32. preparation_time = fields.Float(string='Temps de préparation')
  33. availability_time = fields.Float(string='Temps de mise à disposition')
  34. active_day = fields.Boolean("Actif")
  35. vracoop_point_retrait_id = fields.Many2one(
  36. comodel_name='vracoop.point.retrait',
  37. string="Point retrait")
  38. class VracoopTime(models.Model):
  39. _name = "vracoop.time"
  40. _description = "Configuration horaires de base"
  41. name = fields.Selection([
  42. (1, 'Lundi'),
  43. (2, 'Mardi'),
  44. (3, 'Mercredi'),
  45. (4, 'Jeudi'),
  46. (5, 'Vendredi'),
  47. (6, 'Samedi'),
  48. (0, 'Dimanche')],
  49. string='Jour de la semaine')
  50. first_morning_heure = fields.Float(string='Heure du 1er retrait (matin)')
  51. last_morning_heure = fields.Float(
  52. string='Heure du dernier retrait (matin)')
  53. first_noon_heure = fields.Float(string='Heure du 1er retrait (après-midi)')
  54. last_noon_heure = fields.Float(
  55. string='Heure du dernier retrait (après-midi)')
  56. preparation_time = fields.Float(string='Temps de préparation')
  57. availability_time = fields.Float(string='Temps de mise à disposition')