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.

60 lines
2.2 KiB

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <odoo>
  3. <record id="view_city_tree_inherit" model="ir.ui.view">
  4. <field name="model">res.city</field>
  5. <field name="inherit_id" ref="base_address_city.view_city_tree" />
  6. <field name="arch" type="xml">
  7. <tree position="attributes">
  8. <attribute name="editable" />
  9. </tree>
  10. <field name="zipcode" position="attributes">
  11. <attribute name="invisible">1</attribute>
  12. </field>
  13. <field name="zipcode" position="after">
  14. <field name="zip_ids" widget="many2many_tags" />
  15. </field>
  16. </field>
  17. </record>
  18. <record id="view_city_form" model="ir.ui.view">
  19. <field name="model">res.city</field>
  20. <field name="arch" type="xml">
  21. <form>
  22. <group>
  23. <field name="name" />
  24. <field name="country_id" />
  25. <field name="state_id" />
  26. </group>
  27. <notebook>
  28. <page name="zips" string="Zips">
  29. <field name="zip_ids" />
  30. </page>
  31. </notebook>
  32. </form>
  33. </field>
  34. </record>
  35. <record id="action_res_city_full" model="ir.actions.act_window">
  36. <field name="name">Cities</field>
  37. <field name="type">ir.actions.act_window</field>
  38. <field name="res_model">res.city</field>
  39. <field name="view_mode">tree,form</field>
  40. <field
  41. name="view_ids"
  42. eval="[(5,0,0),
  43. (0, 0, {'view_mode': 'tree', 'view_id': ref('base_address_city.view_city_tree')}),
  44. (0, 0, {'view_mode': 'form', 'view_id': ref('view_city_form')})]"
  45. />
  46. <field name="help">
  47. Display and manage the list of all cities that can be assigned to
  48. your partner records. Note that an option can be set on each country
  49. separately
  50. to enforce any address of it to have a city in this list.
  51. </field>
  52. </record>
  53. <menuitem
  54. name="Cities"
  55. id="locations_menu_cities"
  56. parent="contacts.menu_localisation"
  57. action="action_res_city_full"
  58. sequence="4"
  59. />
  60. </odoo>