Browse Source

[IMP] 0044_j - cacher la case is-regular si c'est un volant qui est inscrit au shift

pull/105/head
Thibault Francois 7 years ago
committed by Elouan
parent
commit
e8efd861fe
  1. 1
      beesdoo_shift/models/task.py
  2. 3
      beesdoo_shift/views/task.xml

1
beesdoo_shift/models/task.py

@ -37,6 +37,7 @@ class Task(models.Model):
is_regular = fields.Boolean(default=False)
replaced_id = fields.Many2one('res.partner', track_visibility='onchange', domain=[('eater', '=', 'worker_eater')])
revert_info = fields.Text()
working_mode = fields.Selection(related='worker_id.working_mode')
def message_auto_subscribe(self, updated_fields, values=None):
self._add_follower(values)

3
beesdoo_shift/views/task.xml

@ -93,7 +93,8 @@
<field name="super_coop_id" />
<field name="worker_id" />
<field name="replaced_id" attrs="{'invisible': [('is_regular', '!=', True)]}"/>
<field name="is_regular" />
<field name="is_regular" attrs="{'invisible': [('working_mode', '=', 'irregular')]}"/>
<field name="working_mode" invisible="1" />
</group>
<group>
<field name="start_time" />

Loading…
Cancel
Save