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.

196 lines
9.9 KiB

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