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.

63 lines
2.3 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_type">form</field>
  40. <field name="view_mode">tree,form</field>
  41. <field 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. <field name="help">
  46. Display and manage the list of all cities that can be assigned to
  47. your partner records. Note that an option can be set on each country separately
  48. to enforce any address of it to have a city in this list.
  49. </field>
  50. </record>
  51. <menuitem
  52. name="Cities"
  53. id="locations_menu_cities"
  54. parent="contacts.menu_localisation"
  55. action="action_res_city_full"
  56. sequence="4"
  57. />
  58. </odoo>