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.

109 lines
4.5 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="widget"/>
  39. <field name="field_type"/>
  40. <field name="category_id"/>
  41. <field name="required"/>
  42. <field name="default_value"/>
  43. <field name="minimum"
  44. attrs="{'invisible': [('field_type', 'not in', ['str', 'int', 'float'])]}"
  45. />
  46. <field name="maximum"
  47. attrs="{'invisible': [('field_type', 'not in', ['str', 'int', 'float'])]}"
  48. />
  49. </group>
  50. <group name="Options" col="1" attrs="{'invisible': [('field_type', '!=', 'id')]}">
  51. <label for="option_ids" string="Select one of the existing options or create a new one clicking on 'Add an item'"/>
  52. <field name="option_ids"
  53. nolabel="1"
  54. context="{'form_view_ref': 'base_custom_info.custom_info_option_form', 'tree_view_ref': 'base_custom_info.custom_info_option_tree'}"
  55. />
  56. </group>
  57. </sheet>
  58. </form>
  59. </field>
  60. </record>
  61. <record id="custom_info_property_form_full" model="ir.ui.view">
  62. <field name="model">custom.info.property</field>
  63. <field name="inherit_id" ref="custom_info_property_form"/>
  64. <field name="mode">primary</field>
  65. <field name="arch" type="xml">
  66. <field name="name" position="after">
  67. <field name="template_id"/>
  68. </field>
  69. </field>
  70. </record>
  71. <record id="custom_info_property_search" model="ir.ui.view">
  72. <field name="model">custom.info.property</field>
  73. <field name="arch" type="xml">
  74. <search>
  75. <field name="name"/>
  76. <field name="template_id"/>
  77. <field name="widget"/>
  78. <field name="field_type"/>
  79. <field name="category_id"/>
  80. <field name="required"/>
  81. <field name="default_value"/>
  82. <group expand="0" string="Group By">
  83. <filter
  84. string="Template"
  85. name="template"
  86. context="{'group_by': 'template_id'}"/>
  87. <filter
  88. string="Category"
  89. name="category"
  90. context="{'group_by': 'category_id'}"/>
  91. </group>
  92. </search>
  93. </field>
  94. </record>
  95. <record id="custom_info_property_action" model="ir.actions.act_window">
  96. <field name="name">Properties</field>
  97. <field name="type">ir.actions.act_window</field>
  98. <field name="res_model">custom.info.property</field>
  99. <field name="view_mode">tree,form</field>
  100. <field name="view_type">form</field>
  101. </record>
  102. </odoo>