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.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2012 - Now Savoir-faire Linux <https://www.savoirfairelinux.com/>
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <data>
  6. <!-- Ranges -->
  7. <record id="view_kpi_threshold_range_tree" model="ir.ui.view">
  8. <field name="name">kpi.threshold.range.tree</field>
  9. <field name="model">kpi.threshold.range</field>
  10. <field name="arch" type="xml">
  11. <tree string="Ranges">
  12. <field name="name"/>
  13. <field name="min_value"/>
  14. <field name="max_value"/>
  15. <field name="color" widget="color"/>
  16. <field name="invalid_message"/>
  17. <field name="company_id" groups="base.group_multi_company"/>
  18. </tree>
  19. </field>
  20. </record>
  21. <record id="view_kpi_threshold_range_form" model="ir.ui.view">
  22. <field name="name">kpi.threshold.range.form</field>
  23. <field name="model">kpi.threshold.range</field>
  24. <field name="arch" type="xml">
  25. <form string="Range">
  26. <group col="6" colspan="6">
  27. <field name="name"/>
  28. <field name="color"/>
  29. <field name="company_id" groups="base.group_multi_company"/>
  30. <newline/>
  31. <separator string="Minimum" colspan="4"/>
  32. <newline/>
  33. <field name="min_type" colspan="2"/>
  34. <field name="min_fixed_value" colspan="2" attrs="{'invisible' : [('min_type', '!=', 'static')]}"/>
  35. <field name="min_dbsource_id" colspan="2" attrs="{'invisible' : [('min_type', '!=', 'external')]}"/>
  36. <newline/>
  37. <field name="min_code" colspan="6" attrs="{'invisible' : [('min_type', 'NOT IN', ('local','external','python'))]}"/>
  38. <newline/>
  39. <field name="min_error" colspan="6" attrs="{'invisible': [('min_error', '=', False)]}" />
  40. <newline/>
  41. <separator string="Maximum" colspan="4"/>
  42. <newline/>
  43. <field name="max_type"/>
  44. <field name="max_fixed_value" attrs="{'invisible' : [('max_type', '!=', 'static')]}"/>
  45. <field name="max_dbsource_id" attrs="{'invisible' : [('max_type', '!=', 'external')]}"/>
  46. <newline/>
  47. <field name="max_code" colspan="6" attrs="{'invisible' : [('max_type', 'NOT IN', ('local','external','python'))]}"/>
  48. <newline/>
  49. <field name="max_error" colspan="6" attrs="{'invisible': [('max_error', '=', False)]}" />
  50. <newline/>
  51. <separator string="Thresholds" colspan="4"/>
  52. <field name="threshold_ids" nolabel="1" colspan="4"/>
  53. <separator string="Errors" attrs="{'invisible' : [('invalid_message', '=', '')]}" colspan="4"/>
  54. <field name="invalid_message" nolabel="1" attrs="{'invisible' : [('invalid_message', '=', '')]}" colspan="4"/>
  55. </group>
  56. </form>
  57. </field>
  58. </record>
  59. <record model="ir.actions.act_window" id="open_threshold_range_list">
  60. <field name="name">Ranges</field>
  61. <field name="res_model">kpi.threshold.range</field>
  62. <field name="view_type">form</field>
  63. <field name="view_mode">tree,form</field>
  64. <field name="view_id" ref="view_kpi_threshold_range_tree"/>
  65. </record>
  66. </data>
  67. </odoo>