94 lines
4.1 KiB
XML
94 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<!-- List view, also called list view on models -->
|
|
<record id="quickboard_item_view_list" model="ir.ui.view">
|
|
<field name="name">quickboard.item.list</field>
|
|
<field name="model">quickboard.item</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Quickboard Item">
|
|
<field name="name"/>
|
|
<field name="model_name"/>
|
|
<field name="chart_type"/>
|
|
<field name="type"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Form view on models -->
|
|
<record id="quickboard_item_view_form" model="ir.ui.view">
|
|
<field name="name">quickboard.item.form</field>
|
|
<field name="model">quickboard.item</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Quickboard Item">
|
|
<sheet>
|
|
<group>
|
|
<group string="General" >
|
|
<field name="type"
|
|
required="1"
|
|
readonly="context.get('quick_edit', False)"/>
|
|
<field name="name" required="1"/>
|
|
<field name="model_id"
|
|
required="1"
|
|
options="{'no_create_edit':True,'no_create': True}"
|
|
domain="[('transient', '=', False)]"/>
|
|
<field name="model_name" invisible="1" />
|
|
</group>
|
|
<group string="Options">
|
|
<field name="icon" widget="qb_icon_picker"/>
|
|
<field name="text_color" widget="qb_color_picker" options="{'mode': 'foreground'}" invisible="type != 'basic'" />
|
|
<field name="background_color" widget="qb_color_picker" options="{'mode': 'background'}" invisible="type != 'basic'" />
|
|
<field name="chart_type" required="[('type', '=', 'chart')]" invisible="type != 'chart'"/>
|
|
</group>
|
|
</group>
|
|
<group string="Data">
|
|
<group>
|
|
<field name="value_field_id"
|
|
required="1"
|
|
options="{'no_create_edit':True,'no_create': True}"
|
|
domain="[('model_id','=',model_id), ('store', '=', True), ('ttype', 'not in', ['one2many', 'many2many'])]"
|
|
widget="many2many_tags" />
|
|
<field name="aggregate_function" required="1" />
|
|
</group>
|
|
<group>
|
|
<field name="dimension_field_id"
|
|
required="type != 'basic'"
|
|
options="{'no_create_edit':True,'no_create': True}"
|
|
domain="[('model_id','=',model_id), ('store', '=', True)]"
|
|
invisible="type == 'basic'"/>
|
|
<field name="datetime_granularity"
|
|
required="[('dimension_field_id.ttype', 'in', ['date', 'datetime'])]"
|
|
invisible="type != 'chart'"/>
|
|
<field name="group_field_id"
|
|
options="{'no_create_edit':True,'no_create': True}"
|
|
domain="[('model_id','=',model_id), ('store', '=', True)]"
|
|
invisible="type != 'chart' or value_field_id.length > 1"/>
|
|
<field name="list_row_limit"
|
|
required="type == 'list'"
|
|
invisible="type != 'list'"/>
|
|
</group>
|
|
</group>
|
|
<group string="Filter">
|
|
<field name="domain_filter" widget="domain" options="{'model': 'model_name'}"/>
|
|
</group>
|
|
<div class="alert" >
|
|
<span> Visit <a href="https://fontawesome.com/v4/icons/" target="new">here</a> for icon values.</span>
|
|
</div>
|
|
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="quickboard_item_action_window" model="ir.actions.act_window">
|
|
<field name="name">Quickboard Item</field>
|
|
<field name="res_model">quickboard.item</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
|
|
<!-- Sub Menu item -->
|
|
<menuitem name="Items" id="quickboard_item_menu_action_window" parent="quickboard.menu_root"
|
|
groups="group_quickboard_user" action="quickboard_item_action_window"/>
|
|
</data>
|
|
</odoo>
|