Merge lp:~acysos-team/openerp-spain/openerp-spain-6.0-city into lp:~openerp-spain-team/openerp-spain/6.0

Proposed by Ignacio Ibeas (www.acysos.com)
Status: Merged
Merged at revision: 345
Proposed branch: lp:~acysos-team/openerp-spain/openerp-spain-6.0-city
Merge into: lp:~openerp-spain-team/openerp-spain/6.0
Diff against target: 1306 lines (+1204/-0)
19 files modified
city/__init__.py (+28/-0)
city/__openerp__.py (+46/-0)
city/city.py (+70/-0)
city/city_view.xml (+45/-0)
city/country.py (+35/-0)
city/country_view.xml (+16/-0)
city/i18n/bg.po (+88/-0)
city/i18n/ca.po (+94/-0)
city/i18n/city.pot (+76/-0)
city/i18n/es.po (+76/-0)
city/i18n/fi.po (+88/-0)
city/i18n/fr.po (+93/-0)
city/i18n/fr_BE.po (+85/-0)
city/i18n/ru.po (+89/-0)
city/i18n/sv.po (+86/-0)
city/i18n/vi.po (+89/-0)
city/partner.py (+50/-0)
city/partner_view.xml (+47/-0)
city/security/ir.model.access.csv (+3/-0)
To merge this branch: bzr merge lp:~acysos-team/openerp-spain/openerp-spain-6.0-city
Reviewer Review Type Date Requested Status
Ignacio Ibeas (www.acysos.com) Approve
Review via email: mp+163488@code.launchpad.net

Description of the change

Añade el módulo city que usamos muchos en la localización y de momento no van a añadirlo en otros repositorios más lógicos.

To post a comment you must log in.
Revision history for this message
Ignacio Ibeas (www.acysos.com) (ignacio-acysos) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'city'
=== added file 'city/__init__.py'
--- city/__init__.py 1970-01-01 00:00:00 +0000
+++ city/__init__.py 2013-05-13 09:06:50 +0000
@@ -0,0 +1,28 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (c) 2013 Servicios Baeza (http://www.serviciosbaeza.com/) All Rights Reserved.
6# Pedro Manuel Baeza <pedro.baeza@gmail.com>
7# Copyright (c) 2013 Acysos S.L. (http://acysos.com) All Rights Reserved.
8# Ignacio Ibeas <ignacio@acysos.com>
9# $Id$
10#
11# This program is free software: you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program. If not, see <http://www.gnu.org/licenses/>.
23#
24##############################################################################
25
26import city
27import partner
28import country
0\ No newline at end of file29\ No newline at end of file
130
=== added file 'city/__openerp__.py'
--- city/__openerp__.py 1970-01-01 00:00:00 +0000
+++ city/__openerp__.py 2013-05-13 09:06:50 +0000
@@ -0,0 +1,46 @@
1#!/usr/bin/env python
2# -*- encoding: utf-8 -*-
3##############################################################################
4#
5# OpenERP, Open Source Management Solution
6# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
7# Copyright (c) 2013 Servicios Baeza (http://www.serviciosbaeza.com/) All Rights Reserved.
8# Pedro Manuel Baeza <pedro.baeza@gmail.com>
9# Copyright (c) 2013 Acysos S.L. (http://acysos.com) All Rights Reserved.
10# Ignacio Ibeas <ignacio@acysos.com>
11# $Id$
12#
13# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#
26##############################################################################
27{
28 "name" : "City-Helps to keep Homogeneous address data in the Database",
29 "version" : "2.0",
30 "author" : "Acysos S.L., Pedro Manuel Baeza, Pablo Rocandio",
31 "license" : "AGPL-3",
32 "category" : "Hidden",
33 "description": """Creates a model for storing cities
34Zip code, city, state and country fields are replaced with a location field in partner and partner contact forms.
35This module helps to keep homogeneous address data in the database.""",
36 "depends" : ["base"],
37 "init_xml" : [],
38 "update_xml" : [
39 'city_view.xml',
40 'partner_view.xml',
41 'country_view.xml',
42 'security/ir.model.access.csv'
43 ],
44 "active": False,
45 "installable": True
46}
047
=== added file 'city/city.py'
--- city/city.py 1970-01-01 00:00:00 +0000
+++ city/city.py 2013-05-13 09:06:50 +0000
@@ -0,0 +1,70 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (c) 2013 Servicios Baeza (http://www.serviciosbaeza.com/) All Rights Reserved.
6# Pedro Manuel Baeza <pedro.baeza@gmail.com>
7# Copyright (c) 2013 Acysos S.L. (http://acysos.com) All Rights Reserved.
8# Ignacio Ibeas <ignacio@acysos.com>
9# $Id$
10#
11# This program is free software: you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program. If not, see <http://www.gnu.org/licenses/>.
23#
24##############################################################################
25
26from osv import osv, fields
27import wizard
28import pooler
29
30class city(osv.osv):
31
32 def name_get(self, cr, uid, ids, context=None):
33 if not len(ids):
34 return []
35 res = []
36 for line in self.browse(cr, uid, ids, context=context):
37 name = line.name
38 if line.zip:
39 name = "%s %s" % (line.zip, name)
40 if line.state_id:
41 name = "%s, %s" % (name, line.state_id.name)
42 if line.country_id:
43 name = "%s, %s" % (name, line.country_id.name)
44 res.append((line['id'], name))
45 return res
46
47 def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
48 if args is None:
49 args = []
50 if context is None:
51 context = {}
52 ids = []
53 if name:
54 ids = self.search(cr, uid, [('zip', 'ilike', name)]+ args, limit=limit)
55 if not ids:
56 ids = self.search(cr, uid, [('name', operator, name)]+ args, limit=limit)
57 return self.name_get(cr, uid, ids, context=context)
58
59 _name = 'city.city'
60 _description = 'City'
61 _columns = {
62 'state_id': fields.many2one('res.country.state', 'State',
63 domain="[('country_id','=',country_id)]", select=1),
64 'name': fields.char('City', size=64, required=True, select=1),
65 'zip': fields.char('ZIP', size=64, required=True, select=1),
66 'country_id': fields.many2one('res.country', 'Country', select=1),
67 'code': fields.char('City Code', size=64,
68 help="The official code for the city"),
69 }
70city()
071
=== added file 'city/city_view.xml'
--- city/city_view.xml 1970-01-01 00:00:00 +0000
+++ city/city_view.xml 2013-05-13 09:06:50 +0000
@@ -0,0 +1,45 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4
5 <!-- City -->
6 <record model="ir.ui.view" id="view_city_tree">
7 <field name="name">city.city.tree</field>
8 <field name="model">city.city</field>
9 <field name="type">tree</field>
10 <field name="arch" type="xml">
11 <tree string="City">
12 <field name="zip"/>
13 <field name="name"/>
14 <field name="state_id"/>
15 <field name="country_id"/>
16 </tree>
17 </field>
18 </record>
19
20 <record model="ir.ui.view" id="view_city_form">
21 <field name="name">city.city.form</field>
22 <field name="model">city.city</field>
23 <field name="type">form</field>
24 <field name="arch" type="xml">
25 <form string="City">
26 <field name="zip" select="1"/>
27 <field name="name" select="1"/>
28 <field name="country_id" />
29 <field name="state_id" select="1"/>
30 <field name="code" select="2"/>
31 </form>
32 </field>
33 </record>
34
35 <record model="ir.actions.act_window" id="action_city">
36 <field name="name">City</field>
37 <field name="type">ir.actions.act_window</field>
38 <field name="res_model">city.city</field>
39 <field name="view_type">form</field>
40 </record>
41
42 <menuitem name="Cities" groups="base.group_system" action="action_city" parent="base.menu_localisation" id="menu_city_partner"/>
43
44 </data>
45</openerp>
046
=== added file 'city/country.py'
--- city/country.py 1970-01-01 00:00:00 +0000
+++ city/country.py 2013-05-13 09:06:50 +0000
@@ -0,0 +1,35 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (c) 2013 Servicios Baeza (http://www.serviciosbaeza.com/) All Rights Reserved.
6# Pedro Manuel Baeza <pedro.baeza@gmail.com>
7# Copyright (c) 2013 Acysos S.L. (http://acysos.com) All Rights Reserved.
8# Ignacio Ibeas <ignacio@acysos.com>
9# $Id$
10#
11# This program is free software: you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program. If not, see <http://www.gnu.org/licenses/>.
23#
24##############################################################################
25
26from osv import osv, fields
27import wizard
28import pooler
29
30class CountryState(osv.osv):
31 _inherit = 'res.country.state'
32 _columns = {
33 'city_ids': fields.one2many('city.city', 'state_id', 'Cities'),
34 }
35CountryState()
0\ No newline at end of file36\ No newline at end of file
137
=== added file 'city/country_view.xml'
--- city/country_view.xml 1970-01-01 00:00:00 +0000
+++ city/country_view.xml 2013-05-13 09:06:50 +0000
@@ -0,0 +1,16 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4 <!-- Add cities to the State form -->
5 <record model="ir.ui.view" id="view_country_state_form2">
6 <field name="name">view_country_state_form2</field>
7 <field name="model">res.country.state</field>
8 <field name="inherit_id" ref="base.view_country_state_form"/>
9 <field name="arch" type="xml">
10 <field name="code" position="after">
11 <field name="city_ids" colspan="4" nolabel="1" widget="one2many_list"/>
12 </field>
13 </field>
14 </record>
15 </data>
16</openerp>
0\ No newline at end of file17\ No newline at end of file
118
=== added directory 'city/i18n'
=== added file 'city/i18n/bg.po'
--- city/i18n/bg.po 1970-01-01 00:00:00 +0000
+++ city/i18n/bg.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,88 @@
1# Bulgarian translation for openobject-addons
2# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
3# This file is distributed under the same license as the openobject-addons package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openobject-addons\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2009-02-27 09:13+0000\n"
11"PO-Revision-Date: 2011-02-26 10:06+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Bulgarian <bg@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2012-10-31 04:47+0000\n"
18"X-Generator: Launchpad (build 16218)\n"
19
20#. module: city
21#: view:city.city:0
22#: model:ir.actions.act_window,name:city.action_city
23#: model:ir.model,name:city.model_city_city
24#: model:ir.module.module,shortdesc:city.module_meta_information
25msgid "City"
26msgstr "Град"
27
28#. module: city
29#: constraint:ir.ui.view:0
30msgid "Invalid XML for View Architecture!"
31msgstr ""
32
33#. module: city
34#: constraint:ir.model:0
35msgid ""
36"The Object name must start with x_ and not contain any special character !"
37msgstr ""
38"Името на обекта трябва да започва с x_ и не може да никакви специални знаци !"
39
40#. module: city
41#: field:city.city,zip:0
42msgid "ZIP"
43msgstr ""
44
45#. module: city
46#: field:city.city,state_id:0
47msgid "State"
48msgstr "Област"
49
50#. module: city
51#: field:city.city,country_id:0
52msgid "Country"
53msgstr "Държава"
54
55#. module: city
56#: field:city.city,code:0
57msgid "City Code"
58msgstr "Код на града"
59
60#. module: city
61#: model:ir.module.module,description:city.module_meta_information
62msgid ""
63"Creates a model for storing cities\n"
64"Zip code, city, state and country fields are replaced with a location field "
65"in partner and partner contact forms.\n"
66"This module helps to keep homogeneous address data in the database."
67msgstr ""
68
69#. module: city
70#: field:city.city,name:0
71msgid "City Name"
72msgstr "Име на град"
73
74#. module: city
75#: field:res.partner.address,city_id:0
76msgid "Location"
77msgstr "Местоположение"
78
79#. module: city
80#: help:city.city,code:0
81msgid "The official code for the city"
82msgstr ""
83
84#. module: city
85#: model:ir.ui.menu,name:city.menu_city_partner
86#: field:res.country.state,city_ids:0
87msgid "Cities"
88msgstr "Градове"
089
=== added file 'city/i18n/ca.po'
--- city/i18n/ca.po 1970-01-01 00:00:00 +0000
+++ city/i18n/ca.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,94 @@
1# Translation of OpenERP Server.
2# This file containt the translation of the following modules:
3# * city
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.0-alpha\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-02-27 09:13+0000\n"
10"PO-Revision-Date: 2010-01-19 05:17+0000\n"
11"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
12"<jesteve@zikzakmedia.com>\n"
13"Language-Team: \n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2012-10-31 04:47+0000\n"
18"X-Generator: Launchpad (build 16218)\n"
19
20#. module: city
21#: view:city.city:0
22#: model:ir.actions.act_window,name:city.action_city
23#: model:ir.model,name:city.model_city_city
24#: model:ir.module.module,shortdesc:city.module_meta_information
25msgid "City"
26msgstr "Ciutat"
27
28#. module: city
29#: constraint:ir.ui.view:0
30msgid "Invalid XML for View Architecture!"
31msgstr "XML no vàlid per a la definició de la vista!"
32
33#. module: city
34#: constraint:ir.model:0
35msgid ""
36"The Object name must start with x_ and not contain any special character !"
37msgstr ""
38"El nom de l'objecte ha de començar amb x_ i no contenir cap caràcter "
39"especial !"
40
41#. module: city
42#: field:city.city,zip:0
43msgid "ZIP"
44msgstr "Codi postal"
45
46#. module: city
47#: field:city.city,state_id:0
48msgid "State"
49msgstr "Província"
50
51#. module: city
52#: field:city.city,country_id:0
53msgid "Country"
54msgstr "País"
55
56#. module: city
57#: field:city.city,code:0
58msgid "City Code"
59msgstr "Codi de ciutat"
60
61#. module: city
62#: model:ir.module.module,description:city.module_meta_information
63msgid ""
64"Creates a model for storing cities\n"
65"Zip code, city, state and country fields are replaced with a location field "
66"in partner and partner contact forms.\n"
67"This module helps to keep homogeneous address data in the database."
68msgstr ""
69"Crea un model per emmagatzemar ciutats.\n"
70"Els camps de codi postal, província i país són reemplaçats amb un camp de "
71"localització en els formularis d'empresa i contacte/adreça d'empresa.\n"
72"Aquest mòdul ajuda a mantenir informació homogènia d'adreces a la base de "
73"dades."
74
75#. module: city
76#: field:city.city,name:0
77msgid "City Name"
78msgstr "Nom de la ciutat"
79
80#. module: city
81#: field:res.partner.address,city_id:0
82msgid "Location"
83msgstr "Ubicació"
84
85#. module: city
86#: help:city.city,code:0
87msgid "The official code for the city"
88msgstr "El codi oficial de la ciutat."
89
90#. module: city
91#: model:ir.ui.menu,name:city.menu_city_partner
92#: field:res.country.state,city_ids:0
93msgid "Cities"
94msgstr "Ciutats"
095
=== added file 'city/i18n/city.pot'
--- city/i18n/city.pot 1970-01-01 00:00:00 +0000
+++ city/i18n/city.pot 2013-05-13 09:06:50 +0000
@@ -0,0 +1,76 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * city
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.4\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2013-04-30 12:00+0000\n"
10"PO-Revision-Date: 2013-04-30 12:00+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: city
19#: view:city.city:0
20#: field:city.city,name:0
21#: model:ir.actions.act_window,name:city.action_city
22#: model:ir.model,name:city.model_city_city
23msgid "City"
24msgstr ""
25
26#. module: city
27#: model:ir.model,name:city.model_res_partner_address
28msgid "Partner Addresses"
29msgstr ""
30
31#. module: city
32#: field:city.city,zip:0
33msgid "ZIP"
34msgstr ""
35
36#. module: city
37#: field:city.city,country_id:0
38msgid "Country"
39msgstr ""
40
41#. module: city
42#: help:res.partner.address,location:0
43msgid "Use the name or the zip to search the location"
44msgstr ""
45
46#. module: city
47#: field:city.city,code:0
48msgid "City Code"
49msgstr ""
50
51#. module: city
52#: field:city.city,state_id:0
53msgid "State"
54msgstr ""
55
56#. module: city
57#: field:res.partner.address,location:0
58msgid "Location"
59msgstr ""
60
61#. module: city
62#: help:city.city,code:0
63msgid "The official code for the city"
64msgstr ""
65
66#. module: city
67#: model:ir.ui.menu,name:city.menu_city_partner
68#: field:res.country.state,city_ids:0
69msgid "Cities"
70msgstr ""
71
72#. module: city
73#: model:ir.model,name:city.model_res_country_state
74msgid "Country state"
75msgstr ""
76
077
=== added file 'city/i18n/es.po'
--- city/i18n/es.po 1970-01-01 00:00:00 +0000
+++ city/i18n/es.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,76 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * city
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.4\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2013-04-30 12:01+0000\n"
10"PO-Revision-Date: 2013-04-30 12:01+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: city
19#: view:city.city:0
20#: field:city.city,name:0
21#: model:ir.actions.act_window,name:city.action_city
22#: model:ir.model,name:city.model_city_city
23msgid "City"
24msgstr "Ciudad"
25
26#. module: city
27#: model:ir.model,name:city.model_res_partner_address
28msgid "Partner Addresses"
29msgstr "Direcciones de empresa"
30
31#. module: city
32#: field:city.city,zip:0
33msgid "ZIP"
34msgstr "Código postal"
35
36#. module: city
37#: field:city.city,country_id:0
38msgid "Country"
39msgstr "País"
40
41#. module: city
42#: help:res.partner.address,location:0
43msgid "Use the name or the zip to search the location"
44msgstr "Utilice el nombre o el código postal para buscar la localización"
45
46#. module: city
47#: field:city.city,code:0
48msgid "City Code"
49msgstr "Código de ciudad"
50
51#. module: city
52#: field:city.city,state_id:0
53msgid "State"
54msgstr "Provincia"
55
56#. module: city
57#: field:res.partner.address,location:0
58msgid "Location"
59msgstr "Location"
60
61#. module: city
62#: help:city.city,code:0
63msgid "The official code for the city"
64msgstr "Código oficial de la ciudad."
65
66#. module: city
67#: model:ir.ui.menu,name:city.menu_city_partner
68#: field:res.country.state,city_ids:0
69msgid "Cities"
70msgstr "Ciudades"
71
72#. module: city
73#: model:ir.model,name:city.model_res_country_state
74msgid "Country state"
75msgstr "Provincia"
76
077
=== added file 'city/i18n/fi.po'
--- city/i18n/fi.po 1970-01-01 00:00:00 +0000
+++ city/i18n/fi.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,88 @@
1# Finnish translation for openobject-addons
2# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
3# This file is distributed under the same license as the openobject-addons package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openobject-addons\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2009-02-27 09:13+0000\n"
11"PO-Revision-Date: 2011-06-28 06:58+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Finnish <fi@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2012-10-31 04:47+0000\n"
18"X-Generator: Launchpad (build 16218)\n"
19
20#. module: city
21#: view:city.city:0
22#: model:ir.actions.act_window,name:city.action_city
23#: model:ir.model,name:city.model_city_city
24#: model:ir.module.module,shortdesc:city.module_meta_information
25msgid "City"
26msgstr "Kaupunki"
27
28#. module: city
29#: constraint:ir.ui.view:0
30msgid "Invalid XML for View Architecture!"
31msgstr "Virheellinen XML näkymä-arkkitehtuurille!"
32
33#. module: city
34#: constraint:ir.model:0
35msgid ""
36"The Object name must start with x_ and not contain any special character !"
37msgstr ""
38"Objektin nimi täytyy alkaa X_ eikä se saa sisältää mitää erikoismerkkejä!"
39
40#. module: city
41#: field:city.city,zip:0
42msgid "ZIP"
43msgstr "Postinumero"
44
45#. module: city
46#: field:city.city,state_id:0
47msgid "State"
48msgstr "Osavaltio"
49
50#. module: city
51#: field:city.city,country_id:0
52msgid "Country"
53msgstr "Maa"
54
55#. module: city
56#: field:city.city,code:0
57msgid "City Code"
58msgstr "Maakoodi"
59
60#. module: city
61#: model:ir.module.module,description:city.module_meta_information
62msgid ""
63"Creates a model for storing cities\n"
64"Zip code, city, state and country fields are replaced with a location field "
65"in partner and partner contact forms.\n"
66"This module helps to keep homogeneous address data in the database."
67msgstr ""
68
69#. module: city
70#: field:city.city,name:0
71msgid "City Name"
72msgstr "Kaupungin nimi"
73
74#. module: city
75#: field:res.partner.address,city_id:0
76msgid "Location"
77msgstr "Sijainti"
78
79#. module: city
80#: help:city.city,code:0
81msgid "The official code for the city"
82msgstr "Kaupungin viralinen koodi"
83
84#. module: city
85#: model:ir.ui.menu,name:city.menu_city_partner
86#: field:res.country.state,city_ids:0
87msgid "Cities"
88msgstr "Kaupungit"
089
=== added file 'city/i18n/fr.po'
--- city/i18n/fr.po 1970-01-01 00:00:00 +0000
+++ city/i18n/fr.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,93 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * city
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.0\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-02-27 09:13+0000\n"
10"PO-Revision-Date: 2010-01-19 05:16+0000\n"
11"Last-Translator: Numérigraphe <Unknown>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2012-10-31 04:47+0000\n"
17"X-Generator: Launchpad (build 16218)\n"
18
19#. module: city
20#: view:city.city:0
21#: model:ir.actions.act_window,name:city.action_city
22#: model:ir.model,name:city.model_city_city
23#: model:ir.module.module,shortdesc:city.module_meta_information
24msgid "City"
25msgstr "Ville"
26
27#. module: city
28#: constraint:ir.ui.view:0
29msgid "Invalid XML for View Architecture!"
30msgstr "XML non valide pour l'architecture de la vue"
31
32#. module: city
33#: constraint:ir.model:0
34msgid ""
35"The Object name must start with x_ and not contain any special character !"
36msgstr ""
37"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
38"spéciaux !"
39
40#. module: city
41#: field:city.city,zip:0
42msgid "ZIP"
43msgstr "Code postal"
44
45#. module: city
46#: field:city.city,state_id:0
47msgid "State"
48msgstr "État"
49
50#. module: city
51#: field:city.city,country_id:0
52msgid "Country"
53msgstr "Pays"
54
55#. module: city
56#: field:city.city,code:0
57msgid "City Code"
58msgstr "Code de la ville"
59
60#. module: city
61#: model:ir.module.module,description:city.module_meta_information
62msgid ""
63"Creates a model for storing cities\n"
64"Zip code, city, state and country fields are replaced with a location field "
65"in partner and partner contact forms.\n"
66"This module helps to keep homogeneous address data in the database."
67msgstr ""
68"Crée un modèle de données pour les villes.\n"
69"Les champs \"code postal\", \"ville\", \"état\" et \"pays\" sont remplacés "
70"par un champ \"localisation\" dans les formulaires \"partenaire\" et "
71"\"contacts du partenaire\".Ce module permet de conserver des données "
72"d'adresse homogènes."
73
74#. module: city
75#: field:city.city,name:0
76msgid "City Name"
77msgstr "Nom de la ville"
78
79#. module: city
80#: field:res.partner.address,city_id:0
81msgid "Location"
82msgstr "Localisation"
83
84#. module: city
85#: help:city.city,code:0
86msgid "The official code for the city"
87msgstr "Le code officiel de la ville"
88
89#. module: city
90#: model:ir.ui.menu,name:city.menu_city_partner
91#: field:res.country.state,city_ids:0
92msgid "Cities"
93msgstr "Villes"
094
=== added file 'city/i18n/fr_BE.po'
--- city/i18n/fr_BE.po 1970-01-01 00:00:00 +0000
+++ city/i18n/fr_BE.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,85 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * city
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.0\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-02-27 09:13:15+0000\n"
10"PO-Revision-Date: 2009-02-27 10:22+0100\n"
11"Last-Translator: Numerigraphe <informatique@numerigraphe.com>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: "
17
18#. module: city
19#: view:city.city:0
20#: model:ir.actions.act_window,name:city.action_city
21#: model:ir.model,name:city.model_city_city
22#: model:ir.module.module,shortdesc:city.module_meta_information
23msgid "City"
24msgstr "Ville"
25
26#. module: city
27#: constraint:ir.ui.view:0
28msgid "Invalid XML for View Architecture!"
29msgstr "XML non valide pour l'architecture de la vue"
30
31#. module: city
32#: constraint:ir.model:0
33msgid "The Object name must start with x_ and not contain any special character !"
34msgstr "Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères spéciaux !"
35
36#. module: city
37#: field:city.city,zip:0
38msgid "ZIP"
39msgstr "Code postal"
40
41#. module: city
42#: field:city.city,state_id:0
43msgid "State"
44msgstr "État"
45
46#. module: city
47#: field:city.city,country_id:0
48msgid "Country"
49msgstr "Pays"
50
51#. module: city
52#: field:city.city,code:0
53msgid "City Code"
54msgstr "Code de la ville"
55
56#. module: city
57#: model:ir.module.module,description:city.module_meta_information
58msgid "Creates a model for storing cities\n"
59"Zip code, city, state and country fields are replaced with a location field in partner and partner contact forms.\n"
60"This module helps to keep homogeneous address data in the database."
61msgstr "Crée un modèle de données pour les villes.\n"
62"Les champs \"code postal\", \"ville\", \"état\" et \"pays\" sont remplacés par un champ \"localisation\" dans les formulaires \"partenaire\" et \"contacts du partenaire\"."
63"Ce module permet de conserver des données d'adresse homogènes."
64
65#. module: city
66#: field:city.city,name:0
67msgid "City Name"
68msgstr "Nom de la ville"
69
70#. module: city
71#: field:res.partner.address,city_id:0
72msgid "Location"
73msgstr "Localisation"
74
75#. module: city
76#: help:city.city,code:0
77msgid "The official code for the city"
78msgstr "Le code officiel de la ville"
79
80#. module: city
81#: model:ir.ui.menu,name:city.menu_city_partner
82#: field:res.country.state,city_ids:0
83msgid "Cities"
84msgstr "Villes"
85
086
=== added file 'city/i18n/ru.po'
--- city/i18n/ru.po 1970-01-01 00:00:00 +0000
+++ city/i18n/ru.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,89 @@
1# Russian translation for openobject-addons
2# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
3# This file is distributed under the same license as the openobject-addons package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openobject-addons\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2009-02-27 09:13+0000\n"
11"PO-Revision-Date: 2011-03-30 17:03+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Russian <ru@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2012-10-31 04:47+0000\n"
18"X-Generator: Launchpad (build 16218)\n"
19
20#. module: city
21#: view:city.city:0
22#: model:ir.actions.act_window,name:city.action_city
23#: model:ir.model,name:city.model_city_city
24#: model:ir.module.module,shortdesc:city.module_meta_information
25msgid "City"
26msgstr "Город"
27
28#. module: city
29#: constraint:ir.ui.view:0
30msgid "Invalid XML for View Architecture!"
31msgstr "Неправильный XML для просмотра структуры!"
32
33#. module: city
34#: constraint:ir.model:0
35msgid ""
36"The Object name must start with x_ and not contain any special character !"
37msgstr ""
38"Имя Объекта должно начинаться с x_ и не должно содержать специальных "
39"символов!"
40
41#. module: city
42#: field:city.city,zip:0
43msgid "ZIP"
44msgstr "Почтовый индекс"
45
46#. module: city
47#: field:city.city,state_id:0
48msgid "State"
49msgstr "Область/штат"
50
51#. module: city
52#: field:city.city,country_id:0
53msgid "Country"
54msgstr "Страна"
55
56#. module: city
57#: field:city.city,code:0
58msgid "City Code"
59msgstr "Код города"
60
61#. module: city
62#: model:ir.module.module,description:city.module_meta_information
63msgid ""
64"Creates a model for storing cities\n"
65"Zip code, city, state and country fields are replaced with a location field "
66"in partner and partner contact forms.\n"
67"This module helps to keep homogeneous address data in the database."
68msgstr ""
69
70#. module: city
71#: field:city.city,name:0
72msgid "City Name"
73msgstr "Название города"
74
75#. module: city
76#: field:res.partner.address,city_id:0
77msgid "Location"
78msgstr "Расположение"
79
80#. module: city
81#: help:city.city,code:0
82msgid "The official code for the city"
83msgstr "Официальный код для города"
84
85#. module: city
86#: model:ir.ui.menu,name:city.menu_city_partner
87#: field:res.country.state,city_ids:0
88msgid "Cities"
89msgstr "Города"
090
=== added file 'city/i18n/sv.po'
--- city/i18n/sv.po 1970-01-01 00:00:00 +0000
+++ city/i18n/sv.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,86 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * city
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.14\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-02-27 09:13+0000\n"
10"PO-Revision-Date: 2011-01-14 14:52+0000\n"
11"Last-Translator: Magnus Brandt (mba), Aspirix AB <Unknown>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2012-10-31 04:47+0000\n"
17"X-Generator: Launchpad (build 16218)\n"
18
19#. module: city
20#: view:city.city:0
21#: model:ir.actions.act_window,name:city.action_city
22#: model:ir.model,name:city.model_city_city
23#: model:ir.module.module,shortdesc:city.module_meta_information
24msgid "City"
25msgstr "Stad"
26
27#. module: city
28#: constraint:ir.ui.view:0
29msgid "Invalid XML for View Architecture!"
30msgstr "Ogiltig XML för Vy-arkitektur!"
31
32#. module: city
33#: constraint:ir.model:0
34msgid ""
35"The Object name must start with x_ and not contain any special character !"
36msgstr ""
37
38#. module: city
39#: field:city.city,zip:0
40msgid "ZIP"
41msgstr "Postnummer"
42
43#. module: city
44#: field:city.city,state_id:0
45msgid "State"
46msgstr ""
47
48#. module: city
49#: field:city.city,country_id:0
50msgid "Country"
51msgstr "Land"
52
53#. module: city
54#: field:city.city,code:0
55msgid "City Code"
56msgstr ""
57
58#. module: city
59#: model:ir.module.module,description:city.module_meta_information
60msgid ""
61"Creates a model for storing cities\n"
62"Zip code, city, state and country fields are replaced with a location field "
63"in partner and partner contact forms.\n"
64"This module helps to keep homogeneous address data in the database."
65msgstr ""
66
67#. module: city
68#: field:city.city,name:0
69msgid "City Name"
70msgstr "Stadens namn"
71
72#. module: city
73#: field:res.partner.address,city_id:0
74msgid "Location"
75msgstr "Plats"
76
77#. module: city
78#: help:city.city,code:0
79msgid "The official code for the city"
80msgstr ""
81
82#. module: city
83#: model:ir.ui.menu,name:city.menu_city_partner
84#: field:res.country.state,city_ids:0
85msgid "Cities"
86msgstr "Städer"
087
=== added file 'city/i18n/vi.po'
--- city/i18n/vi.po 1970-01-01 00:00:00 +0000
+++ city/i18n/vi.po 2013-05-13 09:06:50 +0000
@@ -0,0 +1,89 @@
1# Vietnamese translation for openobject-addons
2# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
3# This file is distributed under the same license as the openobject-addons package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openobject-addons\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2009-02-27 09:13+0000\n"
11"PO-Revision-Date: 2011-03-28 15:42+0000\n"
12"Last-Translator: OpenBMS JSC <Unknown>\n"
13"Language-Team: Vietnamese <vi@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2012-10-31 04:47+0000\n"
18"X-Generator: Launchpad (build 16218)\n"
19
20#. module: city
21#: view:city.city:0
22#: model:ir.actions.act_window,name:city.action_city
23#: model:ir.model,name:city.model_city_city
24#: model:ir.module.module,shortdesc:city.module_meta_information
25msgid "City"
26msgstr "Thành phố/Quận"
27
28#. module: city
29#: constraint:ir.ui.view:0
30msgid "Invalid XML for View Architecture!"
31msgstr "XML không hợp lệ cho Kiến trúc Xem!"
32
33#. module: city
34#: constraint:ir.model:0
35msgid ""
36"The Object name must start with x_ and not contain any special character !"
37msgstr ""
38"Tên đối tượng phải bắt đầu bằng x_ và không bao gồm bất kỳ ký tự đặc biệt "
39"nào!"
40
41#. module: city
42#: field:city.city,zip:0
43msgid "ZIP"
44msgstr "Mã bưu chính"
45
46#. module: city
47#: field:city.city,state_id:0
48msgid "State"
49msgstr "Tiểu bang"
50
51#. module: city
52#: field:city.city,country_id:0
53msgid "Country"
54msgstr "Quốc gia"
55
56#. module: city
57#: field:city.city,code:0
58msgid "City Code"
59msgstr "Mã Thành phố"
60
61#. module: city
62#: model:ir.module.module,description:city.module_meta_information
63msgid ""
64"Creates a model for storing cities\n"
65"Zip code, city, state and country fields are replaced with a location field "
66"in partner and partner contact forms.\n"
67"This module helps to keep homogeneous address data in the database."
68msgstr ""
69
70#. module: city
71#: field:city.city,name:0
72msgid "City Name"
73msgstr "Tên Thành phố"
74
75#. module: city
76#: field:res.partner.address,city_id:0
77msgid "Location"
78msgstr "Địa điểm"
79
80#. module: city
81#: help:city.city,code:0
82msgid "The official code for the city"
83msgstr "Mã chính thức của thành phố"
84
85#. module: city
86#: model:ir.ui.menu,name:city.menu_city_partner
87#: field:res.country.state,city_ids:0
88msgid "Cities"
89msgstr "Các thành phố"
090
=== added file 'city/partner.py'
--- city/partner.py 1970-01-01 00:00:00 +0000
+++ city/partner.py 2013-05-13 09:06:50 +0000
@@ -0,0 +1,50 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (c) 2013 Servicios Baeza (http://www.serviciosbaeza.com/) All Rights Reserved.
6# Pedro Manuel Baeza <pedro.baeza@gmail.com>
7# Copyright (c) 2013 Acysos S.L. (http://acysos.com) All Rights Reserved.
8# Ignacio Ibeas <ignacio@acysos.com>
9# $Id$
10#
11# This program is free software: you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program. If not, see <http://www.gnu.org/licenses/>.
23#
24##############################################################################
25
26from osv import osv, fields
27import wizard
28import pooler
29
30class res_partner_address(osv.osv):
31 _inherit = "res.partner.address"
32
33 def on_change_city(self,cr,uid,ids,location):
34 result = {}
35 if location:
36 city = self.pool.get('city.city').browse(cr, uid, location)
37 result = {'value': {
38 'zip': city.zipcode,
39 'country_id': city.country_id.id,
40 'city': city.name,
41 'state_id': city.state_id.id
42 }
43 }
44 return result
45
46 _columns = {
47 'city_id': fields.many2one('city.city', 'Location', select=1,
48 help='Use the name or the zip to search the location'),
49 }
50res_partner_address()
0\ No newline at end of file51\ No newline at end of file
152
=== added file 'city/partner_view.xml'
--- city/partner_view.xml 1970-01-01 00:00:00 +0000
+++ city/partner_view.xml 2013-05-13 09:06:50 +0000
@@ -0,0 +1,47 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4 <!-- Add city_id to the Partner form -->
5 <record model="ir.ui.view" id="view_partner_form_city">
6 <field name="name">res.partner.form.city</field>
7 <field name="model">res.partner</field>
8 <field name="inherit_id" ref="base.view_partner_form"/>
9 <field name="arch" type="xml">
10 <data>
11 <xpath expr="//field[@name='address']//field[@name='street2']" position="after">
12 <field name="city_id" colspan="4" on_change="on_change_city(city_id)" />
13 </xpath>
14 </data>
15 </field>
16 </record>
17
18 <!-- Add city_id to the Partner Address form 1 -->
19 <record model="ir.ui.view" id="view_partner_address_form1_city">
20 <field name="name">res.partner.address.form1.city</field>
21 <field name="model">res.partner.address</field>
22 <field name="inherit_id" ref="base.view_partner_address_form1"/>
23 <field name="arch" type="xml">
24 <data>
25 <xpath expr="//field[@name='street2']" position="after">
26 <field name="city_id" on_change="on_change_city(city_id)" />
27 </xpath>
28 </data>
29 </field>
30 </record>
31
32 <!-- Add city_id to the Partner Address form 2 -->
33 <record model="ir.ui.view" id="view_partner_address_form2_city">
34 <field name="name">res.partner.address.form2.city</field>
35 <field name="model">res.partner.address</field>
36 <field name="inherit_id" ref="base.view_partner_address_form2"/>
37 <field name="arch" type="xml">
38 <data>
39 <xpath expr="//field[@name='street2']" position="after">
40 <field name="city_id" on_change="on_change_city(city_id)" />
41 </xpath>
42 </data>
43 </field>
44 </record>
45
46 </data>
47</openerp>
0\ No newline at end of file48\ No newline at end of file
149
=== added directory 'city/security'
=== added file 'city/security/ir.model.access.csv'
--- city/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ city/security/ir.model.access.csv 2013-05-13 09:06:50 +0000
@@ -0,0 +1,3 @@
1"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
2"access_city_city_group_all","city_city group_user_all","model_city_city",,1,0,0,0
3"access_city_city_group_user","city_city group_user","model_city_city","base.group_partner_manager",1,1,1,1