Browse Source

[FIX] b_shift : replacement workers must be regular and not unsuscribed

pull/124/head
Elouan Le Bars 5 years ago
parent
commit
bd8e16e2ed
  1. 7
      beesdoo_shift/models/task.py

7
beesdoo_shift/models/task.py

@ -46,7 +46,12 @@ class Task(models.Model):
# selection field as they are mutually exclusive.
is_regular = fields.Boolean(default=False, string="Regular shift")
is_compensation = fields.Boolean(default=False, string="Compensation shift")
replaced_id = fields.Many2one('res.partner', track_visibility='onchange', domain=[('eater', '=', 'worker_eater')])
replaced_id = fields.Many2one('res.partner', track_visibility='onchange',
domain=[
('eater', '=', 'worker_eater'),
('working_mode', '=', 'regular'),
('state', 'not in', ('unsubscribed', 'resigning')),
])
revert_info = fields.Text(copy=False)
working_mode = fields.Selection(related='worker_id.working_mode')

Loading…
Cancel
Save