diff --git a/beesdoo_website_shift/controllers/main.py b/beesdoo_website_shift/controllers/main.py index f9ba9a6..23204a9 100644 --- a/beesdoo_website_shift/controllers/main.py +++ b/beesdoo_website_shift/controllers/main.py @@ -16,6 +16,8 @@ class WebsiteShiftController(http.Controller): return self.shift_irregular_worker() if working_mode == 'regular': return self.shift_template_regular_worker() + if working_mode == 'exempt': + return self.shift_exempted_worker() return request.render( 'beesdoo_website_shift.shift', @@ -124,3 +126,15 @@ class WebsiteShiftController(http.Controller): 'subscribed_shifts': subscribed_shifts, } ) + + def shift_exempted_worker(self, **kwargs): + # Get current user + cur_user = request.env['res.users'].browse(request.uid) + + return request.render( + 'beesdoo_website_shift.exempted_worker', + { + 'partner': cur_user.partner_id, + 'status': cur_user.partner_id.cooperative_status_ids, + } + ) diff --git a/beesdoo_website_shift/views/shift_website_templates.xml b/beesdoo_website_shift/views/shift_website_templates.xml index 321ea93..cdc82b5 100644 --- a/beesdoo_website_shift/views/shift_website_templates.xml +++ b/beesdoo_website_shift/views/shift_website_templates.xml @@ -49,6 +49,101 @@ + + +