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.

105 lines
4.3 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 string="Options" col="1" attrs="{'invisible': [('field_type', '!=', 'id')]}">
  50. <label 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. context="{'group_by': 'template_id'}"/>
  84. <filter
  85. string="Category"
  86. context="{'group_by': 'category_id'}"/>
  87. </group>
  88. </search>
  89. </field>
  90. </record>
  91. <record id="custom_info_property_action" model="ir.actions.act_window">
  92. <field name="name">Properties</field>
  93. <field name="type">ir.actions.act_window</field>
  94. <field name="res_model">custom.info.property</field>
  95. <field name="view_mode">tree,form</field>
  96. <field name="view_type">form</field>
  97. </record>
  98. </odoo>