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.

132 lines
5.1 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. </header>
  62. <sheet>
  63. <div class="oe_title">
  64. <h1><field name="name" /></h1>
  65. </div>
  66. <group>
  67. <field name="max_worker_nb" />
  68. </group>
  69. <h2> Expected workers </h2>
  70. <group>
  71. <field name="expected_worker_nb" />
  72. </group>
  73. <field name="expected_shift_ids" />
  74. <h2> Added workers </h2>
  75. <group>
  76. <field name="added_worker_nb" />
  77. </group>
  78. <field name="added_shift_ids" />
  79. <h4> Additional important informations </h4>
  80. <field name="annotation" />
  81. <group>
  82. <field name="is_read" />
  83. </group>
  84. <h4> General feedback </h4>
  85. <field name="feedback" />
  86. <group>
  87. <field name="worker_nb_feedback"/>
  88. </group>
  89. <group>
  90. <field name="validated_by" readonly="True" />
  91. </group>
  92. </sheet>
  93. <div class="oe_chatter">
  94. <field name="message_ids" widget="mail_thread"/>
  95. </div>
  96. </form>
  97. </field>
  98. </record>
  99. <!-- Actions -->
  100. <!-- This method would be better but library "fields" is not imported -->
  101. <!--
  102. domain="[('end_time','&gt;',fields.Datetime.to_string(datetime.date.today())),
  103. ('start_time','&lt;', fields.Datetime.to_string(datetime.date.today() + datetime.timedelta(days=1)))]" -->
  104. <act_window id="action_sheet_daily"
  105. name="Daily attendance sheets"
  106. res_model="beesdoo.shift.sheet"
  107. view_mode="tree,form"
  108. domain="[('end_time','&gt;', datetime.date.today().strftime('%Y-%m-%d 00:00:00')),
  109. ('start_time','&lt;', datetime.date.today().strftime('%Y-%m-%d 23:59:59'))]"
  110. />
  111. <!-- Top menu item -->
  112. <menuitem id="menu_sheet_top"
  113. name="Attendance Sheets"
  114. parent="menu_root"
  115. />
  116. <!-- Menu actions -->
  117. <menuitem id="menu_sheet"
  118. name="Daily attendance sheets"
  119. parent="menu_sheet_top"
  120. action="action_sheet_daily"
  121. />
  122. </odoo>