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.

76 lines
4.0 KiB

7 years ago
  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" decoration-danger="invalid_message">
  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. <sheet>
  27. <group col="6" colspan="6">
  28. <field name="name"/>
  29. <field name="color"/>
  30. <field name="company_id" groups="base.group_multi_company"/>
  31. <newline/>
  32. <separator string="Minimum" colspan="4"/>
  33. <newline/>
  34. <field name="min_type" colspan="2"/>
  35. <field name="min_fixed_value" colspan="2" attrs="{'invisible' : [('min_type', '!=', 'static')]}"/>
  36. <field name="min_dbsource_id" colspan="2" attrs="{'invisible' : [('min_type', '!=', 'external')]}"/>
  37. <newline/>
  38. <field name="min_code" colspan="6" attrs="{'invisible' : [('min_type', 'NOT IN', ('local','external','python'))]}"/>
  39. <newline/>
  40. <field name="min_error" colspan="6" attrs="{'invisible': [('min_error', '=', False)]}" />
  41. <newline/>
  42. <separator string="Maximum" colspan="4"/>
  43. <newline/>
  44. <field name="max_type"/>
  45. <field name="max_fixed_value" attrs="{'invisible' : [('max_type', '!=', 'static')]}"/>
  46. <field name="max_dbsource_id" attrs="{'invisible' : [('max_type', '!=', 'external')]}"/>
  47. <newline/>
  48. <field name="max_code" colspan="6" attrs="{'invisible' : [('max_type', 'NOT IN', ('local','external','python'))]}"/>
  49. <newline/>
  50. <field name="max_error" colspan="6" attrs="{'invisible': [('max_error', '=', False)]}" />
  51. <newline/>
  52. <separator string="Thresholds" colspan="4"/>
  53. <field name="threshold_ids" nolabel="1" colspan="4"/>
  54. <separator string="Errors" attrs="{'invisible' : [('invalid_message', '=', False)]}" colspan="4"/>
  55. <field name="invalid_message" nolabel="1" attrs="{'invisible' : [('invalid_message', '=', False)]}" colspan="4"/>
  56. </group>
  57. </sheet>
  58. </form>
  59. </field>
  60. </record>
  61. <record model="ir.actions.act_window" id="open_threshold_range_list">
  62. <field name="name">Ranges</field>
  63. <field name="res_model">kpi.threshold.range</field>
  64. <field name="view_type">form</field>
  65. <field name="view_mode">tree,form</field>
  66. <field name="view_id" ref="view_kpi_threshold_range_tree"/>
  67. </record>
  68. </data>
  69. </odoo>