From 98d84f4bbd496b4b59f93ba638faed7be3a12247 Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Mon, 7 Aug 2017 23:29:17 +0200 Subject: [PATCH] [ADD] Holiday wizard --- beesdoo_shift/__openerp__.py | 1 + beesdoo_shift/models/cooperative_status.py | 12 ++++++++++++ beesdoo_shift/views/cooperative_status.xml | 3 +++ beesdoo_shift/wizard/__init__.py | 3 ++- beesdoo_shift/wizard/extension.py | 2 -- beesdoo_shift/wizard/holiday.py | 15 +++++++++++++++ beesdoo_shift/wizard/holiday.xml | 20 ++++++++++++++++++++ 7 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 beesdoo_shift/wizard/holiday.py create mode 100644 beesdoo_shift/wizard/holiday.xml diff --git a/beesdoo_shift/__openerp__.py b/beesdoo_shift/__openerp__.py index dc23e2e..e6f8a71 100644 --- a/beesdoo_shift/__openerp__.py +++ b/beesdoo_shift/__openerp__.py @@ -33,5 +33,6 @@ "wizard/assign_super_coop.xml", "wizard/subscribe.xml", "wizard/extension.xml", + "wizard/holiday.xml", ], } diff --git a/beesdoo_shift/models/cooperative_status.py b/beesdoo_shift/models/cooperative_status.py index 2bf0e78..10955ee 100644 --- a/beesdoo_shift/models/cooperative_status.py +++ b/beesdoo_shift/models/cooperative_status.py @@ -225,5 +225,17 @@ class ResPartner(models.Model): res['context'] = {'default_auto': True} res['name'] = _('Trigger Grace Delay') return res + + @api.multi + def register_holiday(self): + return { + 'name': _('Register Holiday'), + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'beesdoo.shift.holiday', + 'target': 'new', + } + #TODO access right + vue on res.partner #TODO can_shop : Status can_shop ou extempted ou part C diff --git a/beesdoo_shift/views/cooperative_status.xml b/beesdoo_shift/views/cooperative_status.xml index 318ec0d..f5c3f02 100644 --- a/beesdoo_shift/views/cooperative_status.xml +++ b/beesdoo_shift/views/cooperative_status.xml @@ -26,6 +26,9 @@