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.

156 lines
7.6 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="description"/>
  25. <field name="domain"/>
  26. </tree>
  27. <form string="Line">
  28. <group>
  29. <group>
  30. <field name="name"/>
  31. <field name="description"/>
  32. <field name="domain"/>
  33. <field name="user_field_id"/>
  34. </group>
  35. <group>
  36. <field name="date_start_field_id"/>
  37. <field name="duration_field_id"/>
  38. <field name="date_stop_field_id" attrs="{'readonly':[('duration_field_id','!=',False)]}"/>
  39. </group>
  40. </group>
  41. <group string="Description">
  42. <field name="description_type"/>
  43. <newline/>
  44. <field name="description_field_id" 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" attrs="{'required':[('description_type','==','code')]}"/>
  48. </group>
  49. </group>
  50. </form>
  51. </field>
  52. <newline/>
  53. <button name="generate_calendar_records" string="Generate Calendar" type="object" icon="gtk-go-forward" colspan="2"/>
  54. </form>
  55. </field>
  56. </record>
  57. <record model="ir.actions.act_window" id="super_calendar_configurator">
  58. <field name="name">Calendar Configurators</field>
  59. <field name="res_model">super.calendar.configurator</field>
  60. <field name="view_type">form</field>
  61. <field name="view_mode">tree,form</field>
  62. <field name="view_id" ref="super_calendar_configurator_tree"/>
  63. </record>
  64. <!-- Calendar -->
  65. <record model="ir.ui.view" id="super_calendar_tree">
  66. <field name="name">super_calendar_tree</field>
  67. <field name="model">super.calendar</field>
  68. <field name="arch" type="xml">
  69. <tree string="Calendar">
  70. <field name="name"/>
  71. <field name="date_start"/>
  72. <field name="duration"/>
  73. <field name="user_id"/>
  74. <field name="configurator_id"/>
  75. <field name="model_id"/>
  76. <field name="model_description"/>
  77. </tree>
  78. </field>
  79. </record>
  80. <record model="ir.ui.view" id="super_calendar_form">
  81. <field name="name">super_calendar_form</field>
  82. <field name="model">super.calendar</field>
  83. <field name="arch" type="xml">
  84. <form string="Calendar">
  85. <sheet>
  86. <group>
  87. <field name="name" readonly="1"/>
  88. <field name="date_start" readonly="1"/>
  89. <field name="duration" readonly="1"/>
  90. <field name="user_id" readonly="1"/>
  91. <field name="configurator_id" readonly="1"/>
  92. <field name="model_id" readonly="1"/>
  93. <field name="model_description" 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" date_start="date_start" date_delay="duration" quick_add="false">
  105. <!--The color attribute should be: model_description but v8 calendars require many2one fields-->
  106. <field name="name"/>
  107. </calendar>
  108. </field>
  109. </record>
  110. <record model="ir.ui.view" id="super_calendar_search">
  111. <field name="name">super_calendar_search</field>
  112. <field name="model">super.calendar</field>
  113. <field name="arch" type="xml">
  114. <search string="Search Calendar" >
  115. <field name="name"/>
  116. <field name="configurator_id" select="1"/>
  117. <field name="model_id" select="1"/>
  118. <field name="model_description" 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" action="super_calendar_action"/>
  139. <menuitem id="super_calendar_calendar" name="Calendar" parent="super_calendar_menu" />
  140. <menuitem id="super_calendar_calendar_calendar" name="Calendar" parent="super_calendar_calendar" action="super_calendar_action"/>
  141. <menuitem id="super_calendar_configuration" name="Configuration" parent="super_calendar_menu" />
  142. <menuitem id="super_calendar_configurators" name="Configurators" parent="super_calendar_configuration" action="super_calendar_configurator"/>
  143. </data>
  144. </openerp>