pengyuthon

This commit is contained in:
李鹏宇
2024-11-09 16:15:11 +08:00
parent d718f9d96f
commit 82838f342c
7 changed files with 198 additions and 120 deletions
+12 -9
View File
@@ -18,22 +18,25 @@
<field name="ks_type" nolabel="1" required="1" string="Generate with"/>
</group>
<group>
<field invisible="ks_type" name="ks_import_model_id" nolabel="1" placeholder="Enter Model" required="ks_type" string="Model"/>
<field class="ks_import_model_class" invisible="not ks_model_show" name="ks_import_model" nolabel="1" required="ks_model_show" string="Model"/>
<field invisible="ks_type == 'ks_keyword'"
name="ks_import_model_id" nolabel="1" placeholder="Enter Model"
required="ks_type == 'ks_model'" string="Model"/>
<field class="ks_import_model_class"
invisible="not ks_model_show" name="ks_import_model" nolabel="1"
required="ks_model_show" string="Model"/>
</group>
<group>
<field invisible="ks_type" name="ks_input_keywords" nolabel="1" required="ks_type" string="Keywords" widget="ks_keyword_selection"/>
<field invisible="ks_type or ks_type" name="ks_model_show"/>
<!-- <div attrs="{'invisible':[('ks_model_show','=',False)],'required':[('ks_model_show','=',True)]}">-->
<!-- Please select model first.-->
<!-- </div>-->
<field invisible="ks_type == 'ks_model'"
name="ks_input_keywords" nolabel="1"
required="ks_type == 'ks_keyword'" string="Keywords" widget="ks_keyword_selection"/>
<field invisible="ks_type == 'ks_keyword' or ks_type == 'ks_model'" name="ks_model_show"/>
</group>
</group>
</div>
</div>
<footer>
<button class="btn-primary" invisible="ks_type" name="ks_do_action" string="Generate with AI" type="object"/>
<button class="btn-primary" invisible="ks_type" name="ks_generate_item" string="Generate Item" type="object"/>
<button class="btn-primary" invisible="ks_type == 'ks_keyword'" name="ks_do_action" string="Generate with AI" type="object"/>
<button class="btn-primary" invisible="ks_type == 'ks_model'" name="ks_generate_item" string="Generate Item" type="object"/>
<button class="btn-secondary" special="cancel" string="Cancel"/>
</footer>
</form></field>
@@ -8,9 +8,17 @@
<form string="Dashboard Item Action">
<group>
<group>
<field invisible="1" name="ks_dashboard_item_ids" required="1"/>
<field invisible="ks_action" name="ks_dashboard_ninja_id" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" required="ks_action"/>
<field invisible="ks_action" name="ks_dashboard_ninja_ids" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" required="ks_action" widget="many2many_tags"/>
<field invisible="1"
name="ks_dashboard_item_ids" required="1"/>
<field invisible="ks_action == 'duplicate'"
name="ks_dashboard_ninja_id"
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
required="ks_action == 'move'"/>
<field invisible="ks_action == 'move'"
name="ks_dashboard_ninja_ids"
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
required="ks_action == 'duplicate'"
widget="many2many_tags"/>
</group>
<group>
<field name="ks_action" required="1"/>
@@ -38,9 +38,4 @@
<field name="view_mode">tree,form</field>
</record>
<!-- <menuitem id="menu_group_by"-->
<!-- name="Group By"-->
<!-- parent="ks_dashboard_ninja.configuration_menu"-->
<!-- action="action_group_by"-->
<!-- sequence="20"/>-->
</odoo>
@@ -38,9 +38,5 @@
<field name="view_mode">tree,form</field>
</record>
<!-- <menuitem id="menu_group_by"-->
<!-- name="Group By"-->
<!-- parent="ks_dashboard_ninja.configuration_menu"-->
<!-- action="action_group_by"-->
<!-- sequence="20"/>-->
</odoo>
@@ -19,7 +19,8 @@
<field name="ks_item_end_date" optional="show"/>
<field name="ks_compare_period" optional="show"/>
<field name="ks_year_period" optional="show"/>
</tree></field>
</tree>
</field>
</record>
<!-- Search View Of Dashboard Items-->
<record id="ks_item_search_view" model="ir.ui.view">
@@ -165,29 +166,38 @@
<field name="ks_company_id" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"/>
<field invisible="1" name="name_seq"/>
<field invisible="1" name="ks_partners_map"/>
<field context="{'current_id': id}" invisible="ks_data_calculation_type or not model_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_list_view', 'ks_scatter_chart', 'ks_radialBar_chart', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_map_view']" name="ks_model_id" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"/>
<div colspan="2">
<span invisible="not csv_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']" name="ks_csv_span" style="font-style: italic; color: #888888;">
**File names should not contain any special characters. File name can have
Spaces or separated by Underscores(_).
</span>
</div>
<div colspan="2">
<span invisible="not excel_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']" name="ks_excel_span" style="font-style: italic; color: #888888;">
**File names should not contain any special characters. File name can have
Spaces or separated by Underscores(_).
</span>
</div>
<field filename="filename" invisible="ks_data_calculation_type or not excel_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']" name="upload_excel"/>
<button class="oe_highlight" invisible="not upload_excel or ks_group_by_lines" name="data_sync" string="Sync Data" type="object"/>
<button class="oe_highlight" invisible="not ks_csv_field or ks_csv_group_by_lines" name="csv_data_sync" string="Sync Data" type="object"/>
<field filename="filename" invisible="ks_data_calculation_type or not csv_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']" name="ks_csv_field"/>
<field context="{'current_id': id}" invisible="ks_data_calculation_type == 'query' or not model_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_list_view', 'ks_scatter_chart', 'ks_radialBar_chart', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_map_view']"
name="ks_model_id" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"/>
<field filename="filename" invisible="ks_data_calculation_type == 'query' or not excel_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']"
name="upload_excel"/>
<button class="oe_highlight" invisible="not upload_excel or ks_group_by_lines != []"
name="data_sync" string="Sync Data" type="object"/>
<button class="oe_highlight" invisible="not ks_csv_field or ks_csv_group_by_lines != []"
name="csv_data_sync" string="Sync Data" type="object"/>
<field filename="filename" invisible="ks_data_calculation_type == 'query' or not csv_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']"
name="ks_csv_field"/>
<field invisible="1" name="filename"/>
<field invisible="1" name="excel_bool"/>
<field invisible="1" name="model_bool"/>
<field invisible="1" name="csv_bool"/>
<div colspan="2">
<span invisible="not csv_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']"
name="ks_csv_span" style="font-style: italic; color: #888888;">
**File names should not contain any special characters. File name can have
Spaces or separated by Underscores(_).
</span>
</div>
<div colspan="2">
<span invisible="not excel_bool or ks_dashboard_item_type not in ['ks_kpi', 'ks_radar_view', 'ks_flower_view', 'ks_tile', 'ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_scatter_chart', 'ks_list_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart']"
name="ks_excel_span" style="font-style: italic; color: #888888;">
**File names should not contain any special characters. File name can have
Spaces or separated by Underscores(_).
</span>
</div>
<field context="{'current_id': id}" invisible="ks_chart_data_count_type or not ks_model_id or ks_dashboard_item_type or ks_dashboard_item_type not in ['ks_doughnut_chart', 'ks_pie_chart']" name="ks_semi_circle_chart"/>
<field context="{'current_id': id}"
invisible="ks_chart_data_count_type == 'count' or not ks_model_id or ks_dashboard_item_type == 'ks_list_view' or ks_dashboard_item_type not in ['ks_doughnut_chart', 'ks_pie_chart']"
name="ks_semi_circle_chart"/>
<field invisible="1" name="ks_country_id"/>
<field invisible="1" name="ks_country_code"/>
<field invisible="1" name="ks_bounds"/>
@@ -365,24 +375,33 @@
name="ks_data_format"/>
<field context="{'current_id': id}" invisible="ks_dashboard_item_type == 'ks_funnel_chart' or ks_dashboard_item_type == 'ks_bullet_chart' or ks_dashboard_item_type == 'ks_radialBar_chart' or ks_dashboard_item_type == 'ks_flower_view'"
name="ks_chart_item_color" required="ks_dashboard_item_type != 'ks_tile' and ks_dashboard_item_type !='ks_list_view' and ks_dashboard_item_type != 'ks_kpi' and ks_dashboard_item_type != 'ks_funnel_chart' and ks_dashboard_item_type != 'ks_bullet_chart' and ks_dashboard_item_type != 'ks_radialBar_chart' and ks_dashboard_item_type != 'ks_flower_view'" string="Chart Color Palette"/>
<!-- TODO NEXT ↓-->
<field context="{'current_id': id}" invisible="not ks_dashboard_item_type" name="ks_flower_item_color" required="ks_dashboard_item_type" string="Flower Chart Theme"/>
<field context="{'current_id': id}" invisible="not ks_dashboard_item_type and not ks_dashboard_item_type" name="ks_funnel_item_color" required="ks_dashboard_item_type and ks_dashboard_item_type" string="Funnel Chart Theme"/>
<field context="{'current_id': id}" invisible="not ks_dashboard_item_type" name="ks_radial_item_color" required="ks_dashboard_item_type" string="Radial Chart Theme"/>
<field invisible="not ks_dashboard_item_type" name="ks_radial_legend" required="ks_dashboard_item_type" string="Show Legend"/>
<field context="{'current_id': id}" invisible="not ks_dashboard_item_type and not ks_dashboard_item_type" name="ks_bar_chart_stacked" string="Stacked Bar Chart"/>
<field invisible="ks_dashboard_item_type or ks_dashboard_item_type or ks_dashboard_item_type" name="ks_show_data_value"/>
<field invisible="not ks_show_data_value or ks_dashboard_item_type not in ['ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_funnel_chart', 'ks_radialBar_chart', 'ks_flower_view']" name="ks_data_label_type"/>
<field invisible="ks_dashboard_item_type or ks_dashboard_item_type or ks_dashboard_item_type or ks_dashboard_item_type" name="ks_unit"/>
<field context="{'current_id': id}" invisible="ks_dashboard_item_type != 'ks_flower_view'"
name="ks_flower_item_color" required="ks_dashboard_item_type == 'ks_flower_view'" string="Flower Chart Theme"/>
<field context="{'current_id': id}" invisible="ks_dashboard_item_type != 'ks_funnel_chart' and ks_dashboard_item_type != 'ks_bullet_chart'"
name="ks_funnel_item_color" required="ks_dashboard_item_type == 'ks_funnel_chart' and ks_dashboard_item_type == 'ks_bullet_chart'" string="Funnel Chart Theme"/>
<field context="{'current_id': id}" invisible="ks_dashboard_item_type != 'ks_radialBar_chart'"
name="ks_radial_item_color" required="ks_dashboard_item_type == 'ks_radialBar_chart'" string="Radial Chart Theme"/>
<field invisible="ks_dashboard_item_type != 'ks_radialBar_chart'"
name="ks_radial_legend" required="ks_dashboard_item_type == 'ks_radialBar_chart'" string="Show Legend"/>
<field context="{'current_id': id}" invisible="ks_dashboard_item_type != 'ks_bar_chart' and ks_dashboard_item_type != 'ks_horizontalBar_chart'"
name="ks_bar_chart_stacked" string="Stacked Bar Chart"/>
<field invisible="ks_dashboard_item_type == 'ks_scatter_chart' or ks_dashboard_item_type == 'ks_radialBar_chart' or ks_dashboard_item_type == 'ks_flower_view'"
name="ks_show_data_value"/>
<field invisible="not ks_show_data_value or ks_dashboard_item_type not in ['ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_funnel_chart', 'ks_radialBar_chart', 'ks_flower_view']"
name="ks_data_label_type"/>
<field invisible="ks_dashboard_item_type == 'ks_funnel_chart' or ks_dashboard_item_type == 'ks_bullet_chart' or ks_dashboard_item_type == 'ks_radialBar_chart' or ks_dashboard_item_type == 'ks_flower_view'"
name="ks_unit"/>
<field invisible="not ks_unit" name="ks_unit_selection" required="ks_unit"/>
<field invisible="not ks_unit_selection or not ks_unit" name="ks_chart_unit" required="ks_unit_selection and ks_unit"/>
<field invisible="ks_unit_selection != 'custom' or not ks_unit"
name="ks_chart_unit" required="ks_unit_selection == 'custom' and ks_unit"/>
</group>
<group>
<field invisible="not ks_dashboard_item_type" name="ks_header_bg_color" widget="ks_dashboard_color_picker" />
<field invisible="not ks_dashboard_item_type" name="ks_font_color" widget="ks_dashboard_color_picker"/>
<field invisible="not ks_dashboard_item_type" name="ks_button_color" widget="ks_dashboard_color_picker"/>
<field invisible="ks_dashboard_item_type != 'ks_to_do'"
name="ks_header_bg_color" widget="ks_dashboard_color_picker" />
<field invisible="ks_dashboard_item_type != 'ks_to_do'"
name="ks_font_color" widget="ks_dashboard_color_picker"/>
<field invisible="ks_dashboard_item_type != 'ks_to_do'"
name="ks_button_color" widget="ks_dashboard_color_picker"/>
</group>
</page>
<page invisible="ks_data_calculation_type != 'custom' or ks_dashboard_item_type not in ['ks_tile', 'ks_kpi', 'ks_bar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_horizontalBar_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_list_view', 'ks_flower_view', 'ks_funnel_chart', 'ks_bullet_chart', 'ks_radialBar_chart', 'ks_radar_view'] or (ks_list_view_type == 'ungrouped' and ks_dashboard_item_type == 'ks_list_view')"
@@ -390,64 +409,82 @@
<div invisible="ks_dashboard_item_type not in ['ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart']">
Below action will be performed at the end of the Drill Down Action
</div>
<field invisible="ks_dashboard_item_type not in ['ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view', 'ks_bullet_chart', 'ks_funnel_chart', 'ks_list_view', 'ks_radialBar_chart']" name="ks_action_lines" required="1">
<field invisible="ks_dashboard_item_type not in ['ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view', 'ks_bullet_chart', 'ks_funnel_chart', 'ks_list_view', 'ks_radialBar_chart']"
name="ks_action_lines" required="1">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="ks_item_action_field" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" required="1"/>
<field force_save="1" name="ks_item_action_date_groupby" readonly="not ks_item_action_field_type" required="ks_item_action_field_type"/>
<field invisible="1" name="ks_item_action_field_type"/>
<field force_save="1" name="ks_item_action_date_groupby"
readonly="ks_item_action_field_type != 'date_type'" required="ks_item_action_field_type == 'date_type'"/>
<field column_invisible="1" name="ks_item_action_field_type"/>
<field name="ks_chart_type" required="1"/>
<field invisible="1" name="ks_dashboard_item_id"/>
<field invisible="1" name="ks_model_id"/>
<field column_invisible="1" name="ks_dashboard_item_id"/>
<field column_invisible="1" name="ks_model_id"/>
<field name="ks_sort_by_field" options="{'no_open':True,'no_create':True}"/>
<field name="ks_sort_by_order"/>
<field name="ks_record_limit"/>
</tree>
</field>
<group>
<field invisible="ks_dashboard_item_type" name="ks_is_client_action"/>
<field invisible="ks_dashboard_item_type or ks_is_client_action" name="ks_actions" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" string="Item Action"/>
<field invisible="ks_dashboard_item_type or not ks_is_client_action" name="ks_client_action" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" required="ks_is_client_action"/>
<field invisible="ks_dashboard_item_type == 'ks_list_view'" name="ks_is_client_action"/>
<field invisible="ks_dashboard_item_type == 'ks_list_view' or ks_is_client_action"
name="ks_actions" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" string="Item Action"/>
<field invisible="ks_dashboard_item_type == 'ks_list_view' or not ks_is_client_action"
name="ks_client_action" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" required="ks_is_client_action"/>
</group>
</page>
<page invisible="(ks_chart_groupby_type != 'date_type' and ks_dashboard_item_type != 'ks_kpi') or ((ks_dashboard_item_type not in ['ks_bar_chart', 'ks_horizontalBar_chart', 'ks_line_chart', 'ks_area_chart', 'ks_flower_view', 'ks_list_view', 'ks_kpi'] or (ks_dashboard_item_type == 'ks_list_view' and ks_list_view_type == 'ungrouped')) or ((ks_dashboard_item_type == 'ks_kpi' and ks_model_id_2) and ks_data_comparison in ['None', 'Ratio']))" name="target_settings" string="Target">
<group>
<field context="{'current_id': id}" name="ks_goal_enable"/>
<field context="{'current_id': id}" invisible="not ks_goal_enable or not ks_dashboard_item_type" name="ks_goal_bar_line"/>
<field context="{'current_id': id}" invisible="not ks_goal_enable or ks_dashboard_item_type != 'ks_bar_chart'"
name="ks_goal_bar_line"/>
<field invisible="not ks_goal_enable" name="ks_standard_goal_value"/>
<field invisible="not ks_goal_enable or not ks_dashboard_item_type" name="ks_target_view" widget="radio"/>
<field invisible="not ks_dashboard_item_type" name="ks_send_mail" required="ks_dashboard_item_type"/>
<field invisible="not ks_send_mail" name="ks_email_to_ids" required="ks_send_mail and ks_dashboard_item_type" widget="many2many_tags"/>
<field invisible="not ks_goal_enable or ks_dashboard_item_type != 'ks_kpi'"
name="ks_target_view" widget="radio"/>
<field invisible="ks_dashboard_item_type != 'ks_kpi'"
name="ks_send_mail" required="ks_dashboard_item_type == 'ks_kpi'"/>
<field invisible="not ks_send_mail"
name="ks_email_to_ids" required="ks_send_mail and ks_dashboard_item_type == 'ks_kpi'" widget="many2many_tags"/>
</group>
<div invisible="not ks_goal_enable or ks_dashboard_item_type or ks_chart_relation_sub_groupby">
<div invisible="not ks_goal_enable or ks_dashboard_item_type == 'ks_kpi' or ks_chart_relation_sub_groupby">
All Target Lines Changes Will be reflected on Chart after saving the record
and
pagination will be ignore .
</div>
<field invisible="not ks_goal_enable or ks_dashboard_item_type or ks_chart_relation_sub_groupby" name="ks_goal_lines" style="width: 50% !important;">
<field invisible="not ks_goal_enable or ks_dashboard_item_type == 'ks_kpi' or ks_chart_relation_sub_groupby"
name="ks_goal_lines">
<tree editable="top" string="Goal Lines" widget="section_and_note_one2many">
<control>
<create string="Add a Line"/>
</control>
<field name="ks_goal_date" required="1"/>
<field name="ks_goal_value"/>
</tree></field>
</tree>
</field>
</page>
<page invisible="ks_dashboard_item_type == 'ks_to_do' or ks_dashboard_item_type == 'ks_map_view'" name="adv_conf" string="Advance Configuration">
<group invisible="ks_dashboard_item_type or ks_dashboard_item_type or ks_dashboard_item_type">
<field context="{'current_id': id}" invisible="ks_dashboard_item_type in ['ks_tile', 'ks_kpi', 'ks_list_view', 'ks_radialBar_chart']" name="ks_hide_legend"/>
<field domain="[('id', 'in', ks_chart_measure_field)]" invisible="ks_chart_data_count_type or ks_chart_relation_sub_groupby or not ks_model_id or ks_dashboard_item_type in ['ks_tile', 'ks_kpi', 'ks_list_view', 'ks_radialBar_chart', 'ks_scatter_chart', 'ks_bullet_chart', 'ks_funnel_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view'] or not ks_data_calculation_type" name="ks_chart_cumulative_field" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" widget="many2many_tags"/>
<field invisible="not ks_chart_data_count_type or ks_chart_relation_sub_groupby or not ks_model_id or ks_dashboard_item_type or not ks_dashboard_item_type or not ks_data_calculation_type" name="ks_chart_is_cumulative" required="ks_chart_cumulative"/>
<field invisible="ks_chart_relation_sub_groupby or not ks_model_id or ks_dashboard_item_type in ['ks_tile', 'ks_kpi', 'ks_list_view', 'ks_radialBar_chart', 'ks_scatter_chart', 'ks_bullet_chart', 'ks_funnel_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view', 'ks_line_chart', 'ks_area_chart', 'ks_horizontalBar_chart'] or not ks_data_calculation_type" name="ks_chart_cumulative"/>
<field invisible="not ks_dashboard_item_type" name="ks_pagination_limit" required="ks_dashboard_item_type"/>
<field force_save="1" invisible="ks_data_calculation_type or ks_dashboard_item_type or ks_dashboard_item_type or ks_dashboard_item_type or ks_dashboard_item_type" name="ks_show_records"/>
<field force_save="1" invisible="(ks_dashboard_item_type and ks_dashboard_item_type) or ks_list_view_type or ks_data_calculation_type or (ks_dashboard_item_type in ['ks_list_view', 'ks_bar_chart', 'ks_pie_chart', 'ks_to_do', 'ks_line_chart', 'ks_area_chart', 'ks_horizontalBar_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view'] and ks_chart_data_count_type)" name="ks_multiplier_active"/>
<field invisible="not ks_multiplier_active" name="ks_multiplier_lines" style="margin-top:10px">
<group invisible="ks_dashboard_item_type == 'ks_to_do' or ks_dashboard_item_type == 'ks_tile' or ks_dashboard_item_type == 'ks_kpi'">
<field context="{'current_id': id}" invisible="ks_dashboard_item_type in ['ks_tile', 'ks_kpi', 'ks_list_view', 'ks_radialBar_chart']"
name="ks_hide_legend"/>
<field domain="[('id', 'in', ks_chart_measure_field)]" invisible="ks_chart_data_count_type == 'count' or ks_chart_relation_sub_groupby or not ks_model_id or ks_dashboard_item_type in ['ks_tile', 'ks_kpi', 'ks_list_view', 'ks_radialBar_chart', 'ks_scatter_chart', 'ks_bullet_chart', 'ks_funnel_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view'] or ks_data_calculation_type != 'custom'"
name="ks_chart_cumulative_field" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" widget="many2many_tags"/>
<field invisible="ks_chart_data_count_type != 'count' or ks_chart_relation_sub_groupby or not ks_model_id or ks_dashboard_item_type == 'ks_list_view' or ks_dashboard_item_type != 'ks_bar_chart' or ks_data_calculation_type != 'custom'"
name="ks_chart_is_cumulative" required="ks_chart_cumulative"/>
<field invisible="ks_chart_relation_sub_groupby or not ks_model_id or ks_dashboard_item_type in ['ks_tile', 'ks_kpi', 'ks_list_view', 'ks_radialBar_chart', 'ks_scatter_chart', 'ks_bullet_chart', 'ks_funnel_chart', 'ks_pie_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view', 'ks_line_chart', 'ks_area_chart', 'ks_horizontalBar_chart'] or ks_data_calculation_type != 'custom'"
name="ks_chart_cumulative"/>
<field invisible="ks_dashboard_item_type != 'ks_list_view'"
name="ks_pagination_limit" required="ks_dashboard_item_type == 'ks_list_view'"/>
<field force_save="1" invisible="ks_data_calculation_type == 'query' or ks_dashboard_item_type == 'ks_funnel_chart' or ks_dashboard_item_type == 'ks_bullet_chart' or ks_dashboard_item_type == 'ks_radialBar_chart' or ks_dashboard_item_type == 'ks_scatter_chart'"
name="ks_show_records"/>
<field force_save="1" invisible="(ks_dashboard_item_type == 'ks_radialBar_chart' and ks_dashboard_item_type == 'ks_list_view') or ks_list_view_type == 'ungrouped' or ks_data_calculation_type == 'query' or (ks_dashboard_item_type in ['ks_list_view', 'ks_bar_chart', 'ks_pie_chart', 'ks_to_do', 'ks_line_chart', 'ks_area_chart', 'ks_horizontalBar_chart', 'ks_doughnut_chart', 'ks_polarArea_chart', 'ks_radar_view', 'ks_flower_view'] and ks_chart_data_count_type == 'count')"
name="ks_multiplier_active"/>
<field invisible="not ks_multiplier_active" name="ks_multiplier_lines" >
<tree create="false" delete="false" editable="bottom">
<field invisible="1" name="ks_model_id"/>
<field column_invisible="1" name="ks_model_id"/>
<field name="ks_multiplier_fields" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" readonly="1"/>
<field name="ks_multiplier_value"/>
</tree></field>
</tree>
</field>
</group>
<group invisible="ks_dashboard_item_type in ['ks_list_view', 'ks_bar_chart', 'ks_pie_chart', 'ks_to_do', 'ks_line_chart', 'ks_area_chart', 'ks_horizontalBar_chart', 'ks_doughnut_chart', 'ks_polarArea_chart']">
<field force_save="1" name="ks_multiplier_active"/>
@@ -464,9 +501,11 @@
<tree create="false" delete="false" editable="bottom">
<field name="name"/>
<field name="ttype"/>
<field invisible="1" name="ks_dashboard_group_by_id"/>
</tree></field>
<button class="oe_highlight" invisible="not upload_excel or not ks_group_by_lines or ks_model_id" name="create_table" string="Create Table" type="object"/>
<field column_invisible="1" name="ks_dashboard_group_by_id"/>
</tree>
</field>
<button class="oe_highlight" invisible="not upload_excel or ks_group_by_lines == [] or ks_model_id"
name="create_table" string="Create Table" type="object"/>
</page>
<page invisible="not ks_csv_field or ks_csv_group_by_lines == []" name="csv_data_type" string="Column Data Type">
<div style="font-style: italic; color: #888888;">
@@ -476,9 +515,11 @@
<tree create="false" delete="false" editable="bottom">
<field name="name"/>
<field name="ttype"/>
<field invisible="1" name="ks_dashboard_csv_group_by_id"/>
</tree></field>
<button class="oe_highlight" invisible="not ks_csv_field or not ks_csv_group_by_lines or ks_model_id" name="csv_create_table" string="Create Table" type="object"/>
<field column_invisible="1" name="ks_dashboard_csv_group_by_id"/>
</tree>
</field>
<button class="oe_highlight" invisible="not ks_csv_field or ks_csv_group_by_lines == [] or ks_model_id"
name="csv_create_table" string="Create Table" type="object"/>
</page>
</notebook>
</group>
@@ -10,15 +10,21 @@
<group>
<group>
<field invisible="1" name="ks_dashboard_state"/>
<field name="name" readonly="ks_dashboard_state"/>
<field name="ks_dashboard_menu_name" readonly="ks_dashboard_state" required="not ks_dashboard_state"/>
<field name="name" readonly="ks_dashboard_state == 'Locked'"/>
<field name="ks_dashboard_menu_name"
readonly="ks_dashboard_state == 'Locked'"
required="ks_dashboard_state != 'Locked'"/>
</group>
<group>
<field name="ks_dashboard_default_template" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" readonly="id > 0" required="id &lt;1"/>
<!-- <field name="ks_set_interval"/>-->
<field name="ks_dashboard_top_menu_id" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" readonly="ks_dashboard_state" required="not ks_dashboard_state"/>
<field name="ks_dashboard_default_template"
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
readonly="id > 0" required="id &lt;1"/>
<field name="ks_dashboard_top_menu_id"
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
readonly="ks_dashboard_state == 'Locked'"
required="not ks_dashboard_state != 'Locked'"/>
<field name="ks_dashboard_menu_sequence"/>
<field name="ks_dashboard_active" readonly="ks_dashboard_state"/>
<field name="ks_dashboard_active" readonly="ks_dashboard_state == 'Locked'"/>
</group>
</group>
<notebook>
@@ -37,14 +43,17 @@
<field name="ks_model_id"/>
<field name="ks_domain"/>
<field name="ks_is_active"/>
</tree></field>
</tree>
</field>
</page>
<page name="custom_defined_filters" string="Custom Filters">
<field name="ks_dashboard_custom_filters_ids"><tree editable="bottom">
<field name="ks_dashboard_custom_filters_ids">
<tree editable="bottom">
<field name="name" required="1"/>
<field name="ks_model_id" required="1"/>
<field name="ks_domain_field_id" required="1"/>
</tree></field>
</tree>
</field>
</page>
<page name="advance_setting" string="Advance Settings">
<group>
@@ -54,8 +63,12 @@
</group>
<group>
<field name="ks_date_filter_selection" required="1"/>
<field name="ks_dashboard_start_date" readonly="not ks_date_filter_selection" required="ks_date_filter_selection"/>
<field name="ks_dashboard_end_date" readonly="not ks_date_filter_selection" required="ks_date_filter_selection"/>
<field name="ks_dashboard_start_date"
readonly="ks_date_filter_selection != 'l_custom'"
required="ks_date_filter_selection == 'l_custom'"/>
<field name="ks_dashboard_end_date"
readonly="ks_date_filter_selection != 'l_custom'"
required="ks_date_filter_selection == 'l_custom'"/>
</group>
</group>
</page>
@@ -73,21 +86,30 @@
<field name="model">ks_dashboard_ninja.board</field>
<field name="arch" type="xml">
<tree import="0" string="My Dashboard">
<field invisible="1" name="ks_dashboard_state"/>
<field invisible="1" name="id"/>
<field column_invisible="1" name="ks_dashboard_state"/>
<field column_invisible="1" name="id"/>
<field name="name"/>
<field name="ks_dashboard_menu_name" required="not ks_dashboard_state"/>
<field name="ks_dashboard_menu_sequence"/>
<field name="ks_dashboard_top_menu_id" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" readonly="ks_dashboard_state" required="not ks_dashboard_state"/>
<field name="ks_dashboard_active" readonly="ks_dashboard_state"/>
<field name="ks_dashboard_default_template" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" readonly="id > 0" required="id &lt;1"/>
<field name="ks_dashboard_top_menu_id"
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
readonly="ks_dashboard_state == 'Locked'" required="not ks_dashboard_state != 'Locked'"/>
<field name="ks_dashboard_active" readonly="ks_dashboard_state == 'Locked'"/>
<field name="ks_dashboard_default_template"
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
readonly="id > 0" required="id &lt;1"/>
<field name="ks_set_interval"/>
<field name="ks_date_filter_selection" required="1"/>
<field name="ks_dashboard_start_date" readonly="not ks_date_filter_selection" required="ks_date_filter_selection"/>
<field name="ks_dashboard_end_date" readonly="not ks_date_filter_selection" required="ks_date_filter_selection"/>
<field name="ks_dashboard_start_date"
readonly="not ks_date_filter_selection != 'l_custom'"
required="ks_date_filter_selection == 'l_custom'"/>
<field name="ks_dashboard_end_date"
readonly="not ks_date_filter_selection != 'l_custom'"
required="ks_date_filter_selection == 'l_custom'"/>
<field name="ks_dashboard_group_access" widget="many2many_tags"/>
<button class="btn-primary" name="ks_view_items_view" string="View Items" type="object"/>
</tree></field>
</tree>
</field>
</record>
<record id="ks_dashboard_ninja.board_template_form" model="ir.ui.view">
<field name="name">Dashboard Template Form View</field>
@@ -99,7 +121,9 @@
<group>
<field name="name"/>
<field name="ks_template_type" readonly="1"/>
<field invisible="not ks_template_type" name="ks_dashboard_board_id" required="ks_template_type"/>
<field invisible="ks_template_type != 'ks_custom'"
name="ks_dashboard_board_id"
required="ks_template_type == 'ks_code'"/>
</group>
</group>
</sheet>
@@ -112,19 +136,23 @@
<form string="Dashboard Defined Filter">
<sheet>
<group>
<label for="name" invisible="not display_type" required="display_type" string="Separator Name (eg. Order States, Deadlines)"/>
<field invisible="not display_type" name="name" nolabel="1"/>
<group invisible="display_type">
<label for="name" invisible="display_type != 'line_section'"
required="display_type == 'line_section'"
string="Separator Name (eg. Order States, Deadlines)"/>
<field invisible="display_type != 'line_section'" name="name" nolabel="1"/>
<group invisible="display_type == 'line_section'">
<field invisible="1" name="id"/>
<field invisible="1" name="display_type"/>
<field invisible="1" name="ks_model_name"/>
<field name="name" required="not display_type"/>
<field name="name" required="display_type != 'line_section'"/>
<field invisible="1" name="ks_domain_temp"/>
<field class="ks_domain_content" context="{'current_id': id}" name="ks_domain" options="{'model': 'ks_model_name', 'in_dialog': True}" required="not display_type" widget="domain"/>
<field class="ks_domain_content" context="{'current_id': id}"
name="ks_domain" options="{'model': 'ks_model_name', 'in_dialog': True}"
required="display_type != 'line_section'" widget="domain"/>
</group>
<group invisible="display_type">
<field name="ks_model_id" required="not display_type"/>
<field name="ks_is_active" required="not display_type"/>
<group invisible="display_type == 'line_section'">
<field name="ks_model_id" required="display_type != 'line_section'"/>
<field name="ks_is_active" required="display_type != 'line_section'"/>
</group>
</group>
</sheet>
@@ -137,8 +165,12 @@
<tree editable="top" string="Dashboard Template">
<field name="name"/>
<field invisible="1" name="ks_template_type"/>
<field name="ks_dashboard_board_id" options="{'no_create': True, 'no_create_edit':True, 'no_open': True}" readonly="not ks_template_type" required="ks_template_type"/>
</tree></field>
<field name="ks_dashboard_board_id"
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
readonly="ks_template_type != 'ks_custom'"
required="ks_template_type == 'ks_custom'"/>
</tree>
</field>
</record>
<record id="ks_dashboard_ninja.child_board_tree" model="ir.ui.view">
<field name="name">Dashboard Layout Tree View</field>
@@ -148,7 +180,8 @@
<field name="name"/>
<field name="ks_dashboard_ninja_id" string="Dashboard"/>
<field name="company_id" string="Company"/>
</tree></field>
</tree>
</field>
</record>
<!-- Dashboard -->
<record id="ks_dashboard_ninja.board_dashboard_action_window" model="ir.actions.client">
+3 -1
View File
@@ -9,7 +9,9 @@
<group>
<group>
<field name="ks_email_id" required="1"/>
<field invisible="not ks_show_api_key" name="ks_api_key" widget="CopyClipboardChar"/>
<field invisible="not ks_show_api_key"
name="ks_api_key"
widget="CopyClipboardChar"/>
<field invisible="1" name="ks_show_api_key"/>
</group>
</group>