Browse Source

[MIG] b_shift : fix views

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
9149f6983f
  1. 19
      beesdoo_shift/views/attendance_sheet.xml
  2. 57
      beesdoo_shift/views/task.xml
  3. 9
      beesdoo_shift/views/task_template.xml

19
beesdoo_shift/views/attendance_sheet.xml

@ -36,7 +36,7 @@
<field name="name">Expected Shifts List</field>
<field name="model">beesdoo.shift.sheet.expected</field>
<field name="arch" type="xml">
<tree editable="bottom" create="false" delete="false" open="false"
<tree editable="bottom" create="false" delete="false"
decoration-danger="state == 'absent'"
decoration-success="state == 'done'">
<field name="task_type_id" readonly="True" options="{'no_open': True}"/>
@ -49,10 +49,10 @@
options="{'no_create': True, 'no_create_edit':True}"/>
<field name="state" options="{'no_open': True}" />
<field name="compensation_no"
options="{'horizontal': true}"
attrs="{
options="{'horizontal': true}"
attrs="{
'invisible': [('state', 'in', ['done', False])]
}"
}"
/>
</tree>
</field>
@ -174,10 +174,9 @@
<group>
<field name="max_worker_no" />
</group>
<label string="You will be able to write notes
about what you cannot encode here
when clicking on 'validate'."
/>
You will be able to write notes
about what you cannot encode here
when clicking on 'validate'.
<separator string="Added workers" />
<field name="added_shift_ids"/>
<separator string="Expected workers" />
@ -231,8 +230,8 @@
name="Daily attendance sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('end_time','&gt;', datetime.now().replace(hour=00, minute=00, second=10)),
('start_time','&lt;', datetime.now().replace(hour=23, minute=59, second=59))]"
domain="[('end_time','&gt;', datetime.datetime.now().replace(hour=00, minute=00, second=10)),
('start_time','&lt;', datetime.datetime.now().replace(hour=23, minute=59, second=59))]"
/>
<!-- Top menu item -->

57
beesdoo_shift/views/task.xml

@ -29,14 +29,17 @@
<field name="worker_id" />
<filter string="My Team Shift"
name="my_team_shift"
domain="[('super_coop_id', '=', uid)]" />
domain="[('super_coop_id', '=', uid)]" />
<filter string="My Shift"
domain="[('worker_id.user_ids', 'in', uid)]" />
name="my_shift"
domain="[('worker_id.user_ids', 'in', uid)]" />
<separator />
<filter string="Assigned" name="assigned"
domain="[('worker_id', '!=', False)]" />
<filter string="Unassigned" name="unassigned"
domain="[('worker_id', '=', False)]" />
<filter string="Assigned"
name="assigned"
domain="[('worker_id', '!=', False)]" />
<filter string="Unassigned"
name="unassigned"
domain="[('worker_id', '=', False)]" />
<separator />
<filter string="4 next days" name="nextweek"
domain="[('end_time','&gt;', context_today().strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() + datetime.timedelta(days=4)).strftime('%Y-%m-%d 23:59:59'))]" />
@ -55,13 +58,16 @@
<group expand="1" string="Group By">
<filter string="Shift Template"
name="template"
context="{'group_by' : 'task_template_id'}" />
<filter string="Type" name="gb_type"
context="{'group_by' : 'task_type_id'}" />
<filter string="Status" name="gb_status"
context="{'group_by' : 'state'}" />
<filter string="Day" name="gb_day"
context="{'group_by' : 'start_time:day'}" />
context="{'group_by' : 'task_template_id'}" />
<filter string="Type"
name="gb_type"
context="{'group_by' : 'task_type_id'}" />
<filter string="Status"
name="gb_status"
context="{'group_by' : 'state'}" />
<filter string="Day"
name="gb_day"
context="{'group_by' : 'start_time:day'}" />
</group>
</search>
</field>
@ -140,22 +146,17 @@
<field name="super_coop_id" />
<field name="is_regular" />
<templates>
<t t-name="kanban-box">
<div
t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown"
groups="base.group_user">
<a class="dropdown-toggle btn"
data-toggle="dropdown" href="#">
<span class="fa fa-bars fa-lg" />
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown" name="card_dropdown_menu" groups="base.group_user">
<a role="button" class="dropdown-toggle o-no-caret btn" data-toggle="dropdown"
href="#" aria-label="Dropdown menu" title="Dropdown menu">
<span class="fa fa-bars fa-lg"/>
</a>
<ul class="dropdown-menu" role="menu"
aria-labelledby="dLabel">
<t t-if="widget.editable">
<li>
<a type="edit">Edit Shift</a>
</li>
</t>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li t-if="widget.editable">
<a type="edit">Edit Shift</a>
</li>
</ul>
</div>
<div class="oe_kanban_content">

9
beesdoo_shift/views/task_template.xml

@ -104,11 +104,10 @@
<div
t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<t t-if="widget.editable">
<div class="o_dropdown_kanban dropdown"
groups="base.group_user">
<a class="dropdown-toggle btn"
data-toggle="dropdown" href="#">
<span class="fa fa-bars fa-lg" />
<div class="o_dropdown_kanban dropdown" name="card_dropdown_menu">
<a role="button" class="dropdown-toggle o-no-caret btn" data-toggle="dropdown"
href="#" aria-label="Dropdown menu" title="Dropdown menu">
<span class="fa fa-bars fa-lg"/>
</a>
<ul class="dropdown-menu" role="menu"
aria-labelledby="dLabel">

Loading…
Cancel
Save