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.
 
 
 
 
 

161 lines
8.3 KiB

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="dashboard_tile_tile_tree_view">
<field name="model">tile.tile</field>
<field name="arch" type="xml">
<tree string="Dashboard tiles">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="domain"/>
<field name="model_id"/>
<field name="primary_function"/>
<field name="primary_field_id"/>
<field name="secondary_function"/>
<field name="secondary_field_id"/>
<field name="user_id"/>
<field name="background_color" widget="color"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="dashboard_tile_tile_form_view">
<field name="model">tile.tile</field>
<field name="arch" type="xml">
<form string="Dashboard tiles">
<sheet>
<h1>
<field name="name"/>
</h1>
<group col="4">
<separator string="Display" colspan="4"/>
<field name="background_color" widget="color"/>
<field name="font_color" widget="color"/>
<field name="user_id"/>
<separator string="Technical Informations" colspan="4"/>
<field name="model_id"/>
<field name="action_id"/>
<field name="domain" colspan="4"/>
<separator colspan="4"/>
<field name="error" attrs="{'invisible':[('error','=',False)]}"/>
</group>
<notebook>
<page string="Main Value">
<group>
<group>
<field name="primary_function"/>
<field name="primary_field_id" attrs="{
'invisible':[('primary_function','in',[False,'count'])],
'required':[('primary_function','not in',[False,'count'])],
}"/>
</group>
<group>
<field name="primary_format"/>
</group>
<group>
<field name="primary_helper"/>
<field name="primary_value" attrs="{'invisible':[('primary_value','=',False)]}"/>
</group>
</group>
</page>
<page string="Secondary Value">
<group>
<group>
<field name="secondary_function"/>
<field name="secondary_field_id" attrs="{
'invisible':[('secondary_function','in',[False,'count'])],
'required':[('secondary_function','not in',[False,'count'])],
}"/>
</group>
<group>
<field name="secondary_format"/>
</group>
<group>
<field name="secondary_helper"/>
<field name="secondary_value" attrs="{'invisible':[('secondary_value','=',False)]}"/>
</group>
</group>
</page>
<page string="Groups">
<field name="group_ids"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- CRM Lead Kanban View -->
<record model="ir.ui.view" id="dashboard_tile_tile_kanban_view">
<field name="model">tile.tile</field>
<field name="arch" type="xml">
<kanban edit="false" create="false">
<field name="name"/>
<field name="domain"/>
<field name="model_id"/>
<field name="action_id"/>
<field name="background_color"/>
<field name="font_color"/>
<field name="primary_function"/>
<field name="primary_helper"/>
<field name="secondary_function"/>
<field name="secondary_helper"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_dashboard_tile oe_kanban_global_click" t-attf-style="background-color:#{record.background_color.raw_value}" >
<div class="oe_kanban_content">
<a type="object" name="open_link" args="[]" t-attf-style="color:#{record.font_color.raw_value};">
<div style="height:100%;" t-att-class="record.secondary_function.raw_value and 'with_secondary' or 'simple'">
<div class="tile_label">
<field name="name"/>
</div>
<div class="tile_primary_value" t-att-title="record.primary_helper.raw_value">
<t t-set="l" t-value="record.primary_value.raw_value.length" />
<t t-set="s" t-value="l>=12 and 35 or l>=10 and 45 or l>=8 and 55 or l>=6 and 75 or l>4 and 85 or 100"/>
<span t-attf-style="font-size: #{s}%;"><field name="primary_value"/></span>
</div>
<div class="tile_secondary_value" t-att-title="record.secondary_helper.raw_value">
<span><field name="secondary_value"/></span>
</div>
</div>
</a>
</div>
<div class="oe_clear"></div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record model="ir.actions.act_window" id="action_tree_dashboard_tile">
<field name="name">Dashboard</field>
<field name="res_model">tile.tile</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_id" ref="dashboard_tile_tile_tree_view"/>
</record>
<menuitem id="menue_dashboard_tile"
name="Dashboard Tile" parent="base.next_id_2"
action="action_tree_dashboard_tile" sequence="50"/>
<record model="ir.actions.act_window" id="action_kanban_dashboard_tile">
<field name="name">Dashboard</field>
<field name="res_model">tile.tile</field>
<field name="view_type">form</field>
<field name="view_mode">kanban</field>
<field name="domain">['|',('user_id','=',False),('user_id','=',uid)]</field>
<field name="view_id" ref="dashboard_tile_tile_tree_view"/>
</record>
<record id="mail_dashboard" model="ir.ui.menu">
<field name="name">Dashboard</field>
<field name="sequence" eval="9"/>
<field name="action" ref="action_kanban_dashboard_tile"/>
<field name="parent_id" ref="mail.mail_feeds"/>
</record>
</data>
</openerp>