Browse Source

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

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
7a55f07bd6
  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. # selection field as they are mutually exclusive.
is_regular = fields.Boolean(default=False, string="Regular shift") is_regular = fields.Boolean(default=False, string="Regular shift")
is_compensation = fields.Boolean(default=False, string="Compensation 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) revert_info = fields.Text(copy=False)
working_mode = fields.Selection(related='worker_id.working_mode') working_mode = fields.Selection(related='worker_id.working_mode')

Loading…
Cancel
Save