hostel.xml 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <data>
  4. <!-- Hostel Form View -->
  5. <record id="view_hostel_form" model="ir.ui.view">
  6. <field name="name">hostel.hostel.form</field>
  7. <field name="model">hostel.hostel</field>
  8. <field name="arch" type="xml">
  9. <form string="宿舍">
  10. <sheet>
  11. <div class="oe_title">
  12. <h3>
  13. <table>
  14. <tr>
  15. <td style="padding-right:10px;">
  16. <field name="name" required="1" placeholder="名称"/>
  17. </td>
  18. <td style="padding-right:10px;">
  19. <field name="hostel_code" placeholder="代码"/>
  20. </td>
  21. </tr>
  22. </table>
  23. </h3>
  24. </div>
  25. <group>
  26. <group>
  27. <label for="street" string="地址"/>
  28. <div class="o_address_format">
  29. <field name="street" placeholder="街道..." class="o_address_street"/>
  30. <field name="street2" placeholder="街道2..." class="o_address_street"/>
  31. <field name="city" placeholder="城市" class="o_address_city"/>
  32. <field name="state_id" class="o_address_state" placeholder="省份" options='{"no_open": True}'/>
  33. <field name="zip" placeholder="邮编" class="o_address_zip"/>
  34. <field name="country_id" placeholder="国家" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
  35. </div>
  36. </group>
  37. <group>
  38. <field name="hostel_floors" string="楼层"/>
  39. <field name="activate" string="激活"/>
  40. <field name="type" string="类型"/>
  41. <field name="other_info" string="其他信息"/>
  42. </group>
  43. </group>
  44. <group>
  45. <field name="phone" widget="phone" string="电话"/>
  46. <field name="mobile" widget="phone" string="手机"/>
  47. <field name="email" widget="email" context="{'gravatar_image': True}" string="邮箱"/>
  48. </group>
  49. </sheet>
  50. </form>
  51. </field>
  52. </record>
  53. <!-- Hostel Tree View -->
  54. <record id="view_hostel_tree" model="ir.ui.view">
  55. <field name="name">hostel.hostel.tree</field>
  56. <field name="model">hostel.hostel</field>
  57. <field name="arch" type="xml">
  58. <tree>
  59. <field name="name"/>
  60. <field name="hostel_code"/>
  61. </tree>
  62. </field>
  63. </record>
  64. <!-- Hostel Action -->
  65. <record id="action_hostel" model="ir.actions.act_window">
  66. <field name="name">宿舍</field>
  67. <field name="type">ir.actions.act_window</field>
  68. <field name="res_model">hostel.hostel</field>
  69. <field name="view_mode">tree,form</field>
  70. <field name="help" type="html">
  71. <p class="oe_view_nocontent_create">
  72. 创建宿舍.
  73. </p>
  74. </field>
  75. </record>
  76. <!-- Hostel Menu -->
  77. <menuitem id="menu_hostel" name="宿舍列表" action="action_hostel"/>
  78. </data>
  79. </odoo>