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.

107 lines
4.4 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
  3. Copyright 2017 Pedro M. Baeza <pedro.baeza@tecnativa.com>
  4. License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
  5. <odoo>
  6. <record id="custom_info_property_tree" model="ir.ui.view">
  7. <field name="model">custom.info.property</field>
  8. <field name="priority" eval="999"/>
  9. <field name="arch" type="xml">
  10. <tree string="Custom Info Properties">
  11. <field name="sequence" widget="handle"/>
  12. <field name="name"/>
  13. <field name="field_type"/>
  14. <field name="category_id"/>
  15. <field name="required"/>
  16. <field name="default_value"/>
  17. </tree>
  18. </field>
  19. </record>
  20. <record id="custom_info_property_tree_full" model="ir.ui.view">
  21. <field name="model">custom.info.property</field>
  22. <field name="inherit_id" ref="custom_info_property_tree"/>
  23. <field name="mode">primary</field>
  24. <field name="arch" type="xml">
  25. <field name="name" position="after">
  26. <field name="template_id"/>
  27. </field>
  28. </field>
  29. </record>
  30. <record id="custom_info_property_form" model="ir.ui.view">
  31. <field name="model">custom.info.property</field>
  32. <field name="priority" eval="999"/>
  33. <field name="arch" type="xml">
  34. <form string="Custom Info Template Properties">
  35. <sheet>
  36. <group>
  37. <field name="name"/>
  38. <field name="field_type"/>
  39. <field name="category_id"/>
  40. <field name="required"/>
  41. <field name="default_value"/>
  42. <field name="minimum"
  43. attrs="{'invisible': [('field_type', 'not in', ['str', 'int', 'float'])]}"
  44. />
  45. <field name="maximum"
  46. attrs="{'invisible': [('field_type', 'not in', ['str', 'int', 'float'])]}"
  47. />
  48. </group>
  49. <group name="Options" col="1" attrs="{'invisible': [('field_type', '!=', 'id')]}">
  50. <label for="option_ids" string="Select one of the existing options or create a new one clicking on 'Add an item'"/>
  51. <field name="option_ids"
  52. nolabel="1"
  53. context="{'form_view_ref': 'base_custom_info.custom_info_option_form', 'tree_view_ref': 'base_custom_info.custom_info_option_tree'}"
  54. />
  55. </group>
  56. </sheet>
  57. </form>
  58. </field>
  59. </record>
  60. <record id="custom_info_property_form_full" model="ir.ui.view">
  61. <field name="model">custom.info.property</field>
  62. <field name="inherit_id" ref="custom_info_property_form"/>
  63. <field name="mode">primary</field>
  64. <field name="arch" type="xml">
  65. <field name="name" position="after">
  66. <field name="template_id"/>
  67. </field>
  68. </field>
  69. </record>
  70. <record id="custom_info_property_search" model="ir.ui.view">
  71. <field name="model">custom.info.property</field>
  72. <field name="arch" type="xml">
  73. <search>
  74. <field name="name"/>
  75. <field name="template_id"/>
  76. <field name="field_type"/>
  77. <field name="category_id"/>
  78. <field name="required"/>
  79. <field name="default_value"/>
  80. <group expand="0" string="Group By">
  81. <filter
  82. string="Template"
  83. name="template"
  84. context="{'group_by': 'template_id'}"/>
  85. <filter
  86. string="Category"
  87. name="category"
  88. context="{'group_by': 'category_id'}"/>
  89. </group>
  90. </search>
  91. </field>
  92. </record>
  93. <record id="custom_info_property_action" model="ir.actions.act_window">
  94. <field name="name">Properties</field>
  95. <field name="type">ir.actions.act_window</field>
  96. <field name="res_model">custom.info.property</field>
  97. <field name="view_mode">tree,form</field>
  98. <field name="view_type">form</field>
  99. </record>
  100. </odoo>