From 4cec86337287ca62c4153a323b0cb5e14a6b4aea Mon Sep 17 00:00:00 2001 From: eloyoussef Date: Thu, 8 Feb 2018 00:58:23 +0100 Subject: [PATCH] Adding comments to views and fixing the availibility configuration --- golem_ressources/models/golem_resources.py | 10 ++--- .../views/golem_reservation_views.xml | 2 +- .../views/golem_resources_views.xml | 38 ++++++++++++++----- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/golem_ressources/models/golem_resources.py b/golem_ressources/models/golem_resources.py index 5f929c5..e257049 100644 --- a/golem_ressources/models/golem_resources.py +++ b/golem_ressources/models/golem_resources.py @@ -34,7 +34,7 @@ class GolemResources(models.Model): start_of_availability_date = fields.Date(string="Start of availibility date ") end_of_availability_date = fields.Date(string="End of availibility date ") weekdays_of_availibility = fields.Many2many('golem.weekday', string="Weekdays of availibility") - #horaire = fields.Many2many("golem.hour", string="horaire ") + timetable = fields.One2many("golem.timetable", "resource_id", string="Availibility timetable") @api.multi def active_change(self): @@ -88,10 +88,10 @@ class GolemWeekDay(models.Model): name = fields.Char(string='Week Day') #modèle de gestion horaire -class GolemHour(models.Model): - """ Golem Hour """ - _name = "golem.hour" - _description = "Golem Hour" +class GolemTimetable(models.Model): + """ Golem Timetable """ + _name = "golem.timetable" + _description = "Golem Timetable" resource_id = fields.Many2one("golem.resources", required=True) name = fields.Many2one("golem.weekday", required=True) diff --git a/golem_ressources/views/golem_reservation_views.xml b/golem_ressources/views/golem_reservation_views.xml index 12883e5..867579f 100644 --- a/golem_ressources/views/golem_reservation_views.xml +++ b/golem_ressources/views/golem_reservation_views.xml @@ -1,6 +1,6 @@ + Sunday @@ -38,6 +39,9 @@ along with this program. If not, see . Saturday + + + resource.search golem.resources @@ -50,6 +54,8 @@ along with this program. If not, see . + + resource.tree golem.resources @@ -65,6 +71,8 @@ along with this program. If not, see . + + resource.form golem.resources @@ -79,17 +87,24 @@ along with this program. If not, see . - - - - + + + + - - - - - + + + + + + + + + + + + @@ -97,11 +112,14 @@ along with this program. If not, see . + Resources golem.resources tree,form,search + +