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.

70 lines
2.6 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="better_zip_form">
  5. <field name="name">res.better.zip.form</field>
  6. <field name="model">res.better.zip</field>
  7. <field name="arch" type="xml">
  8. <form string="ZIP">
  9. <group col="4">
  10. <field name="name"/>
  11. <field name="code"/>
  12. <field name="city"/>
  13. <field name="state_id"/>
  14. <field name="country_id"/>
  15. </group>
  16. </form>
  17. </field>
  18. </record>
  19. <record model="ir.ui.view" id="better_zip_tree">
  20. <field name="name">res.better.zip.tree</field>
  21. <field name="model">res.better.zip</field>
  22. <field name="arch" type="xml">
  23. <tree string="ZIP">
  24. <field name="name"/>
  25. <field name="code"/>
  26. <field name="city"/>
  27. <field name="state_id"/>
  28. <field name="country_id"/>
  29. </tree>
  30. </field>
  31. </record>
  32. <record id="view_better_zip_filter" model="ir.ui.view">
  33. <field name="name">res.better.zip.select</field>
  34. <field name="model">res.better.zip</field>
  35. <field name="arch" type="xml">
  36. <search string="Search city">
  37. <field name="name"/>
  38. <field name="code"/>
  39. <field name="city"/>
  40. <field name="state_id"/>
  41. <field name="country_id"/>
  42. <group expand="0" string="Group By">
  43. <filter string="State" domain="[]" context="{'group_by':'state_id'}"/>
  44. <filter string="Country" domain="[]" context="{'group_by':'country_id'}"/>
  45. </group>
  46. </search>
  47. </field>
  48. </record>
  49. <record id="action_zip_tree" model="ir.actions.act_window">
  50. <field name="name">Cites/locations Management</field>
  51. <field name="res_model">res.better.zip</field>
  52. <field name="view_type">form</field>
  53. <field name="view_mode">tree,form</field>
  54. <field ref="better_zip_tree" name="view_id"/>
  55. <field name="search_view_id" ref="view_better_zip_filter"/>
  56. </record>
  57. <menuitem
  58. name="Cities/Locations Management"
  59. id="zip_base"
  60. parent="base.menu_localisation"
  61. action="action_zip_tree"
  62. />
  63. </data>
  64. </openerp>