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

  1. <odoo>
  2. <!-- Attendance Sheet Shifts Views -->
  3. <record model="ir.ui.view" id="sheet_expected_view_tree">
  4. <field name="name">Expected Shifts List</field>
  5. <field name="model">beesdoo.shift.sheet.expected</field>
  6. <field name="arch" type="xml">
  7. <tree editable="top" create="false" delete="false">
  8. <field name="task_type_id" readonly="True"/>
  9. <field name="worker_id" readonly="True"/>
  10. <field name="working_mode" />
  11. <field name="replacement_worker_id"
  12. attrs="{'readonly':
  13. [('working_mode','=','irregular')]}"/>
  14. <field name="stage" />
  15. <field name="compensation_nb"
  16. attrs="{'readonly':
  17. ['|',
  18. ('working_mode','=','irregular'),
  19. ('stage','in',['present','cancelled'])]}"/>
  20. </tree>
  21. </field>
  22. </record>
  23. <record model="ir.ui.view" id="sheet_added_view_tree">
  24. <field name="view_mode">tree</field>
  25. <field name="name">Added Shifts List</field>
  26. <field name="model">beesdoo.shift.sheet.added</field>
  27. <field name="arch" type="xml">
  28. <tree editable="top">
  29. <field name="task_type_id" />
  30. <field name="worker_id" />
  31. <field name="working_mode" />
  32. <field name="regular_task_type"
  33. attrs="{'readonly':
  34. [('working_mode','=','irregular')]}"/>
  35. <field name="stage" readonly="True" />
  36. </tree>
  37. </field>
  38. </record>
  39. <!-- Attendance Sheets Views -->
  40. <record model="ir.ui.view" id="sheet_view_tree">
  41. <field name="name">Daily Attendance Sheets List</field>
  42. <field name="model">beesdoo.shift.sheet</field>
  43. <field name="arch" type="xml">
  44. <!-- <tree create="false" delete="false"> -->
  45. <tree create="false" >
  46. <field name="name"/>
  47. <field name="max_worker_nb" type="char"/>
  48. <field name="state" />
  49. <field name="validated_by" />
  50. <field name="is_annotated" />
  51. </tree>
  52. </field>
  53. </record>
  54. <record model="ir.ui.view" id="sheet_view_form">
  55. <field name="name">Attendance Sheet Form</field>
  56. <field name="model">beesdoo.shift.sheet</field>
  57. <field name="arch" type="xml">
  58. <form create="false" delete="false">
  59. <header>
  60. <field name="state" widget="statusbar" readonly="True" />
  61. <button type="object"
  62. name="validate_via_wizard"
  63. string="Validate Sheet"
  64. />
  65. </header>
  66. <sheet>
  67. <div class="oe_title">
  68. <h1><field name="name" /></h1>
  69. </div>
  70. <group>
  71. <field name="max_worker_nb" />
  72. </group>
  73. <h2> Expected workers </h2>
  74. <group>
  75. <field name="expected_worker_nb" />
  76. </group>
  77. <field name="expected_shift_ids" />
  78. <h2> Added workers </h2>
  79. <group>
  80. <field name="added_worker_nb" />
  81. </group>
  82. <field name="added_shift_ids" />
  83. <h4> Additional important informations </h4>
  84. <field name="annotation" />
  85. <group>
  86. <field name="is_read"
  87. groups="beesdoo_shift.group_cooperative_admin"
  88. />
  89. </group>
  90. <h4> General feedback </h4>
  91. <field name="feedback" />
  92. <group>
  93. <field name="worker_nb_feedback"/>
  94. </group>
  95. <group>
  96. <field name="validated_by" readonly="True" />
  97. </group>
  98. </sheet>
  99. <div class="oe_chatter">
  100. <field name="message_ids"
  101. widget="mail_thread"
  102. groups="beesdoo_shift.group_cooperative_admin"
  103. />
  104. </div>
  105. </form>
  106. </field>
  107. </record>
  108. <!-- Actions -->
  109. <!-- This method would be better but library "fields" is not imported -->
  110. <!--
  111. domain="[('end_time','&gt;',fields.Datetime.to_string(datetime.date.today())),
  112. ('start_time','&lt;', fields.Datetime.to_string(datetime.date.today() + datetime.timedelta(days=1)))]" -->
  113. <act_window id="action_sheet_daily"
  114. name="Daily attendance sheets"
  115. res_model="beesdoo.shift.sheet"
  116. view_mode="tree,form"
  117. domain="[('end_time','&gt;', datetime.date.today().strftime('%Y-%m-%d 00:00:00')),
  118. ('start_time','&lt;', datetime.date.today().strftime('%Y-%m-%d 23:59:59'))]"
  119. />
  120. <!-- Top menu item -->
  121. <menuitem id="menu_sheet_top"
  122. name="Attendance Sheets"
  123. parent="menu_root"
  124. groups="beesdoo_shift.group_shift_attendance_sheet"
  125. />
  126. <!-- Menu actions -->
  127. <menuitem id="menu_sheet"
  128. name="Daily attendance sheets"
  129. parent="menu_sheet_top"
  130. action="action_sheet_daily"
  131. />
  132. </odoo>