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.

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