You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

142 lines
5.6 KiB

<odoo>
<!-- Attendance Sheet Shifts Views -->
<record model="ir.ui.view" id="sheet_expected_view_tree">
<field name="name">Expected Shifts List</field>
<field name="model">beesdoo.shift.sheet.expected</field>
<field name="arch" type="xml">
<tree editable="top" create="false" delete="false">
<field name="task_type_id" readonly="True"/>
<field name="worker_id" readonly="True"/>
<field name="working_mode" />
<field name="replacement_worker_id"
attrs="{'readonly':
[('working_mode','=','irregular')]}"/>
<field name="stage" />
<field name="compensation_nb"
attrs="{'readonly':
['|',
('working_mode','=','irregular'),
('stage','in',['present','cancelled'])]}"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="sheet_added_view_tree">
<field name="view_mode">tree</field>
<field name="name">Added Shifts List</field>
<field name="model">beesdoo.shift.sheet.added</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="task_type_id" />
<field name="worker_id" />
<field name="working_mode" />
<field name="regular_task_type"
attrs="{'readonly':
[('working_mode','=','irregular')]}"/>
<field name="stage" readonly="True" />
</tree>
</field>
</record>
<!-- Attendance Sheets Views -->
<record model="ir.ui.view" id="sheet_view_tree">
<field name="name">Daily Attendance Sheets List</field>
<field name="model">beesdoo.shift.sheet</field>
<field name="arch" type="xml">
<!-- <tree create="false" delete="false"> -->
<tree create="false" >
<field name="name"/>
<field name="max_worker_nb" type="char"/>
<field name="state" />
<field name="validated_by" />
<field name="is_annotated" />
</tree>
</field>
</record>
<record model="ir.ui.view" id="sheet_view_form">
<field name="name">Attendance Sheet Form</field>
<field name="model">beesdoo.shift.sheet</field>
<field name="arch" type="xml">
<form create="false" delete="false">
<header>
<field name="state" widget="statusbar" readonly="True" />
<button type="object"
name="validate_via_wizard"
string="Validate Sheet"
/>
</header>
<sheet>
<div class="oe_title">
<h1><field name="name" /></h1>
</div>
<group>
<field name="max_worker_nb" />
</group>
<h2> Expected workers </h2>
<group>
<field name="expected_worker_nb" />
</group>
<field name="expected_shift_ids" />
<h2> Added workers </h2>
<group>
<field name="added_worker_nb" />
</group>
<field name="added_shift_ids" />
<h4> Additional important informations </h4>
<field name="annotation" />
<group>
<field name="is_read"
groups="beesdoo_shift.group_cooperative_admin"
/>
</group>
<h4> General feedback </h4>
<field name="feedback" />
<group>
<field name="worker_nb_feedback"/>
</group>
<group>
<field name="validated_by" readonly="True" />
</group>
</sheet>
<div class="oe_chatter">
<field name="message_ids"
widget="mail_thread"
groups="beesdoo_shift.group_cooperative_admin"
/>
</div>
</form>
</field>
</record>
<!-- Actions -->
<!-- This method would be better but library "fields" is not imported -->
<!--
domain="[('end_time','&gt;',fields.Datetime.to_string(datetime.date.today())),
('start_time','&lt;', fields.Datetime.to_string(datetime.date.today() + datetime.timedelta(days=1)))]" -->
<act_window id="action_sheet_daily"
name="Daily attendance sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('end_time','&gt;', datetime.date.today().strftime('%Y-%m-%d 00:00:00')),
('start_time','&lt;', datetime.date.today().strftime('%Y-%m-%d 23:59:59'))]"
/>
<!-- Top menu item -->
<menuitem id="menu_sheet_top"
name="Attendance Sheets"
parent="menu_root"
groups="beesdoo_shift.group_shift_attendance_sheet"
/>
<!-- Menu actions -->
<menuitem id="menu_sheet"
name="Daily attendance sheets"
parent="menu_sheet_top"
action="action_sheet_daily"
/>
</odoo>