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.

120 lines
5.9 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="field_function"/>
  14. <field name="field_id"/>
  15. <field name="user_id"/>
  16. </tree>
  17. </field>
  18. </record>
  19. <record model="ir.ui.view" id="dashboard_tile_tile_form_view">
  20. <field name="name">tile.tile.form</field>
  21. <field name="model">tile.tile</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. <field name="field_function"/>
  31. <field name="field_id"/>
  32. <field name="color" widget="color"/>
  33. <field name="font_color" widget="color"/>
  34. </group>
  35. </form>
  36. </field>
  37. </record>
  38. <!-- CRM Lead Kanban View -->
  39. <record model="ir.ui.view" id="dashboard_tile_tile_kanban_view">
  40. <field name="name">tile.tile.kanban</field>
  41. <field name="model">tile.tile</field>
  42. <field name="arch" type="xml">
  43. <kanban edit="false" create="false">
  44. <field name="name"/>
  45. <field name="domain"/>
  46. <field name="model_id"/>
  47. <field name="action_id"/>
  48. <field name="count"/>
  49. <field name="color"/>
  50. <field name="font_color"/>
  51. <field name="field_id" />
  52. <field name="field_function" />
  53. <field name="helper" />
  54. <templates>
  55. <t t-name="kanban-box">
  56. <div t-attf-class="oe_dashbaord_tile oe_kanban_global_click" t-attf-style="background-color:#{record.color.raw_value}" >
  57. <div class="oe_kanban_content">
  58. <a type="object" name="open_link" args="[]" t-attf-style="color:#{record.font_color.raw_value};">
  59. <div class="tile_label">
  60. <b><field name="name"/></b>
  61. </div>
  62. <div style="padding-left: 0.5em; height: 115px;">
  63. </div>
  64. <t t-if="record.field_id.raw_value != '' and record.field_function.raw_value != '' and record.count.raw_value !=0">
  65. <div class="tile_count_with_computed_value">
  66. <span><field name="count"/></span>
  67. </div>
  68. <div class="tile_computed_value" t-att-title="record.helper.raw_value">
  69. <img t-att-src="_s + '/web_dashboard_tile/static/src/img/' + record.field_function.raw_value + '.png'"/>
  70. <span><field name="computed_value"/></span>
  71. </div>
  72. </t>
  73. <t t-if="!(record.field_id.raw_value != '' and record.field_function.raw_value != '' and record.count.raw_value !=0)">
  74. <div class="tile_count_without_computed_value">
  75. <span><field name="count"/></span>
  76. </div>
  77. </t>
  78. </a>
  79. </div>
  80. <div class="oe_clear"></div>
  81. </div>
  82. </t>
  83. </templates>
  84. </kanban>
  85. </field>
  86. </record>
  87. <record model="ir.actions.act_window" id="action_tree_dashboard_tile">
  88. <field name="name">Dashboard</field>
  89. <field name="res_model">tile.tile</field>
  90. <field name="view_type">form</field>
  91. <field name="view_mode">tree,kanban,form</field>
  92. <field name="view_id" ref="dashboard_tile_tile_tree_view"/>
  93. </record>
  94. <menuitem id="menue_dashboard_tile"
  95. name="Dashboard Tile" parent="base.next_id_2"
  96. action="action_tree_dashboard_tile" sequence="50"/>
  97. <record model="ir.actions.act_window" id="action_kanban_dashboard_tile">
  98. <field name="name">Dashboard</field>
  99. <field name="res_model">tile.tile</field>
  100. <field name="view_type">form</field>
  101. <field name="view_mode">kanban</field>
  102. <field name="domain">['|',('user_id','=',False),('user_id','=',uid)]</field>
  103. <field name="view_id" ref="dashboard_tile_tile_tree_view"/>
  104. </record>
  105. <record id="mail_dashboard" model="ir.ui.menu">
  106. <field name="name">Dashboard</field>
  107. <field name="sequence" eval="9"/>
  108. <field name="action" ref="action_kanban_dashboard_tile"/>
  109. <field name="parent_id" ref="mail.mail_feeds"/>
  110. </record>
  111. </data>
  112. </openerp>