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.

193 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="time_extension" />
  86. <field name="holiday_start_time" />
  87. <field name="holiday_end_time" />
  88. <field name="alert_start_time" />
  89. <field name="extension_start_time" />
  90. </group>
  91. <group string="Temporary Exemption">
  92. <field name="temporary_exempt_reason_id" />
  93. <field name="temporary_exempt_start_date" />
  94. <field name="temporary_exempt_end_date" />
  95. </group>
  96. </group>
  97. <group groups="base.group_no_one" col="3">
  98. <separator string="For testing purpose only" colspan="3"/>
  99. <field name="today" />
  100. <button name="clear_history" type="object" string="Clear History" />
  101. </group>
  102. <separator string="History" colspan="2"/>
  103. <field name="history_ids">
  104. <tree>
  105. <field name="create_date" string="Date" />
  106. <field name="type" />
  107. <field name="change" />
  108. <field name="user_id" />
  109. </tree>
  110. </field>
  111. </form>
  112. </field>
  113. </record>
  114. <record model="ir.ui.view" id="coop_status_tree_view">
  115. <field name="name">Coop Status Tree view</field>
  116. <field name="model">cooperative.status</field>
  117. <field name="arch" type="xml">
  118. <tree>
  119. <field name="cooperator_id" />
  120. <field name="super" />
  121. <field name="sr" />
  122. <field name="sc" />
  123. <field name="time_extension" />
  124. <field name="holiday_start_time" />
  125. <field name="holiday_end_time" />
  126. <field name="alert_start_time" />
  127. <field name="extension_start_time" />
  128. <field name="status" widget="statusbar" />
  129. </tree>
  130. </field>
  131. </record>
  132. <record model="ir.ui.view" id="journal_form_view">
  133. <field name="name">Journal Form View</field>
  134. <field name="model">beesdoo.shift.journal</field>
  135. <field name="arch" type="xml">
  136. <form>
  137. <header>
  138. <button name="run" string="Run again for this day" type="object" />
  139. </header>
  140. <group>
  141. <group>
  142. <field name="date" />
  143. </group>
  144. </group>
  145. <separator string="Affected cooperator" />
  146. <field name="line_ids" readonly="1">
  147. <tree>
  148. <field name="cooperator_id" />
  149. </tree>
  150. </field>
  151. </form>
  152. </field>
  153. </record>
  154. <record model="ir.actions.act_window" id="action_coop_status">
  155. <field name="name">Cooperator Status</field>
  156. <field name="res_model">cooperative.status</field>
  157. <field name="view_mode">tree,form</field>
  158. </record>
  159. <menuitem name="Status" id="menu_status_top" parent="menu_root"
  160. groups="beesdoo_shift.group_shift_management" sequence="20" />
  161. <menuitem name="Cooperative Status" id="menu_status" parent="menu_status_top"
  162. action="action_coop_status" groups="beesdoo_shift.group_cooperative_admin" />
  163. <!-- Actions -->
  164. <record model="ir.actions.act_window" id="action_worker">
  165. <field name="name">Worker</field>
  166. <field name="res_model">res.partner</field>
  167. <field name="view_mode">kanban,tree,form</field>
  168. <field name="domain">[('cooperator_type', '=', 'share_a')]</field>
  169. </record>
  170. <menuitem name="Worker" id="menu_worker_top" parent="menu_root"
  171. sequence="1" />
  172. <menuitem name="Worker" id="menu_worker" parent="menu_worker_top"
  173. action="action_worker" />
  174. <record model="ir.actions.act_window" id="action_journal">
  175. <field name="name">Counter Journal</field>
  176. <field name="res_model">beesdoo.shift.journal</field>
  177. <field name="view_mode">tree,form</field>
  178. </record>
  179. <menuitem name="Counter Update Journal" id="menu_journal" parent="menu_status_top"
  180. action="action_journal" groups="beesdoo_shift.group_cooperative_admin" />
  181. </odoo>