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.

112 lines
5.2 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="dashboard_tile_tile_tree_view">
  5. <field name="name">tile.tile.tree</field>
  6. <field name="model">tile.tile</field>
  7. <field name="type">tree</field>
  8. <field name="arch" type="xml">
  9. <tree string="Dashboard tiles">
  10. <field name="name"/>
  11. <field name="domain"/>
  12. <field name="model_id"/>
  13. <field name="action_id"/>
  14. <field name="count"/>
  15. </tree>
  16. </field>
  17. </record>
  18. <record model="ir.ui.view" id="dashboard_tile_tile_form_view">
  19. <field name="name">tile.tile.form</field>
  20. <field name="model">tile.tile</field>
  21. <field name="type">form</field>
  22. <field name="arch" type="xml">
  23. <form string="Dashboard tiles" version="7.0">
  24. <group>
  25. <field name="name"/>
  26. <field name="domain"/>
  27. <field name="model_id"/>
  28. <field name="user_id"/>
  29. <field name="action_id"/>
  30. </group>
  31. </form>
  32. </field>
  33. </record>
  34. <!-- CRM Lead Kanban View -->
  35. <record model="ir.ui.view" id="dashboard_tile_tile_kanban_view">
  36. <field name="name">tile.tile.kanban</field>
  37. <field name="model">tile.tile</field>
  38. <field name="type">kanban</field>
  39. <field name="arch" type="xml">
  40. <kanban edit="false" create="false">
  41. <field name="name"/>
  42. <field name="domain"/>
  43. <field name="model_id"/>
  44. <field name="action_id"/>
  45. <field name="count"/>
  46. <field name="color"/>
  47. <templates>
  48. <t t-name="kanban-box">
  49. <div t-attf-class="oe_tile_color_#{kanban_getcolor(record.color.raw_value)} oe_dashbaord_tile oe_kanban_global_click" >
  50. <!-- FIXME: icon is hidden and edit not working if you have no form view
  51. need more JS in the future -->
  52. <div class="oe_dropdown_toggle oe_dropdown_kanban">
  53. <span class="oe_e">í</span>
  54. <ul class="oe_dropdown_menu">
  55. <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
  56. <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
  57. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  58. </ul>
  59. </div>
  60. <div class="oe_kanban_content">
  61. <a type="object" name="open_link" args="[]">
  62. <div class="tile_label">
  63. <b><field name="name"/></b>
  64. </div>
  65. <div style="padding-left: 0.5em; height: 115px;">
  66. </div>
  67. <div class="tile_count">
  68. <span><field name="count"/></span>
  69. </div>
  70. </a>
  71. </div>
  72. <div class="oe_clear"></div>
  73. </div>
  74. </t>
  75. </templates>
  76. </kanban>
  77. </field>
  78. </record>
  79. <record model="ir.actions.act_window" id="action_tree_dashboard_tile">
  80. <field name="name">Dashboard</field>
  81. <field name="res_model">tile.tile</field>
  82. <field name="view_type">form</field>
  83. <field name="view_mode">tree,kanban,form</field>
  84. <field name="view_id" ref="dashboard_tile_tile_tree_view"/>
  85. </record>
  86. <menuitem id="menue_dashboard_tile"
  87. name="Dashboard Tile" parent="base.next_id_2"
  88. action="action_tree_dashboard_tile" sequence="50"/>
  89. <record model="ir.actions.act_window" id="action_kanban_dashboard_tile">
  90. <field name="name">Dashboard</field>
  91. <field name="res_model">tile.tile</field>
  92. <field name="view_type">form</field>
  93. <field name="view_mode">kanban</field>
  94. <field name="domain">['|',('user_id','=',False),('user_id','=',uid)]</field>
  95. <field name="view_id" ref="dashboard_tile_tile_tree_view"/>
  96. </record>
  97. <record id="mail_dashboard" model="ir.ui.menu">
  98. <field name="name">Dashboard</field>
  99. <field name="sequence" eval="9"/>
  100. <field name="action" ref="action_kanban_dashboard_tile"/>
  101. <field name="parent_id" ref="mail.mail_feeds"/>
  102. </record>
  103. </data>
  104. </openerp>