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.

150 lines
7.2 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" attrs="{'readonly':[('duration_field_id','!=',False)]}"/>
  37. </group>
  38. </group>
  39. <group string="Description">
  40. <field name="description_type"/>
  41. <newline/>
  42. <field name="description_field_id" attrs="{'required':[('description_type','!=','code')], 'invisible':[('description_type','==','code')]}"/>
  43. <group colspan="4" col="1" attrs="{'invisible':[('description_type','!=','code')]}">
  44. <label string="Use '${o}' to refer to the involved object. E.g.: '${o.project_id.name}'" />
  45. <field name="description_code" nolabel="1" attrs="{'required':[('description_type','==','code')]}"/>
  46. </group>
  47. </group>
  48. </form>
  49. </field>
  50. <newline/>
  51. <button name="generate_calendar_records" string="Generate Calendar" type="object" icon="gtk-go-forward" colspan="2"/>
  52. </form>
  53. </field>
  54. </record>
  55. <record model="ir.actions.act_window" id="super_calendar_configurator">
  56. <field name="name">Calendar Configurators</field>
  57. <field name="res_model">super.calendar.configurator</field>
  58. <field name="view_type">form</field>
  59. <field name="view_mode">tree,form</field>
  60. <field name="view_id" ref="super_calendar_configurator_tree"/>
  61. </record>
  62. <!-- Calendar -->
  63. <record model="ir.ui.view" id="super_calendar_tree">
  64. <field name="name">super_calendar_tree</field>
  65. <field name="model">super.calendar</field>
  66. <field name="arch" type="xml">
  67. <tree string="Calendar">
  68. <field name="name"/>
  69. <field name="date_start"/>
  70. <field name="duration"/>
  71. <field name="user_id"/>
  72. <field name="configurator_id"/>
  73. <field name="model_id"/>
  74. </tree>
  75. </field>
  76. </record>
  77. <record model="ir.ui.view" id="super_calendar_form">
  78. <field name="name">super_calendar_form</field>
  79. <field name="model">super.calendar</field>
  80. <field name="arch" type="xml">
  81. <form string="Calendar">
  82. <sheet>
  83. <group>
  84. <field name="name" readonly="1"/>
  85. <field name="date_start" readonly="1"/>
  86. <field name="duration" readonly="1"/>
  87. <field name="user_id" readonly="1"/>
  88. <field name="configurator_id" readonly="1"/>
  89. <field name="model_id" readonly="1"/>
  90. <field name="res_id" readonly="1"/>
  91. </group>
  92. </sheet>
  93. </form>
  94. </field>
  95. </record>
  96. <record model="ir.ui.view" id="super_calendar">
  97. <field name="name">super_calendar</field>
  98. <field name="model">super.calendar</field>
  99. <field name="arch" type="xml">
  100. <calendar string="Calendar" color="model_id" date_start="date_start" date_delay="duration" quick_add="false">
  101. <field name="name"/>
  102. </calendar>
  103. </field>
  104. </record>
  105. <record model="ir.ui.view" id="super_calendar_search">
  106. <field name="name">super_calendar_search</field>
  107. <field name="model">super.calendar</field>
  108. <field name="arch" type="xml">
  109. <search string="Search Calendar" >
  110. <field name="name"/>
  111. <field name="configurator_id" select="1"/>
  112. <field name="model_id" select="1"/>
  113. <field name="user_id" widget="selection" >
  114. <filter domain="[('user_id','=',uid)]" help="My Items" icon="terp-personal"/>
  115. </field>
  116. <newline/>
  117. <group expand="0" string="Extended Filters..." colspan="4" col="8">
  118. <field name="date_start" />
  119. <!--<field name="date_stop" />-->
  120. <field name="duration" />
  121. </group>
  122. </search>
  123. </field>
  124. </record>
  125. <record model="ir.actions.act_window" id="super_calendar_action">
  126. <field name="name">Super Calendar</field>
  127. <field name="res_model">super.calendar</field>
  128. <field name="view_type">form</field>
  129. <field name="view_mode">calendar,tree,form</field>
  130. <field name="view_id" ref="super_calendar"/>
  131. </record>
  132. <menuitem id="super_calendar_menu" name="Super Calendar" action="super_calendar_action"/>
  133. <menuitem id="super_calendar_calendar" name="Calendar" parent="super_calendar_menu" />
  134. <menuitem id="super_calendar_calendar_calendar" name="Calendar" parent="super_calendar_calendar" action="super_calendar_action"/>
  135. <menuitem id="super_calendar_configuration" name="Configuration" parent="super_calendar_menu" />
  136. <menuitem id="super_calendar_configurators" name="Configurators" parent="super_calendar_configuration" action="super_calendar_configurator"/>
  137. </data>
  138. </openerp>