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.

212 lines
10 KiB

  1. <odoo>
  2. <record model="ir.ui.view" id="super_coop_partner_inherited_view_form">
  3. <field name="name">Partner Super Coop</field>
  4. <field name="model">res.partner</field>
  5. <field name="inherit_id" ref="base.view_partner_form"/>
  6. <field name="priority">50</field>
  7. <field name="arch" type="xml">
  8. <xpath expr="//sheet" position="before">
  9. <header>
  10. <button name="coop_subscribe" string="Subscribe to shift"
  11. class="oe_highlight"
  12. type="object"
  13. groups="beesdoo_shift.group_shift_management"
  14. attrs="{'invisible': [('is_worker', '=', False)]}"/>
  15. <button name="auto_extension" string="Auto Extension"
  16. class="oe_highlight"
  17. type="object"
  18. groups="beesdoo_shift.group_shift_attendance"
  19. attrs="{'invisible': ['|',
  20. ('is_worker', '=', False),
  21. '|',
  22. ('state', '!=', 'suspended'),
  23. ('extension_start_time', '!=', False)]}"/>
  24. <button name="manual_extension" string="Manual Extension"
  25. class="oe_highlight"
  26. type="object"
  27. groups="beesdoo_shift.group_shift_management"
  28. attrs="{'invisible': ['|',
  29. ('is_worker', '=', False),
  30. '|',
  31. ('state', '!=', 'suspended'),
  32. ('extension_start_time', '=', False)]}"/>
  33. <button name="coop_unsubscribe" string="Unsubscribe"
  34. class="oe_highlight"
  35. type="object"
  36. groups="beesdoo_shift.group_shift_management"
  37. attrs="{'invisible': [('is_worker', '=', False)]}"/>
  38. <button name="register_holiday" string="Register Holidays"
  39. class="oe_highlight"
  40. type="object"
  41. groups="beesdoo_shift.group_shift_management"
  42. attrs="{'invisible': ['|', ('is_worker', '=', False), ('state', '!=', 'ok')]}"/>
  43. <button name="temporary_exempt" string="Temporary Exemption"
  44. type="object"
  45. groups="beesdoo_shift.group_shift_management"
  46. attrs="{'invisible': ['|', ('is_worker', '=', False), ('state', '=', 'unsubscribed')]}"/>
  47. <field name="state" widget="statusbar"
  48. attrs="{'invisible': [('is_worker', '=', False)]}"/>
  49. </header>
  50. </xpath>
  51. <xpath expr="//field[@name='type']" position="before">
  52. <field name="is_worker"/>
  53. <field name="can_shop"/>
  54. </xpath>
  55. <xpath expr="//notebook" position="inside">
  56. <page string="Worker information"
  57. attrs="{'invisible': [('is_worker', '=', False)]}"
  58. name="work">
  59. <group name="info_session"/>
  60. <group>
  61. <group>
  62. <field name="info_session"/>
  63. <field name="info_session_date"
  64. attrs="{'invisible': ['|', ('info_session', '=', False)]}"/>
  65. <field name="extension_start_time"
  66. attrs="{'invisible': [('extension_start_time', '=', False)]}"/>
  67. </group>
  68. <group>
  69. <field name="working_mode"/>
  70. <field name="exempt_reason_id"
  71. attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
  72. <field name="super"/>
  73. </group>
  74. </group>
  75. <separator string="Subscribed Shift"/>
  76. <field name="subscribed_shift_ids"/>
  77. </page>
  78. </xpath>
  79. </field>
  80. </record>
  81. <record model="ir.ui.view" id="coop_status_form_view">
  82. <field name="name">Coop Status Form View</field>
  83. <field name="model">cooperative.status</field>
  84. <field name="arch" type="xml">
  85. <form>
  86. <header>
  87. <field name="status" widget="statusbar"/>
  88. </header>
  89. <group>
  90. <group string="General information">
  91. <field name="cooperator_id"/>
  92. <field name="super"/>
  93. <field name="working_mode"/>
  94. <field name="irregular_start_date"
  95. attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
  96. <field name="irregular_absence_date"
  97. attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
  98. <field name="exempt_reason_id"
  99. attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
  100. </group>
  101. <group string="Counter and Status">
  102. <field name="info_session"/>
  103. <field name="info_session_date"/>
  104. <field name="sr"/>
  105. <field name="sc"/>
  106. <field name="irregular_absence_counter"
  107. attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
  108. <field name="unsubscribed"/>
  109. <field name="resigning"/>
  110. <field name="can_shop"/>
  111. </group>
  112. <group string="Timing information">
  113. <field name="next_countdown_date" readonly="1"
  114. attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
  115. <field name="future_alert_date" readonly="1"
  116. attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
  117. <field name="time_extension"/>
  118. <field name="holiday_start_time"/>
  119. <field name="holiday_end_time"/>
  120. <field name="alert_start_time"/>
  121. <field name="extension_start_time"/>
  122. </group>
  123. <group string="Temporary Exemption">
  124. <field name="temporary_exempt_reason_id"/>
  125. <field name="temporary_exempt_start_date"/>
  126. <field name="temporary_exempt_end_date"/>
  127. </group>
  128. </group>
  129. <group groups="base.group_no_one" col="3">
  130. <separator string="For testing purpose only" colspan="3"/>
  131. <field name="today"/>
  132. <button name="clear_history" type="object"
  133. string="Clear History"/>
  134. </group>
  135. <separator string="History" colspan="2"/>
  136. <field name="history_ids">
  137. <tree>
  138. <field name="create_date" string="Date"/>
  139. <field name="type"/>
  140. <field name="change"/>
  141. <field name="user_id"/>
  142. </tree>
  143. </field>
  144. </form>
  145. </field>
  146. </record>
  147. <record model="ir.ui.view" id="coop_status_tree_view">
  148. <field name="name">Coop Status Tree view</field>
  149. <field name="model">cooperative.status</field>
  150. <field name="arch" type="xml">
  151. <tree>
  152. <field name="cooperator_id"/>
  153. <field name="super"/>
  154. <field name="sr"/>
  155. <field name="sc"/>
  156. <field name="time_extension"/>
  157. <field name="holiday_start_time"/>
  158. <field name="holiday_end_time"/>
  159. <field name="alert_start_time"/>
  160. <field name="extension_start_time"/>
  161. <field name="status" />
  162. </tree>
  163. </field>
  164. </record>
  165. <record model="ir.ui.view" id="journal_form_view">
  166. <field name="name">Journal Form View</field>
  167. <field name="model">beesdoo.shift.journal</field>
  168. <field name="arch" type="xml">
  169. <form>
  170. <header>
  171. <button name="run" string="Run again for this day"
  172. type="object"/>
  173. </header>
  174. <group>
  175. <group>
  176. <field name="date"/>
  177. </group>
  178. </group>
  179. <separator string="Assigned cooperator"/>
  180. <field name="line_ids" readonly="1">
  181. <tree>
  182. <field name="cooperator_id"/>
  183. </tree>
  184. </field>
  185. </form>
  186. </field>
  187. </record>
  188. <!-- Actions -->
  189. <record model="ir.actions.act_window" id="action_coop_status">
  190. <field name="name">Cooperator Status</field>
  191. <field name="res_model">cooperative.status</field>
  192. <field name="view_mode">tree,form</field>
  193. </record>
  194. <record model="ir.actions.act_window" id="action_worker">
  195. <field name="name">Worker</field>
  196. <field name="res_model">res.partner</field>
  197. <field name="view_mode">kanban,tree,form</field>
  198. <field name="domain">[('is_worker', '=', True)]</field>
  199. </record>
  200. <record model="ir.actions.act_window" id="action_journal">
  201. <field name="name">Counter Journal</field>
  202. <field name="res_model">beesdoo.shift.journal</field>
  203. <field name="view_mode">tree,form</field>
  204. </record>
  205. </odoo>