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.

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