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.

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