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.

128 lines
6.6 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="arch" type="xml">
  8. <tree string="Dashboard tiles">
  9. <field name="sequence" widget="handle"/>
  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="arch" type="xml">
  22. <form string="Dashboard tiles" version="7.0">
  23. <group>
  24. <field name="name"/>
  25. <field name="domain"/>
  26. <field name="model_id"/>
  27. <field name="user_id"/>
  28. <field name="action_id"/>
  29. <field name="field_function"/>
  30. <field name="field_id"/>
  31. <field name="color" widget="color"/>
  32. <field name="font_color" widget="color"/>
  33. </group>
  34. </form>
  35. </field>
  36. </record>
  37. <!-- CRM Lead Kanban View -->
  38. <record model="ir.ui.view" id="dashboard_tile_tile_kanban_view">
  39. <field name="name">tile.tile.kanban</field>
  40. <field name="model">tile.tile</field>
  41. <field name="arch" type="xml">
  42. <kanban edit="false" create="false">
  43. <field name="name"/>
  44. <field name="domain"/>
  45. <field name="model_id"/>
  46. <field name="action_id"/>
  47. <field name="count"/>
  48. <field name="color"/>
  49. <field name="font_color"/>
  50. <field name="field_id" />
  51. <field name="field_function" />
  52. <field name="helper" />
  53. <templates>
  54. <t t-name="kanban-box">
  55. <div t-attf-class="oe_dashbaord_tile oe_kanban_global_click" t-attf-style="background-color:#{record.color.raw_value}" >
  56. <!-- FIXME: icon is hidden and edit not working if you have no form view need more JS in the future -->
  57. <div class="oe_dropdown_toggle oe_dropdown_kanban">
  58. <span class="oe_e">í</span>
  59. <ul class="oe_dropdown_menu">
  60. <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
  61. <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
  62. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  63. </ul>
  64. </div>
  65. <div class="oe_kanban_content">
  66. <a type="object" name="open_link" args="[]" t-attf-style="color:#{record.font_color.raw_value};">
  67. <div class="tile_label">
  68. <b><field name="name"/></b>
  69. </div>
  70. <div style="padding-left: 0.5em; height: 115px;">
  71. </div>
  72. <t t-if="record.field_id.raw_value != '' and record.field_function.raw_value != '' and record.count.raw_value !=0">
  73. <div class="tile_count_with_computed_value">
  74. <span><field name="count"/></span>
  75. </div>
  76. <div class="tile_computed_value" t-att-title="record.helper.raw_value">
  77. <img t-att-src="_s + '/web_dashboard_tile/static/src/img/' + record.field_function.raw_value + '.png'"/>
  78. <span><field name="computed_value"/></span>
  79. </div>
  80. </t>
  81. <t t-if="!(record.field_id.raw_value != '' and record.field_function.raw_value != '' and record.count.raw_value !=0)">
  82. <div class="tile_count_without_computed_value">
  83. <span><field name="count"/></span>
  84. </div>
  85. </t>
  86. </a>
  87. </div>
  88. <div class="oe_clear"></div>
  89. </div>
  90. </t>
  91. </templates>
  92. </kanban>
  93. </field>
  94. </record>
  95. <record model="ir.actions.act_window" id="action_tree_dashboard_tile">
  96. <field name="name">Dashboard</field>
  97. <field name="res_model">tile.tile</field>
  98. <field name="view_type">form</field>
  99. <field name="view_mode">tree,kanban,form</field>
  100. <field name="view_id" ref="dashboard_tile_tile_tree_view"/>
  101. </record>
  102. <menuitem id="menue_dashboard_tile"
  103. name="Dashboard Tile" parent="base.next_id_2"
  104. action="action_tree_dashboard_tile" sequence="50"/>
  105. <record model="ir.actions.act_window" id="action_kanban_dashboard_tile">
  106. <field name="name">Dashboard</field>
  107. <field name="res_model">tile.tile</field>
  108. <field name="view_type">form</field>
  109. <field name="view_mode">kanban</field>
  110. <field name="domain">['|',('user_id','=',False),('user_id','=',uid)]</field>
  111. <field name="view_id" ref="dashboard_tile_tile_tree_view"/>
  112. </record>
  113. <record id="mail_dashboard" model="ir.ui.menu">
  114. <field name="name">Dashboard</field>
  115. <field name="sequence" eval="9"/>
  116. <field name="action" ref="action_kanban_dashboard_tile"/>
  117. <field name="parent_id" ref="mail.mail_feeds"/>
  118. </record>
  119. </data>
  120. </openerp>