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.

161 lines
7.5 KiB

  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <!-- Configurator -->
  5. <record model="ir.ui.view" id="super_calendar_configurator_tree">
  6. <field name="name">super_calendar_configurator_tree</field>
  7. <field name="model">super.calendar.configurator</field>
  8. <field name="arch" type="xml">
  9. <tree string="Configurators">
  10. <field name="name"/>
  11. </tree>
  12. </field>
  13. </record>
  14. <record model="ir.ui.view" id="super_calendar_configurator_form">
  15. <field name="name">super_calendar_configurator_form</field>
  16. <field name="model">super.calendar.configurator</field>
  17. <field name="arch" type="xml">
  18. <form string="Configurator">
  19. <field name="name" select="1" colspan="2"/>
  20. <newline/>
  21. <field name="line_ids" nolabel="1" colspan="4">
  22. <tree string="Lines">
  23. <field name="name"/>
  24. <field name="domain"/>
  25. </tree>
  26. <form string="Line">
  27. <group>
  28. <group>
  29. <field name="name"/>
  30. <field name="domain"/>
  31. <field name="user_field_id"/>
  32. </group>
  33. <group>
  34. <field name="date_start_field_id"/>
  35. <field name="duration_field_id"/>
  36. <field name="date_stop_field_id"
  37. attrs="{'readonly':[('duration_field_id','!=',False)], 'visible': [('duration_field_id','!=',False)]}"/>
  38. </group>
  39. </group>
  40. <group string="Description">
  41. <field name="description_type"/>
  42. <newline/>
  43. <field name="description_field_id"
  44. attrs="{'required':[('description_type','!=','code')], 'invisible':[('description_type','==','code')]}"/>
  45. <group colspan="4" col="1" attrs="{'invisible':[('description_type','!=','code')]}">
  46. <label string="Use '${o}' to refer to the involved object. E.g.: '${o.project_id.name}'" />
  47. <field name="description_code" nolabel="1"
  48. attrs="{'required':[('description_type','==','code')]}"/>
  49. </group>
  50. </group>
  51. </form>
  52. </field>
  53. <newline/>
  54. <button name="generate_calendar_records"
  55. string="Generate Calendar" type="object" icon="gtk-go-forward" colspan="2"/>
  56. </form>
  57. </field>
  58. </record>
  59. <record model="ir.actions.act_window" id="super_calendar_configurator">
  60. <field name="name">Calendar Configurators</field>
  61. <field name="res_model">super.calendar.configurator</field>
  62. <field name="view_type">form</field>
  63. <field name="view_mode">tree,form</field>
  64. <field name="view_id" ref="super_calendar_configurator_tree"/>
  65. </record>
  66. <!-- Calendar -->
  67. <record model="ir.ui.view" id="super_calendar_tree">
  68. <field name="name">super_calendar_tree</field>
  69. <field name="model">super.calendar</field>
  70. <field name="arch" type="xml">
  71. <tree string="Calendar">
  72. <field name="name"/>
  73. <field name="date_start"/>
  74. <field name="duration"/>
  75. <field name="user_id"/>
  76. <field name="configurator_id"/>
  77. <field name="model_id"/>
  78. </tree>
  79. </field>
  80. </record>
  81. <record model="ir.ui.view" id="super_calendar_form">
  82. <field name="name">super_calendar_form</field>
  83. <field name="model">super.calendar</field>
  84. <field name="arch" type="xml">
  85. <form string="Calendar">
  86. <sheet>
  87. <group>
  88. <field name="name" readonly="1"/>
  89. <field name="date_start" readonly="1"/>
  90. <field name="duration" readonly="1"/>
  91. <field name="user_id" readonly="1"/>
  92. <field name="configurator_id" readonly="1"/>
  93. <field name="model_id" readonly="1"/>
  94. <field name="res_id" readonly="1"/>
  95. </group>
  96. </sheet>
  97. </form>
  98. </field>
  99. </record>
  100. <record model="ir.ui.view" id="super_calendar">
  101. <field name="name">super_calendar</field>
  102. <field name="model">super.calendar</field>
  103. <field name="arch" type="xml">
  104. <calendar string="Calendar" color="model_id"
  105. date_start="date_start" date_delay="duration"
  106. quick_add="false">
  107. <field name="name"/>
  108. </calendar>
  109. </field>
  110. </record>
  111. <record model="ir.ui.view" id="super_calendar_search">
  112. <field name="name">super_calendar_search</field>
  113. <field name="model">super.calendar</field>
  114. <field name="arch" type="xml">
  115. <search string="Search Calendar" >
  116. <field name="name"/>
  117. <field name="configurator_id" select="1"/>
  118. <field name="model_id" select="1"/>
  119. <field name="user_id" widget="selection" >
  120. <filter domain="[('user_id','=',uid)]" help="My Items" icon="terp-personal"/>
  121. </field>
  122. <newline/>
  123. <group expand="0" string="Extended Filters..." colspan="4" col="8">
  124. <field name="date_start" />
  125. <!--<field name="date_stop" />-->
  126. <field name="duration" />
  127. </group>
  128. </search>
  129. </field>
  130. </record>
  131. <record model="ir.actions.act_window" id="super_calendar_action">
  132. <field name="name">Super Calendar</field>
  133. <field name="res_model">super.calendar</field>
  134. <field name="view_type">form</field>
  135. <field name="view_mode">calendar,tree,form</field>
  136. <field name="view_id" ref="super_calendar"/>
  137. </record>
  138. <menuitem id="super_calendar_menu" name="Super Calendar"
  139. action="super_calendar_action"/>
  140. <menuitem id="super_calendar_calendar" name="Calendar"
  141. parent="super_calendar_menu" />
  142. <menuitem id="super_calendar_calendar_calendar" name="Calendar"
  143. parent="super_calendar_calendar" action="super_calendar_action"/>
  144. <menuitem id="super_calendar_configuration" name="Configuration"
  145. parent="super_calendar_menu" />
  146. <menuitem id="super_calendar_configurators" name="Configurators"
  147. parent="super_calendar_configuration" action="super_calendar_configurator"/>
  148. </data>
  149. </openerp>