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.

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