Browse Source

[UPD] b_shift : attendance sheets views

pull/125/head
Elouan Le Bars 5 years ago
parent
commit
0f63f5bc0c
  1. 2
      beesdoo_shift/models/attendance_sheet.py
  2. 23
      beesdoo_shift/views/attendance_sheet.xml

2
beesdoo_shift/models/attendance_sheet.py

@ -197,7 +197,7 @@ class AttendanceSheet(models.Model):
("too_many", "Too many workers"),
("empty", "I was not there during the shift"),
],
string="Was your team big enough ?",
string="Was your team big enough ? *",
)
validated_by = fields.Many2one(
"res.partner",

23
beesdoo_shift/views/attendance_sheet.xml

@ -51,15 +51,22 @@
<field name="name">Added Shifts List</field>
<field name="model">beesdoo.shift.sheet.added</field>
<field name="arch" type="xml">
<tree decoration-success="state == 'done'">
<tree decoration-danger="state in ['absent_0', 'absent_1', 'absent_2'] "
decoration-success="state == 'done'">
<field name="task_type_id"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
<field name="worker_id"
domain="[('state','in',['alert', 'ok'])]"
domain="[
('eater', '=', 'worker_eater'),
('working_mode', 'in', ('regular', 'irregular')),
('state', 'not in', ('unsubscribed', 'resigning')),
]"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
<field name="working_mode" />
<field name="is_compensation" readonly="True"/>
<field name="state" readonly="True" />
<field name="is_compensation"
attrs="{'invisible':
[('working_mode','=','irregular')]}"/>
<field name="state"/>
</tree>
</field>
</record>
@ -94,13 +101,17 @@
<field name="task_type_id"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
<field name="worker_id"
domain="[('state','in',['alert', 'ok'])]"
domain="[
('eater', '=', 'worker_eater'),
('working_mode', 'in', ('regular', 'irregular')),
('state', 'not in', ('unsubscribed', 'resigning')),
]"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
<field name="working_mode" />
<field name="is_compensation"
attrs="{'invisible':
[('working_mode','=','irregular')]}"/>
<field name="state" readonly="True" />
<field name="state"/>
</group>
</form>
</field>

Loading…
Cancel
Save