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.

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