105 lines
6.2 KiB
XML
105 lines
6.2 KiB
XML
<flectra>
|
|
<data>
|
|
|
|
<record model="ir.ui.view" id="ks_dashboard_ninja.board_form">
|
|
<field name="name">ks_dashboard_ninja View</field>
|
|
<field name="model">ks_dashboard_ninja.board</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Dashboards">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="ks_dashboard_state" invisible="1"/>
|
|
<field name="name" attrs="{'readonly':[('ks_dashboard_state','=','Locked')]}"/>
|
|
<field name="ks_dashboard_menu_name" attrs="{'readonly':[('ks_dashboard_state','=','Locked')],
|
|
'required':[('ks_dashboard_state','!=','Locked')]}"/>
|
|
<field name="ks_dashboard_top_menu_id"
|
|
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" attrs="{'readonly':['|',('id','>', 0),('ks_dashboard_state','=','Locked')],
|
|
'required':[('ks_dashboard_state','!=','Locked')]}"/>
|
|
<field name="ks_dashboard_active"
|
|
attrs="{'readonly':[('ks_dashboard_state','=','Locked')]}"/>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<record model="ir.ui.view" id="ks_dashboard_ninja.board_tree">
|
|
<field name="name">ks_dashboard_ninja View</field>
|
|
<field name="model">ks_dashboard_ninja.board</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="My Dashboard" editable="top">
|
|
<field name="ks_dashboard_state" invisible="1"/>
|
|
<field name="id" invisible="1"/>
|
|
|
|
<field name="name"/>
|
|
<field name="ks_dashboard_menu_name"
|
|
attrs="{'required':[('ks_dashboard_state','!=','Locked')]}"/>
|
|
<field name="ks_dashboard_menu_sequence"/>
|
|
<field name="ks_dashboard_top_menu_id"
|
|
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" attrs="{'readonly':[('ks_dashboard_state','=','Locked')],
|
|
'required':[('ks_dashboard_state','!=','Locked')]}"/>
|
|
<field name="ks_dashboard_active" attrs="{'readonly':[('ks_dashboard_state','=','Locked')]}"/>
|
|
<field name="ks_dashboard_default_template" attrs="{'readonly':[('id','>', 0)], 'required':[('id','<', 1)]}"
|
|
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"/>
|
|
<field name="ks_set_interval"/>
|
|
<field name="ks_date_filter_selection" string="Default Date Filter" required="1"/>
|
|
<field name="ks_dashboard_start_date" string="Start Date" attrs="{'readonly':[('ks_date_filter_selection','!=','l_custom')], 'required':[('ks_date_filter_selection','=','l_custom')]}"/>
|
|
<field name="ks_dashboard_end_date" string="End Date" attrs="{'readonly':[('ks_date_filter_selection','!=','l_custom')], 'required':[('ks_date_filter_selection','=','l_custom')]}"/>
|
|
<field name="ks_dashboard_group_access" widget="many2many_tags"/>
|
|
<button name="ks_view_items_view" string="View Items" type="object" class="btn-primary"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Search View Of Dashboard Items-->
|
|
<record id="ks_item_search_view" model="ir.ui.view">
|
|
<field name="name">dashboard.items.search.view</field>
|
|
<field name="model">ks_dashboard_ninja.item</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Items">
|
|
<field name="name" filter_domain="[('name','ilike',self)]"/>
|
|
<field name="ks_dashboard_item_type"/>
|
|
<field name="ks_model_id" filter_domain="[('ks_model_id.model', 'ilike', self)]"/>
|
|
<field name="ks_dashboard_ninja_board_id"/>
|
|
<!--TODO : Add more filter and groupby-->
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Dashboard -->
|
|
<record id="ks_dashboard_ninja.board_dashboard_action_window" model="ir.actions.client">
|
|
<field name="name">My Dashboard</field>
|
|
<field name="tag">ks_dashboard_ninja</field>
|
|
<field name="params" eval="{'ks_dashboard_id': ref('ks_dashboard_ninja.ks_my_default_dashboard_board')}"/>
|
|
<field name="res_model">ks_dashboard_ninja.board</field>
|
|
</record>
|
|
|
|
|
|
<record model="ir.actions.act_window" id="ks_dashboard_ninja.board_form_tree_action_window">
|
|
<field name="name">Dashboards</field>
|
|
<field name="res_model">ks_dashboard_ninja.board</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="context">{'form_view_ref':'ks_dashboard_ninja.board_form',
|
|
'tree_view_ref':'ks_dashboard_ninja.board_tree'}
|
|
</field>
|
|
</record>
|
|
|
|
|
|
|
|
<menuitem name="My Dashboard" id="ks_dashboard_ninja.board_menu_root" web_icon="ks_dashboard_ninja,static/description/icon.png"
|
|
action="ks_dashboard_ninja.board_dashboard_action_window"/>
|
|
|
|
<menuitem name="Configuration" id="ks_dashboard_ninja.configuration_menu" parent="ks_dashboard_ninja.board_menu_root"
|
|
groups="ks_dashboard_ninja_group_manager" sequence="100"/>
|
|
|
|
<menuitem name="Dashboards" id="ks_dashboard_ninja.dashboard_menu" parent="ks_dashboard_ninja.configuration_menu"
|
|
action="ks_dashboard_ninja.board_form_tree_action_window" groups="ks_dashboard_ninja_group_manager"/>
|
|
<record id="ks_dashboard_ninja.dashboard_menu" model="ir.ui.menu">
|
|
<field name="name">Dashboards</field>
|
|
</record>
|
|
|
|
</data>
|
|
</flectra> |