Browse Source

[FIX] Can see user as super cooperator

pull/105/head
Thibault Francois 8 years ago
committed by Elouan
parent
commit
6d09e5f6be
  1. 2
      beesdoo_shift/models/planning.py
  2. 2
      beesdoo_shift/models/task.py

2
beesdoo_shift/models/planning.py

@ -52,7 +52,7 @@ class TaskTemplate(models.Model):
task_type_id = fields.Many2one('beesdoo.shift.type', string="Type") task_type_id = fields.Many2one('beesdoo.shift.type', string="Type")
start_time = fields.Float(required=True) start_time = fields.Float(required=True)
end_time = fields.Float(required=True) end_time = fields.Float(required=True)
super_coop_id = fields.Many2one('res.users', string="Super Cooperative", domain=[('super', '=', True)])
super_coop_id = fields.Many2one('res.users', string="Super Cooperative", domain=[('partner_id.super', '=', True)])
duration = fields.Float(help="Duration in Hour") duration = fields.Float(help="Duration in Hour")
worker_nb = fields.Integer(string="Number of worker", help="Max number of worker for this task", default=1) worker_nb = fields.Integer(string="Number of worker", help="Max number of worker for this task", default=1)

2
beesdoo_shift/models/task.py

@ -25,7 +25,7 @@ class Task(models.Model):
start_time = fields.Datetime(track_visibility='always') start_time = fields.Datetime(track_visibility='always')
end_time = fields.Datetime(track_visibility='always') end_time = fields.Datetime(track_visibility='always')
stage_id = fields.Many2one('beesdoo.shift.stage', required=True, track_visibility='onchange') stage_id = fields.Many2one('beesdoo.shift.stage', required=True, track_visibility='onchange')
super_coop_id = fields.Many2one('res.users', string="Super Cooperative", domain=[('super', '=', True)], track_visibility='onchange')
super_coop_id = fields.Many2one('res.users', string="Super Cooperative", domain=[('partner_id.super', '=', True)], track_visibility='onchange')
color = fields.Integer(related="stage_id.color", readonly=True) color = fields.Integer(related="stage_id.color", readonly=True)
is_regular = fields.Boolean(default=False) is_regular = fields.Boolean(default=False)
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')])

Loading…
Cancel
Save