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.

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