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.

56 lines
1.7 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <record model="ir.ui.view" id="city_zip_form">
  4. <field name="name">res.city.zip.form</field>
  5. <field name="model">res.city.zip</field>
  6. <field name="arch" type="xml">
  7. <form string="Zip">
  8. <group>
  9. <field name="name"/>
  10. <field name="city_id"/>
  11. </group>
  12. </form>
  13. </field>
  14. </record>
  15. <record model="ir.ui.view" id="city_zip_tree">
  16. <field name="name">res.city.zip.tree</field>
  17. <field name="model">res.city.zip</field>
  18. <field name="arch" type="xml">
  19. <tree string="Zips" editable="top">
  20. <field name="name"/>
  21. <field name="city_id"/>
  22. </tree>
  23. </field>
  24. </record>
  25. <record id="view_city_zip_filter" model="ir.ui.view">
  26. <field name="name">res.city.zip.select</field>
  27. <field name="model">res.city.zip</field>
  28. <field name="arch" type="xml">
  29. <search string="Search zip">
  30. <field name="name"/>
  31. <field name="city_id"/>
  32. </search>
  33. </field>
  34. </record>
  35. <record id="action_zip_tree" model="ir.actions.act_window">
  36. <field name="name">Locations</field>
  37. <field name="res_model">res.city.zip</field>
  38. <field name="view_type">form</field>
  39. <field name="view_mode">tree,form</field>
  40. <field ref="city_zip_tree" name="view_id"/>
  41. <field name="search_view_id" ref="view_city_zip_filter"/>
  42. </record>
  43. <menuitem
  44. name="Zips"
  45. id="locations_menu_zips"
  46. parent="contacts.menu_localisation"
  47. action="action_zip_tree"
  48. sequence="5"
  49. />
  50. </odoo>