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.
 
 
 
 
 

74 lines
3.8 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Form view of the dashboard block-->
<record id="dashboard_block_view_form" model="ir.ui.view">
<field name="name">dashboard.block.view.form</field>
<field name="model">dashboard.block</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<div>
<field name="name" class="oe_inline"
style="font-size: 30px;"
placeholder="Block Name" required="1"/>
</div>
</group>
</group>
<group>
<group>
<field name="model_id"
attrs="{'required':[('edit_mode','=', True)]}"/>
<field name="client_action_id" invisible="1"/>
<field name="model_name" invisible="1"/>
<field name="edit_mode" invisible="1"/>
<field name="operation"
attrs="{'required':[('edit_mode','=', True)]}"/>
<field name="measured_field_id" required="1"
domain="[('model_id','=',model_id), ('ttype','in',['float','integer','monetary']), ('store', '=', True)]"
attrs="{'required':[('edit_mode','=', True)]}"/>
<field name="filter" widget="domain"
options="{'model': 'model_name'}"/>
</group>
</group>
<group string="Block Information">
<group>
<field name="type" required="1"/>
<field name="graph_type"
attrs="{'invisible': [('type','!=', 'graph')]}"/>
<field name="graph_size"
attrs="{'invisible': [('type','!=', 'graph')]}"/>
<field name="fa_icon"
attrs="{'invisible': [('type','!=', 'tile')]}"/>
<field name="group_by_id"
attrs="{'invisible': [('type','!=', 'graph')], 'required':[('type','=','graph')]}"
domain="[('model_id','=',model_id),('relation','!=','res.users'), ('ttype','not in',['one2many','many2many']), ('store', '=', True)]"/>
<field name="tile_color"
attrs="{'invisible': [('type','!=', 'tile')]}"
widget="color" class="mb-4 o_im_livechat_field_widget_color"/>
<field name="val_color"
attrs="{'invisible': [('type','!=', 'tile')]}"
widget="color"/>
<field name="text_color"
attrs="{'invisible': [('type','!=', 'tile')]}"
widget="color"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!--Tree view of the dashboard block-->
<record id="dashboard_block_view_tree" model="ir.ui.view">
<field name="name">dashboard.block.view.tree</field>
<field name="model">dashboard.block</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="model_id"/>
<field name="type"/>
</tree>
</field>
</record>
</odoo>