Browse Source

[CHANGE] beesdoo_shift: allow to launch auto extension as group_shift_attendance AKA accueil groupe

9.0-shift6-welcome_screen-tfr
Thibault Francois 7 years ago
parent
commit
a67825d3d9
  1. 2
      beesdoo_shift/views/cooperative_status.xml
  2. 2
      beesdoo_shift/wizard/extension.py

2
beesdoo_shift/views/cooperative_status.xml

@ -10,7 +10,7 @@
type="object" groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': [('cooperator_type', '!=', 'share_a')]}"/>
<button name="auto_extension" string="Auto Extension" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
type="object" groups="beesdoo_shift.group_shift_attendance"
attrs="{'invisible': ['|',
('cooperator_type', '!=', 'share_a'),
'|',

2
beesdoo_shift/wizard/extension.py

@ -16,7 +16,7 @@ class Subscribe(models.TransientModel):
@api.multi
def auto_ext(self):
self = self._check()
self = self._check(group='beesdoo_shift.group_shift_attendance')
status_id = self.env['cooperative.status'].search([('cooperator_id', '=', self.cooperator_id.id)])
status_id.sudo().write({'extension_start_time': self.extension_start_date})

Loading…
Cancel
Save