From 1c14ff1e32150a05037f0314999f6c70c7154006 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 May 2013 14:33:04 +0200 Subject: [PATCH 01/16] [IMP] porting city addons into better diff: More complexe name get and name search. Completion of country when changing state. Zip object is added on company. One2many from state to zip Security is CSV --- better_zip/__init__.py | 6 +++- better_zip/__openerp__.py | 15 +++++--- better_zip/better_zip.py | 48 ++++++++++++++++--------- better_zip/better_zip_view.xml | 14 ++------ better_zip/company.py | 44 +++++++++++++++++++++++ better_zip/company_view.xml | 19 ++++++++++ better_zip/partner.py | 39 ++++++++++++++++++++ better_zip/partner_view.xml | 17 +++++++++ better_zip/security/ir.model.access.csv | 3 ++ better_zip/security/security.xml | 13 ------- better_zip/state.py | 28 +++++++++++++++ better_zip/state_view.xml | 26 ++++++++++++++ 12 files changed, 226 insertions(+), 46 deletions(-) create mode 100644 better_zip/company.py create mode 100644 better_zip/company_view.xml create mode 100644 better_zip/partner.py create mode 100644 better_zip/partner_view.xml create mode 100644 better_zip/security/ir.model.access.csv delete mode 100644 better_zip/security/security.xml create mode 100644 better_zip/state.py create mode 100644 better_zip/state_view.xml diff --git a/better_zip/__init__.py b/better_zip/__init__.py index b2a606fbd..3433372dc 100644 --- a/better_zip/__init__.py +++ b/better_zip/__init__.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Author Nicolas Bessi. Copyright Camptocamp SA +# Author: Nicolas Bessi. Copyright Camptocamp SA +# Contributor: Pedro Manuel Baeza # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -18,3 +19,6 @@ # ############################################################################## from . import better_zip +from . import partner +from . import state +from . import company \ No newline at end of file diff --git a/better_zip/__openerp__.py b/better_zip/__openerp__.py index 678b030dc..2383a61f5 100644 --- a/better_zip/__openerp__.py +++ b/better_zip/__openerp__.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Author Nicolas Bessi. Copyright Camptocamp SA +# Author: Nicolas Bessi. Copyright Camptocamp SA +# Contributor: Pedro Manuel Baeza # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,11 +20,17 @@ ############################################################################## {'name': 'Better zip management', 'version': '0.3', - 'depends': ['base',], + 'depends': ['base'], 'author': 'Camptocamp', - 'description': """Introduce a better zip/npa management system. Enable partner completion""", + 'description': """ +Introduces a better zip/npa management system. +It enables zip/city auto-completion on partners""", 'website': 'http://www.camptocamp.com', - 'data': ['security/security.xml', 'better_zip_view.xml'], + 'data': ['better_zip_view.xml', + 'state_view.xml', + 'company_view.xml', + 'partner_view.xml', + 'security/ir.model.access.csv'], 'installable': True, 'active': False, } diff --git a/better_zip/better_zip.py b/better_zip/better_zip.py index d23344808..5289513fd 100644 --- a/better_zip/better_zip.py +++ b/better_zip/better_zip.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Author Nicolas Bessi. Copyright Camptocamp SA +# Author: Nicolas Bessi. Copyright Camptocamp SA +# Contributor: Pedro Manuel Baeza # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -17,11 +18,11 @@ # along with this program. If not, see . # ############################################################################## -from openerp.osv.orm import Model, fields +from openerp.osv import orm, fields -class BetterZip(Model): - " Zip/NPA object" +class BetterZip(orm.Model): + " Zip/NPA completion object" _name = "res.better.zip" _description = __doc__ @@ -32,6 +33,8 @@ class BetterZip(Model): 'city': fields.char('City', required=True), 'state_id': fields.many2one('res.country.state', 'State'), 'country_id': fields.many2one('res.country', 'Country'), + 'code': fields.char('City Code', size=64, + help="The official code for the city"), } _defaults = {'priority': 100} @@ -39,19 +42,30 @@ class BetterZip(Model): def name_get(self, cursor, uid, ids, context=None): res = [] for bzip in self.browse(cursor, uid, ids): - res.append((bzip.id, u"%s %s" % (bzip.name, bzip.city))) + name = [bzip.name, bzip.city] + if bzip.state_id: + name.append(bzip.state_id.name) + if bzip.country_id: + name.append(bzip.country_id.name) + res.append((bzip.id, " ".join(name))) return res + def onchange_state_id(self, cr, uid, ids, state_id=False, context={}): + result = {} + if state_id: + state = self.pool['res.country.state'].browse(cr, uid, state_id, context=context) + if state: + result['value'] = {'country_id': state.country_id.id} + return result -class Partner(Model): - _inherit = "res.partner" - _columns = {'zip_id': fields.many2one('res.better.zip', 'ZIP/PN')} - - def onchange_zip_id(self, cursor, uid, ids, zip_id, context=None): - if not zip_id: - return {} - if isinstance(zip_id, list): - zip_id = zip_id[0] - bzip = self.pool['res.better.zip'].browse(cursor, uid, zip_id, context=context) - return {'value': {'zip': bzip.name, 'city': bzip.city, - 'country_id': bzip.country_id.id, 'state_id': bzip.state_id.id}} + def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100): + if args is None: + args = [] + if context is None: + context = {} + ids = [] + if name: + ids = self.search(cr, uid, [('name', 'ilike', name)] + args, limit=limit) + if not ids: + ids = self.search(cr, uid, [('city', operator, name)] + args, limit=limit) + return self.name_get(cr, uid, ids, context=context) diff --git a/better_zip/better_zip_view.xml b/better_zip/better_zip_view.xml index 0bf23ca0e..fdd4d0dac 100644 --- a/better_zip/better_zip_view.xml +++ b/better_zip/better_zip_view.xml @@ -1,16 +1,6 @@ - - res.partner.zip_id.2 - res.partner - - - - - - - res.better.zip.form @@ -19,9 +9,10 @@
+ - +
@@ -34,6 +25,7 @@ + diff --git a/better_zip/company.py b/better_zip/company.py new file mode 100644 index 000000000..274fac615 --- /dev/null +++ b/better_zip/company.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Nicolas Bessi. Copyright Camptocamp SA +# Contributor: Pedro Manuel Baeza +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp.osv import orm, fields + + +class ResCompany(orm.Model): + + _inherit = 'res.company' + + def on_change_city(self, cursor, uid, ids, zip_id): + result = {} + if zip_id: + bzip = self.pool['res.better.zip'].browse(cursor, uid, zip_id) + result = {'value': {'zip': bzip.name, + 'country_id': bzip.country_id.id if bzip.country_id else False, + 'city': bzip.city, + 'state_id': bzip.state_id.id if bzip.state_id else False + } + } + return result + + _columns = { + 'better_zip_id': fields.many2one('res.better.zip', 'Location', select=1, + help=('Use the city name or the zip code' + ' to search the location')), + } diff --git a/better_zip/company_view.xml b/better_zip/company_view.xml new file mode 100644 index 000000000..40ee445d6 --- /dev/null +++ b/better_zip/company_view.xml @@ -0,0 +1,19 @@ + + + + + + res.company.form.city + res.company + + + + + + + + + diff --git a/better_zip/partner.py b/better_zip/partner.py new file mode 100644 index 000000000..458e5fd34 --- /dev/null +++ b/better_zip/partner.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Nicolas Bessi. Copyright Camptocamp SA +# Contributor: Pedro Manuel Baeza +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp.osv import orm, fields + + +class ResPartner(orm.Model): + _inherit = "res.partner" + _columns = {'zip_id': fields.many2one('res.better.zip', 'ZIP/PN')} + + def onchange_zip_id(self, cursor, uid, ids, zip_id, context=None): + if not zip_id: + return {} + if isinstance(zip_id, list): + zip_id = zip_id[0] + bzip = self.pool['res.better.zip'].browse(cursor, uid, zip_id, context=context) + return {'value': {'zip': bzip.name, + 'city': bzip.city, + 'country_id': bzip.country_id.id if bzip.country_id else False, + 'state_id': bzip.state_id.id if bzip.state_id else False, + } + } diff --git a/better_zip/partner_view.xml b/better_zip/partner_view.xml new file mode 100644 index 000000000..a442169e5 --- /dev/null +++ b/better_zip/partner_view.xml @@ -0,0 +1,17 @@ + + + + + res.partner.zip_id.2 + res.partner + + + + + + + + + diff --git a/better_zip/security/ir.model.access.csv b/better_zip/security/ir.model.access.csv new file mode 100644 index 000000000..c6562df1b --- /dev/null +++ b/better_zip/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"ir_model_access_betterzip0","res_better_zip group_user_all","model_res_better_zip",base.group_user,1,0,0,0 +"ir_model_access_betterzip1","res_better_zip group_user","model_res_better_zip","base.group_partner_manager",1,1,1,1 \ No newline at end of file diff --git a/better_zip/security/security.xml b/better_zip/security/security.xml deleted file mode 100644 index 3b6fc5a7f..000000000 --- a/better_zip/security/security.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/better_zip/state.py b/better_zip/state.py new file mode 100644 index 000000000..072111e2d --- /dev/null +++ b/better_zip/state.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Nicolas Bessi. Copyright Camptocamp SA +# Contributor: Pedro Manuel Baeza +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp.osv import orm, fields + + +class ResCountryState(orm.Model): + + _inherit = 'res.country.state' + + _columns = {'better_zip_ids': fields.one2many('res.better.zip', 'state_id', 'Cities')} diff --git a/better_zip/state_view.xml b/better_zip/state_view.xml new file mode 100644 index 000000000..96497c9e5 --- /dev/null +++ b/better_zip/state_view.xml @@ -0,0 +1,26 @@ + + + + + + view_country_state_form2 + res.country.state + + + + + + + + + + + + + + + + From 09859b8b82d61041710ef73f4b5a0a654c5b4b61 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 May 2013 14:38:37 +0200 Subject: [PATCH 02/16] [ADD] translation files --- better_zip/i18n/en.po | 105 ++++++++++++++++++++++++++++++++++++++++++ better_zip/i18n/es.po | 105 ++++++++++++++++++++++++++++++++++++++++++ better_zip/i18n/fr.po | 104 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 314 insertions(+) create mode 100644 better_zip/i18n/en.po create mode 100644 better_zip/i18n/es.po create mode 100644 better_zip/i18n/fr.po diff --git a/better_zip/i18n/en.po b/better_zip/i18n/en.po new file mode 100644 index 000000000..a4cca5336 --- /dev/null +++ b/better_zip/i18n/en.po @@ -0,0 +1,105 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * better_zip +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-05-08 12:03+0000\n" +"PO-Revision-Date: 2013-05-08 12:03+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: better_zip +#: field:res.better.zip,city:0 +msgid "City" +msgstr "City" + +#. module: better_zip +#: view:res.company:0 +#: view:res.partner:0 +msgid "ZIP completion" +msgstr "ZIP completion" + +#. module: better_zip +#: model:ir.actions.act_window,name:better_zip.action_zip_tree +#: model:ir.ui.menu,name:better_zip.zip_base +msgid "ZIP Management" +msgstr "ZIP Management" + +#. module: better_zip +#: view:res.better.zip:0 +#: field:res.better.zip,name:0 +msgid "ZIP" +msgstr "ZIP" + +#. module: better_zip +#: field:res.better.zip,country_id:0 +msgid "Country" +msgstr "Country" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_company +msgid "Companies" +msgstr "Companies" + +#. module: better_zip +#: field:res.better.zip,code:0 +msgid "City Code" +msgstr "City Code" + +#. module: better_zip +#: help:res.company,better_zip_id:0 +msgid "Use the city name or the zip code to search the location" +msgstr "Use the city name or the zip code to search the location" + +#. module: better_zip +#: field:res.better.zip,priority:0 +msgid "Priority" +msgstr "Priority" + +#. module: better_zip +#: field:res.better.zip,state_id:0 +msgid "State" +msgstr "State" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_better_zip +msgid " Zip/NPA object" +msgstr " Zip/NPA object" + +#. module: better_zip +#: field:res.company,better_zip_id:0 +msgid "Location" +msgstr "Location" + +#. module: better_zip +#: field:res.partner,zip_id:0 +msgid "ZIP/PN" +msgstr "ZIP/PN" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: better_zip +#: help:res.better.zip,code:0 +msgid "The official code for the city" +msgstr "The official code for the city" + +#. module: better_zip +#: field:res.country.state,better_zip_ids:0 +msgid "Cities" +msgstr "Cities" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_country_state +msgid "Country state" +msgstr "Country state" + diff --git a/better_zip/i18n/es.po b/better_zip/i18n/es.po new file mode 100644 index 000000000..3e17553f8 --- /dev/null +++ b/better_zip/i18n/es.po @@ -0,0 +1,105 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * better_zip +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-05-08 12:04+0000\n" +"PO-Revision-Date: 2013-05-08 12:04+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: better_zip +#: field:res.better.zip,city:0 +msgid "City" +msgstr "City" + +#. module: better_zip +#: view:res.company:0 +#: view:res.partner:0 +msgid "ZIP completion" +msgstr "ZIP completion" + +#. module: better_zip +#: model:ir.actions.act_window,name:better_zip.action_zip_tree +#: model:ir.ui.menu,name:better_zip.zip_base +msgid "ZIP Management" +msgstr "ZIP Management" + +#. module: better_zip +#: view:res.better.zip:0 +#: field:res.better.zip,name:0 +msgid "ZIP" +msgstr "ZIP" + +#. module: better_zip +#: field:res.better.zip,country_id:0 +msgid "Country" +msgstr "Country" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_company +msgid "Companies" +msgstr "Companies" + +#. module: better_zip +#: field:res.better.zip,code:0 +msgid "City Code" +msgstr "City Code" + +#. module: better_zip +#: help:res.company,better_zip_id:0 +msgid "Use the city name or the zip code to search the location" +msgstr "Use the city name or the zip code to search the location" + +#. module: better_zip +#: field:res.better.zip,priority:0 +msgid "Priority" +msgstr "Priority" + +#. module: better_zip +#: field:res.better.zip,state_id:0 +msgid "State" +msgstr "State" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_better_zip +msgid " Zip/NPA object" +msgstr " Zip/NPA object" + +#. module: better_zip +#: field:res.company,better_zip_id:0 +msgid "Location" +msgstr "Location" + +#. module: better_zip +#: field:res.partner,zip_id:0 +msgid "ZIP/PN" +msgstr "ZIP/PN" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: better_zip +#: help:res.better.zip,code:0 +msgid "The official code for the city" +msgstr "The official code for the city" + +#. module: better_zip +#: field:res.country.state,better_zip_ids:0 +msgid "Cities" +msgstr "Cities" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_country_state +msgid "Country state" +msgstr "Country state" + diff --git a/better_zip/i18n/fr.po b/better_zip/i18n/fr.po new file mode 100644 index 000000000..df22f0c06 --- /dev/null +++ b/better_zip/i18n/fr.po @@ -0,0 +1,104 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * better_zip +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-05-08 12:03+0000\n" +"PO-Revision-Date: 2013-05-08 12:03+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: better_zip +#: field:res.better.zip,city:0 +msgid "City" +msgstr "Ville" + +#. module: better_zip +#: view:res.company:0 +#: view:res.partner:0 +msgid "ZIP completion" +msgstr "Complétion par ZIP" + +#. module: better_zip +#: model:ir.actions.act_window,name:better_zip.action_zip_tree +#: model:ir.ui.menu,name:better_zip.zip_base +msgid "ZIP Management" +msgstr "Gestion des ZIP/NPA" + +#. module: better_zip +#: view:res.better.zip:0 +#: field:res.better.zip,name:0 +msgid "ZIP" +msgstr "ZIP" + +#. module: better_zip +#: field:res.better.zip,country_id:0 +msgid "Country" +msgstr "Pays" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: better_zip +#: field:res.better.zip,code:0 +msgid "City Code" +msgstr "Code de la ville" + +#. module: better_zip +#: help:res.company,better_zip_id:0 +msgid "Use the city name or the zip code to search the location" +msgstr "Utilisez le nom de la ville ou le zip lors des recherches" + +#. module: better_zip +#: field:res.better.zip,priority:0 +msgid "Priority" +msgstr "Priorité" + +#. module: better_zip +#: field:res.better.zip,state_id:0 +msgid "State" +msgstr "Etat" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_better_zip +msgid " Zip/NPA object" +msgstr " ZIP/NPA" + +#. module: better_zip +#: field:res.company,better_zip_id:0 +msgid "Location" +msgstr "Location" + +#. module: better_zip +#: field:res.partner,zip_id:0 +msgid "ZIP/PN" +msgstr "ZIP/NPA" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_partner +msgid "Partner" +msgstr "Partenaire" + +#. module: better_zip +#: help:res.better.zip,code:0 +msgid "The official code for the city" +msgstr "Code officiel de la ville" + +#. module: better_zip +#: field:res.country.state,better_zip_ids:0 +msgid "Cities" +msgstr "Villes" + +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_country_state +msgid "Country state" +msgstr "Etat" From f311142c5354901cc6029b8f83d102cf1d898778 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2013 15:47:05 +0200 Subject: [PATCH 03/16] [FIX] priority is now deprecated --- better_zip/better_zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/better_zip/better_zip.py b/better_zip/better_zip.py index 5289513fd..6c5ca110c 100644 --- a/better_zip/better_zip.py +++ b/better_zip/better_zip.py @@ -28,7 +28,7 @@ class BetterZip(orm.Model): _description = __doc__ _order = "priority" - _columns = {'priority': fields.integer('Priority'), + _columns = {'priority': fields.integer('Priority', deprecated=True), 'name': fields.char('ZIP', required=True), 'city': fields.char('City', required=True), 'state_id': fields.many2one('res.country.state', 'State'), From db8bbf86630d38e4275b91f44bf5b08c9640bce2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2013 15:57:09 +0200 Subject: [PATCH 04/16] [IMP] labels definitions --- better_zip/better_zip.py | 2 +- better_zip/better_zip_view.xml | 4 ++-- better_zip/company_view.xml | 2 +- better_zip/partner_view.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/better_zip/better_zip.py b/better_zip/better_zip.py index 6c5ca110c..8f88cb379 100644 --- a/better_zip/better_zip.py +++ b/better_zip/better_zip.py @@ -22,7 +22,7 @@ from openerp.osv import orm, fields class BetterZip(orm.Model): - " Zip/NPA completion object" + " City/locations completion object" _name = "res.better.zip" _description = __doc__ diff --git a/better_zip/better_zip_view.xml b/better_zip/better_zip_view.xml index fdd4d0dac..41fec0f67 100644 --- a/better_zip/better_zip_view.xml +++ b/better_zip/better_zip_view.xml @@ -34,7 +34,7 @@
- ZIP Management + Cites/locations Management res.better.zip form tree,form @@ -42,7 +42,7 @@ + placeholder="City completion" /> diff --git a/better_zip/partner_view.xml b/better_zip/partner_view.xml index a442169e5..cc6b29301 100644 --- a/better_zip/partner_view.xml +++ b/better_zip/partner_view.xml @@ -9,7 +9,7 @@ + placeholder="City completion"/> From 691b75eaa095f1e7a8cdb5dc83680f09b9ccd6c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2013 15:57:43 +0200 Subject: [PATCH 05/16] [FIX] configuration parent menu --- better_zip/better_zip_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/better_zip/better_zip_view.xml b/better_zip/better_zip_view.xml index 41fec0f67..d852ba82d 100644 --- a/better_zip/better_zip_view.xml +++ b/better_zip/better_zip_view.xml @@ -44,7 +44,7 @@
From e8c50f91da02547d039d3fd05a7f5acda0165ae5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2013 15:59:03 +0200 Subject: [PATCH 06/16] [FIX] better.zip name get separator --- better_zip/better_zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/better_zip/better_zip.py b/better_zip/better_zip.py index 8f88cb379..fa24861c8 100644 --- a/better_zip/better_zip.py +++ b/better_zip/better_zip.py @@ -47,7 +47,7 @@ class BetterZip(orm.Model): name.append(bzip.state_id.name) if bzip.country_id: name.append(bzip.country_id.name) - res.append((bzip.id, " ".join(name))) + res.append((bzip.id, ", ".join(name))) return res def onchange_state_id(self, cr, uid, ids, state_id=False, context={}): From 62b794d620466ec6665c2fb9cb2d00daca0790ac Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2013 16:01:22 +0200 Subject: [PATCH 07/16] [FIX] contributors --- better_zip/__init__.py | 5 +++-- better_zip/__openerp__.py | 3 ++- better_zip/better_zip.py | 3 ++- better_zip/company.py | 3 ++- better_zip/partner.py | 3 ++- better_zip/state.py | 3 ++- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/better_zip/__init__.py b/better_zip/__init__.py index 3433372dc..ba9aeedea 100644 --- a/better_zip/__init__.py +++ b/better_zip/__init__.py @@ -2,7 +2,8 @@ ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA -# Contributor: Pedro Manuel Baeza +# Contributor: Pedro Manuel Baeza +# Ignacio Ibeas # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,4 +22,4 @@ from . import better_zip from . import partner from . import state -from . import company \ No newline at end of file +from . import company diff --git a/better_zip/__openerp__.py b/better_zip/__openerp__.py index 2383a61f5..451a8e8ef 100644 --- a/better_zip/__openerp__.py +++ b/better_zip/__openerp__.py @@ -2,7 +2,8 @@ ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA -# Contributor: Pedro Manuel Baeza +# Contributor: Pedro Manuel Baeza +# Ignacio Ibeas # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/better_zip/better_zip.py b/better_zip/better_zip.py index fa24861c8..56de4616e 100644 --- a/better_zip/better_zip.py +++ b/better_zip/better_zip.py @@ -2,7 +2,8 @@ ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA -# Contributor: Pedro Manuel Baeza +# Contributor: Pedro Manuel Baeza +# Ignacio Ibeas # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/better_zip/company.py b/better_zip/company.py index 274fac615..03ab50bb5 100644 --- a/better_zip/company.py +++ b/better_zip/company.py @@ -2,7 +2,8 @@ ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA -# Contributor: Pedro Manuel Baeza +# Contributor: Pedro Manuel Baeza +# Ignacio Ibeas # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/better_zip/partner.py b/better_zip/partner.py index 458e5fd34..b5afa2799 100644 --- a/better_zip/partner.py +++ b/better_zip/partner.py @@ -2,7 +2,8 @@ ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA -# Contributor: Pedro Manuel Baeza +# Contributor: Pedro Manuel Baeza +# Ignacio Ibeas # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/better_zip/state.py b/better_zip/state.py index 072111e2d..4312384af 100644 --- a/better_zip/state.py +++ b/better_zip/state.py @@ -2,7 +2,8 @@ ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA -# Contributor: Pedro Manuel Baeza +# Contributor: Pedro Manuel Baeza +# Ignacio Ibeas # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as From 38280585e0069f36b5af011a81c4f68ffcd9f38e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2013 16:04:45 +0200 Subject: [PATCH 08/16] [FIX] label --- better_zip/partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/better_zip/partner.py b/better_zip/partner.py index b5afa2799..b6db7bc8b 100644 --- a/better_zip/partner.py +++ b/better_zip/partner.py @@ -24,7 +24,7 @@ from openerp.osv import orm, fields class ResPartner(orm.Model): _inherit = "res.partner" - _columns = {'zip_id': fields.many2one('res.better.zip', 'ZIP/PN')} + _columns = {'zip_id': fields.many2one('res.better.zip', 'City/Location')} def onchange_zip_id(self, cursor, uid, ids, zip_id, context=None): if not zip_id: From 3bcd03f1423d2e12dd1df0d296554bc927dcbeee Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2013 16:21:40 +0200 Subject: [PATCH 09/16] [FIX] translations files --- better_zip/i18n/en.po | 62 +++++++++++++++++++++--------------------- better_zip/i18n/es.po | 63 ++++++++++++++++++++++--------------------- better_zip/i18n/fr.po | 63 ++++++++++++++++++++++--------------------- 3 files changed, 98 insertions(+), 90 deletions(-) diff --git a/better_zip/i18n/en.po b/better_zip/i18n/en.po index a4cca5336..6d35374c8 100644 --- a/better_zip/i18n/en.po +++ b/better_zip/i18n/en.po @@ -1,40 +1,33 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * better_zip +# * better_zip # msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-08 12:03+0000\n" +"POT-Creation-Date: 2013-06-07 14:17+0000\n" "PO-Revision-Date: 2013-05-08 12:03+0000\n" "Last-Translator: <>\n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: better_zip +#: model:ir.actions.act_window,name:better_zip.action_zip_tree +msgid "Cites/locations Management" +msgstr "Cites/locations Management" + #. module: better_zip #: field:res.better.zip,city:0 msgid "City" msgstr "City" #. module: better_zip -#: view:res.company:0 -#: view:res.partner:0 -msgid "ZIP completion" -msgstr "ZIP completion" - -#. module: better_zip -#: model:ir.actions.act_window,name:better_zip.action_zip_tree -#: model:ir.ui.menu,name:better_zip.zip_base -msgid "ZIP Management" -msgstr "ZIP Management" - -#. module: better_zip -#: view:res.better.zip:0 -#: field:res.better.zip,name:0 +#: view:res.better.zip:0 field:res.better.zip,name:0 msgid "ZIP" msgstr "ZIP" @@ -43,6 +36,11 @@ msgstr "ZIP" msgid "Country" msgstr "Country" +#. module: better_zip +#: field:res.better.zip,priority:0 +msgid "Priority" +msgstr "Priority" + #. module: better_zip #: model:ir.model,name:better_zip.model_res_company msgid "Companies" @@ -53,35 +51,35 @@ msgstr "Companies" msgid "City Code" msgstr "City Code" +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_better_zip +msgid " City/locations completion object" +msgstr " City/locations completion object" + #. module: better_zip #: help:res.company,better_zip_id:0 msgid "Use the city name or the zip code to search the location" msgstr "Use the city name or the zip code to search the location" #. module: better_zip -#: field:res.better.zip,priority:0 -msgid "Priority" -msgstr "Priority" +#: field:res.partner,zip_id:0 +msgid "City/Location" +msgstr "City/Location" #. module: better_zip #: field:res.better.zip,state_id:0 msgid "State" msgstr "State" -#. module: better_zip -#: model:ir.model,name:better_zip.model_res_better_zip -msgid " Zip/NPA object" -msgstr " Zip/NPA object" - #. module: better_zip #: field:res.company,better_zip_id:0 msgid "Location" msgstr "Location" #. module: better_zip -#: field:res.partner,zip_id:0 -msgid "ZIP/PN" -msgstr "ZIP/PN" +#: model:ir.ui.menu,name:better_zip.zip_base +msgid "Cities/Locations Management" +msgstr "Cities/Locations Management" #. module: better_zip #: model:ir.model,name:better_zip.model_res_partner @@ -89,9 +87,9 @@ msgid "Partner" msgstr "Partner" #. module: better_zip -#: help:res.better.zip,code:0 -msgid "The official code for the city" -msgstr "The official code for the city" +#: view:res.company:0 view:res.partner:0 +msgid "City completion" +msgstr "City completion" #. module: better_zip #: field:res.country.state,better_zip_ids:0 @@ -103,3 +101,7 @@ msgstr "Cities" msgid "Country state" msgstr "Country state" +#. module: better_zip +#: help:res.better.zip,code:0 +msgid "The official code for the city" +msgstr "The official code for the city" diff --git a/better_zip/i18n/es.po b/better_zip/i18n/es.po index 3e17553f8..22c7becb2 100644 --- a/better_zip/i18n/es.po +++ b/better_zip/i18n/es.po @@ -1,40 +1,33 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * better_zip +# * better_zip # msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-08 12:04+0000\n" +"POT-Creation-Date: 2013-06-07 14:17+0000\n" "PO-Revision-Date: 2013-05-08 12:04+0000\n" "Last-Translator: <>\n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: better_zip +#: model:ir.actions.act_window,name:better_zip.action_zip_tree +msgid "Cites/locations Management" +msgstr "Cites/locations Management" + #. module: better_zip #: field:res.better.zip,city:0 msgid "City" msgstr "City" #. module: better_zip -#: view:res.company:0 -#: view:res.partner:0 -msgid "ZIP completion" -msgstr "ZIP completion" - -#. module: better_zip -#: model:ir.actions.act_window,name:better_zip.action_zip_tree -#: model:ir.ui.menu,name:better_zip.zip_base -msgid "ZIP Management" -msgstr "ZIP Management" - -#. module: better_zip -#: view:res.better.zip:0 -#: field:res.better.zip,name:0 +#: view:res.better.zip:0 field:res.better.zip,name:0 msgid "ZIP" msgstr "ZIP" @@ -43,6 +36,11 @@ msgstr "ZIP" msgid "Country" msgstr "Country" +#. module: better_zip +#: field:res.better.zip,priority:0 +msgid "Priority" +msgstr "Priority" + #. module: better_zip #: model:ir.model,name:better_zip.model_res_company msgid "Companies" @@ -53,35 +51,35 @@ msgstr "Companies" msgid "City Code" msgstr "City Code" +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_better_zip +msgid " City/locations completion object" +msgstr " City/locations completion object" + #. module: better_zip #: help:res.company,better_zip_id:0 msgid "Use the city name or the zip code to search the location" msgstr "Use the city name or the zip code to search the location" #. module: better_zip -#: field:res.better.zip,priority:0 -msgid "Priority" -msgstr "Priority" +#: field:res.partner,zip_id:0 +msgid "City/Location" +msgstr "City/Location" #. module: better_zip #: field:res.better.zip,state_id:0 msgid "State" msgstr "State" -#. module: better_zip -#: model:ir.model,name:better_zip.model_res_better_zip -msgid " Zip/NPA object" -msgstr " Zip/NPA object" - #. module: better_zip #: field:res.company,better_zip_id:0 msgid "Location" msgstr "Location" #. module: better_zip -#: field:res.partner,zip_id:0 -msgid "ZIP/PN" -msgstr "ZIP/PN" +#: model:ir.ui.menu,name:better_zip.zip_base +msgid "Cities/Locations Management" +msgstr "Cities/Locations Management" #. module: better_zip #: model:ir.model,name:better_zip.model_res_partner @@ -89,9 +87,10 @@ msgid "Partner" msgstr "Partner" #. module: better_zip -#: help:res.better.zip,code:0 -msgid "The official code for the city" -msgstr "The official code for the city" +#: view:res.company:0 view:res.partner:0 +#, fuzzy +msgid "City completion" +msgstr "City completion" #. module: better_zip #: field:res.country.state,better_zip_ids:0 @@ -103,3 +102,7 @@ msgstr "Cities" msgid "Country state" msgstr "Country state" +#. module: better_zip +#: help:res.better.zip,code:0 +msgid "The official code for the city" +msgstr "The official code for the city" diff --git a/better_zip/i18n/fr.po b/better_zip/i18n/fr.po index df22f0c06..c7d5fc968 100644 --- a/better_zip/i18n/fr.po +++ b/better_zip/i18n/fr.po @@ -1,40 +1,33 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * better_zip +# * better_zip # msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-08 12:03+0000\n" +"POT-Creation-Date: 2013-06-07 14:17+0000\n" "PO-Revision-Date: 2013-05-08 12:03+0000\n" "Last-Translator: <>\n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: better_zip +#: model:ir.actions.act_window,name:better_zip.action_zip_tree +msgid "Cites/locations Management" +msgstr "Cites/locations Management" + #. module: better_zip #: field:res.better.zip,city:0 msgid "City" msgstr "Ville" #. module: better_zip -#: view:res.company:0 -#: view:res.partner:0 -msgid "ZIP completion" -msgstr "Complétion par ZIP" - -#. module: better_zip -#: model:ir.actions.act_window,name:better_zip.action_zip_tree -#: model:ir.ui.menu,name:better_zip.zip_base -msgid "ZIP Management" -msgstr "Gestion des ZIP/NPA" - -#. module: better_zip -#: view:res.better.zip:0 -#: field:res.better.zip,name:0 +#: view:res.better.zip:0 field:res.better.zip,name:0 msgid "ZIP" msgstr "ZIP" @@ -43,6 +36,11 @@ msgstr "ZIP" msgid "Country" msgstr "Pays" +#. module: better_zip +#: field:res.better.zip,priority:0 +msgid "Priority" +msgstr "Priorité" + #. module: better_zip #: model:ir.model,name:better_zip.model_res_company msgid "Companies" @@ -53,35 +51,35 @@ msgstr "Sociétés" msgid "City Code" msgstr "Code de la ville" +#. module: better_zip +#: model:ir.model,name:better_zip.model_res_better_zip +msgid " City/locations completion object" +msgstr " City/locations completion object" + #. module: better_zip #: help:res.company,better_zip_id:0 msgid "Use the city name or the zip code to search the location" msgstr "Utilisez le nom de la ville ou le zip lors des recherches" #. module: better_zip -#: field:res.better.zip,priority:0 -msgid "Priority" -msgstr "Priorité" +#: field:res.partner,zip_id:0 +msgid "City/Location" +msgstr "Ville/location" #. module: better_zip #: field:res.better.zip,state_id:0 msgid "State" msgstr "Etat" -#. module: better_zip -#: model:ir.model,name:better_zip.model_res_better_zip -msgid " Zip/NPA object" -msgstr " ZIP/NPA" - #. module: better_zip #: field:res.company,better_zip_id:0 msgid "Location" msgstr "Location" #. module: better_zip -#: field:res.partner,zip_id:0 -msgid "ZIP/PN" -msgstr "ZIP/NPA" +#: model:ir.ui.menu,name:better_zip.zip_base +msgid "Cities/Locations Management" +msgstr "Cities/Locations Management" #. module: better_zip #: model:ir.model,name:better_zip.model_res_partner @@ -89,9 +87,9 @@ msgid "Partner" msgstr "Partenaire" #. module: better_zip -#: help:res.better.zip,code:0 -msgid "The official code for the city" -msgstr "Code officiel de la ville" +#: view:res.company:0 view:res.partner:0 +msgid "City completion" +msgstr "Complétion par ville" #. module: better_zip #: field:res.country.state,better_zip_ids:0 @@ -102,3 +100,8 @@ msgstr "Villes" #: model:ir.model,name:better_zip.model_res_country_state msgid "Country state" msgstr "Etat" + +#. module: better_zip +#: help:res.better.zip,code:0 +msgid "The official code for the city" +msgstr "Code officiel de la ville" From cd7b7ed954ea632f8cf16671d8ce45243684e8e4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 24 Jun 2013 09:56:39 +0200 Subject: [PATCH 10/16] [FIX] change config. menu path --- better_zip/better_zip_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/better_zip/better_zip_view.xml b/better_zip/better_zip_view.xml index d852ba82d..0fc8d11de 100644 --- a/better_zip/better_zip_view.xml +++ b/better_zip/better_zip_view.xml @@ -44,7 +44,7 @@ From 02839b30d4ea74845882270f1cdcff3edc8bb5f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Jun 2013 10:29:42 +0200 Subject: [PATCH 11/16] [MV] rename better_zip to base_location --- {better_zip => base_location}/__init__.py | 0 {better_zip => base_location}/__openerp__.py | 2 +- {better_zip => base_location}/better_zip.py | 0 {better_zip => base_location}/better_zip_view.xml | 0 {better_zip => base_location}/company.py | 0 {better_zip => base_location}/company_view.xml | 0 {better_zip => base_location}/i18n/en.po | 0 {better_zip => base_location}/i18n/es.po | 0 {better_zip => base_location}/i18n/fr.po | 0 {better_zip => base_location}/partner.py | 0 {better_zip => base_location}/partner_view.xml | 0 {better_zip => base_location}/security/ir.model.access.csv | 0 {better_zip => base_location}/state.py | 0 {better_zip => base_location}/state_view.xml | 0 14 files changed, 1 insertion(+), 1 deletion(-) rename {better_zip => base_location}/__init__.py (100%) rename {better_zip => base_location}/__openerp__.py (96%) rename {better_zip => base_location}/better_zip.py (100%) rename {better_zip => base_location}/better_zip_view.xml (100%) rename {better_zip => base_location}/company.py (100%) rename {better_zip => base_location}/company_view.xml (100%) rename {better_zip => base_location}/i18n/en.po (100%) rename {better_zip => base_location}/i18n/es.po (100%) rename {better_zip => base_location}/i18n/fr.po (100%) rename {better_zip => base_location}/partner.py (100%) rename {better_zip => base_location}/partner_view.xml (100%) rename {better_zip => base_location}/security/ir.model.access.csv (100%) rename {better_zip => base_location}/state.py (100%) rename {better_zip => base_location}/state_view.xml (100%) diff --git a/better_zip/__init__.py b/base_location/__init__.py similarity index 100% rename from better_zip/__init__.py rename to base_location/__init__.py diff --git a/better_zip/__openerp__.py b/base_location/__openerp__.py similarity index 96% rename from better_zip/__openerp__.py rename to base_location/__openerp__.py index 451a8e8ef..682a4d90b 100644 --- a/better_zip/__openerp__.py +++ b/base_location/__openerp__.py @@ -19,7 +19,7 @@ # along with this program. If not, see . # ############################################################################## -{'name': 'Better zip management', +{'name': 'Location management (aka Better ZIP)', 'version': '0.3', 'depends': ['base'], 'author': 'Camptocamp', diff --git a/better_zip/better_zip.py b/base_location/better_zip.py similarity index 100% rename from better_zip/better_zip.py rename to base_location/better_zip.py diff --git a/better_zip/better_zip_view.xml b/base_location/better_zip_view.xml similarity index 100% rename from better_zip/better_zip_view.xml rename to base_location/better_zip_view.xml diff --git a/better_zip/company.py b/base_location/company.py similarity index 100% rename from better_zip/company.py rename to base_location/company.py diff --git a/better_zip/company_view.xml b/base_location/company_view.xml similarity index 100% rename from better_zip/company_view.xml rename to base_location/company_view.xml diff --git a/better_zip/i18n/en.po b/base_location/i18n/en.po similarity index 100% rename from better_zip/i18n/en.po rename to base_location/i18n/en.po diff --git a/better_zip/i18n/es.po b/base_location/i18n/es.po similarity index 100% rename from better_zip/i18n/es.po rename to base_location/i18n/es.po diff --git a/better_zip/i18n/fr.po b/base_location/i18n/fr.po similarity index 100% rename from better_zip/i18n/fr.po rename to base_location/i18n/fr.po diff --git a/better_zip/partner.py b/base_location/partner.py similarity index 100% rename from better_zip/partner.py rename to base_location/partner.py diff --git a/better_zip/partner_view.xml b/base_location/partner_view.xml similarity index 100% rename from better_zip/partner_view.xml rename to base_location/partner_view.xml diff --git a/better_zip/security/ir.model.access.csv b/base_location/security/ir.model.access.csv similarity index 100% rename from better_zip/security/ir.model.access.csv rename to base_location/security/ir.model.access.csv diff --git a/better_zip/state.py b/base_location/state.py similarity index 100% rename from better_zip/state.py rename to base_location/state.py diff --git a/better_zip/state_view.xml b/base_location/state_view.xml similarity index 100% rename from better_zip/state_view.xml rename to base_location/state_view.xml From 41c2708d27651b99e4a0ae21b405b20e8f4d7117 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Jun 2013 10:34:26 +0200 Subject: [PATCH 12/16] [ADD] better_zip simlink for compatibility --- better_zip | 1 + 1 file changed, 1 insertion(+) create mode 120000 better_zip diff --git a/better_zip b/better_zip new file mode 120000 index 000000000..1a26d595b --- /dev/null +++ b/better_zip @@ -0,0 +1 @@ +base_location \ No newline at end of file From 66da1bea20da0d3950903834604117646563a601 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 25 Jun 2013 10:57:02 +0200 Subject: [PATCH 13/16] base_location: [IMP] Spanish translation and translation template. --- base_location/i18n/base_location.pot | 109 +++++++++++++++++++++++++++ base_location/i18n/es.po | 103 ++++++++++++------------- 2 files changed, 161 insertions(+), 51 deletions(-) create mode 100644 base_location/i18n/base_location.pot diff --git a/base_location/i18n/base_location.pot b/base_location/i18n/base_location.pot new file mode 100644 index 000000000..d93cec6fe --- /dev/null +++ b/base_location/i18n/base_location.pot @@ -0,0 +1,109 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * base_location +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-06-25 08:56+0000\n" +"PO-Revision-Date: 2013-06-25 08:56+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_location +#: model:ir.actions.act_window,name:base_location.action_zip_tree +msgid "Cites/locations Management" +msgstr "" + +#. module: base_location +#: field:res.better.zip,city:0 +msgid "City" +msgstr "" + +#. module: base_location +#: view:res.better.zip:0 +#: field:res.better.zip,name:0 +msgid "ZIP" +msgstr "" + +#. module: base_location +#: field:res.better.zip,country_id:0 +msgid "Country" +msgstr "" + +#. module: base_location +#: field:res.better.zip,priority:0 +msgid "Priority" +msgstr "" + +#. module: base_location +#: model:ir.model,name:base_location.model_res_company +msgid "Companies" +msgstr "" + +#. module: base_location +#: field:res.better.zip,code:0 +msgid "City Code" +msgstr "" + +#. module: base_location +#: model:ir.model,name:base_location.model_res_better_zip +msgid " City/locations completion object" +msgstr "" + +#. module: base_location +#: help:res.company,better_zip_id:0 +msgid "Use the city name or the zip code to search the location" +msgstr "" + +#. module: base_location +#: field:res.partner,zip_id:0 +msgid "City/Location" +msgstr "" + +#. module: base_location +#: field:res.better.zip,state_id:0 +msgid "State" +msgstr "" + +#. module: base_location +#: field:res.company,better_zip_id:0 +msgid "Location" +msgstr "" + +#. module: base_location +#: model:ir.ui.menu,name:base_location.zip_base +msgid "Cities/Locations Management" +msgstr "" + +#. module: base_location +#: model:ir.model,name:base_location.model_res_partner +msgid "Partner" +msgstr "" + +#. module: base_location +#: view:res.company:0 +#: view:res.partner:0 +msgid "City completion" +msgstr "" + +#. module: base_location +#: field:res.country.state,better_zip_ids:0 +msgid "Cities" +msgstr "" + +#. module: base_location +#: model:ir.model,name:base_location.model_res_country_state +msgid "Country state" +msgstr "" + +#. module: base_location +#: help:res.better.zip,code:0 +msgid "The official code for the city" +msgstr "" + diff --git a/base_location/i18n/es.po b/base_location/i18n/es.po index 22c7becb2..fca36c59d 100644 --- a/base_location/i18n/es.po +++ b/base_location/i18n/es.po @@ -1,108 +1,109 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * better_zip +# * base_location # msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-06-07 14:17+0000\n" -"PO-Revision-Date: 2013-05-08 12:04+0000\n" -"Last-Translator: <>\n" +"POT-Creation-Date: 2013-06-25 08:47+0000\n" +"PO-Revision-Date: 2013-06-25 10:47+0100\n" +"Last-Translator: Pedro Manuel Baeza \n" "Language-Team: \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" -#. module: better_zip -#: model:ir.actions.act_window,name:better_zip.action_zip_tree +#. module: base_location +#: model:ir.actions.act_window,name:base_location.action_zip_tree msgid "Cites/locations Management" -msgstr "Cites/locations Management" +msgstr "Gestión de ciudades/ubicaciones" -#. module: better_zip +#. module: base_location #: field:res.better.zip,city:0 msgid "City" -msgstr "City" +msgstr "Ciudad" -#. module: better_zip -#: view:res.better.zip:0 field:res.better.zip,name:0 +#. module: base_location +#: view:res.better.zip:0 +#: field:res.better.zip,name:0 msgid "ZIP" -msgstr "ZIP" +msgstr "C.P." -#. module: better_zip +#. module: base_location #: field:res.better.zip,country_id:0 msgid "Country" -msgstr "Country" +msgstr "País" -#. module: better_zip +#. module: base_location #: field:res.better.zip,priority:0 msgid "Priority" -msgstr "Priority" +msgstr "Prioridad" -#. module: better_zip -#: model:ir.model,name:better_zip.model_res_company +#. module: base_location +#: model:ir.model,name:base_location.model_res_company msgid "Companies" -msgstr "Companies" +msgstr "Compañías" -#. module: better_zip +#. module: base_location #: field:res.better.zip,code:0 msgid "City Code" -msgstr "City Code" +msgstr "Código de ciudad" -#. module: better_zip -#: model:ir.model,name:better_zip.model_res_better_zip +#. module: base_location +#: model:ir.model,name:base_location.model_res_better_zip msgid " City/locations completion object" -msgstr " City/locations completion object" +msgstr " Objeto de completado de ciudad/ubicación" -#. module: better_zip +#. module: base_location #: help:res.company,better_zip_id:0 msgid "Use the city name or the zip code to search the location" -msgstr "Use the city name or the zip code to search the location" +msgstr "Utilice el nombre de ciudad o el código postal para buscar la ubicación" -#. module: better_zip +#. module: base_location #: field:res.partner,zip_id:0 msgid "City/Location" -msgstr "City/Location" +msgstr "Ciudad/Ubicación" -#. module: better_zip +#. module: base_location #: field:res.better.zip,state_id:0 msgid "State" -msgstr "State" +msgstr "Provincia" -#. module: better_zip +#. module: base_location #: field:res.company,better_zip_id:0 msgid "Location" -msgstr "Location" +msgstr "Ubicación" -#. module: better_zip -#: model:ir.ui.menu,name:better_zip.zip_base +#. module: base_location +#: model:ir.ui.menu,name:base_location.zip_base msgid "Cities/Locations Management" -msgstr "Cities/Locations Management" +msgstr "Ciudad/Ubicaciones" -#. module: better_zip -#: model:ir.model,name:better_zip.model_res_partner +#. module: base_location +#: model:ir.model,name:base_location.model_res_partner msgid "Partner" -msgstr "Partner" +msgstr "Empresa" -#. module: better_zip -#: view:res.company:0 view:res.partner:0 -#, fuzzy +#. module: base_location +#: view:res.company:0 +#: view:res.partner:0 msgid "City completion" -msgstr "City completion" +msgstr "Autocompletado a partir de la ciudad" -#. module: better_zip +#. module: base_location #: field:res.country.state,better_zip_ids:0 msgid "Cities" -msgstr "Cities" +msgstr "Ciudades" -#. module: better_zip -#: model:ir.model,name:better_zip.model_res_country_state +#. module: base_location +#: model:ir.model,name:base_location.model_res_country_state msgid "Country state" -msgstr "Country state" +msgstr "Provincia" -#. module: better_zip +#. module: base_location #: help:res.better.zip,code:0 msgid "The official code for the city" -msgstr "The official code for the city" +msgstr "El código oficial para la ciudad" + From 0a5874679ebca07bbf7efd66e20a5fc5ccc93a6c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Jul 2013 10:03:15 +0200 Subject: [PATCH 14/16] [FIX] mutable default in function signature --- base_location/better_zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_location/better_zip.py b/base_location/better_zip.py index 56de4616e..8d6d01614 100644 --- a/base_location/better_zip.py +++ b/base_location/better_zip.py @@ -51,7 +51,7 @@ class BetterZip(orm.Model): res.append((bzip.id, ", ".join(name))) return res - def onchange_state_id(self, cr, uid, ids, state_id=False, context={}): + def onchange_state_id(self, cr, uid, ids, state_id=False, context=None): result = {} if state_id: state = self.pool['res.country.state'].browse(cr, uid, state_id, context=context) From 89483526c89d9e730ca20a0a081e5a4fb9a8f97e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Jul 2013 10:06:54 +0200 Subject: [PATCH 15/16] [FIX] pass context to default get --- base_location/company.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base_location/company.py b/base_location/company.py index 03ab50bb5..c01c1589b 100644 --- a/base_location/company.py +++ b/base_location/company.py @@ -26,10 +26,12 @@ class ResCompany(orm.Model): _inherit = 'res.company' - def on_change_city(self, cursor, uid, ids, zip_id): + def on_change_city(self, cursor, uid, ids, zip_id, context=None): result = {} + if context is None: + context = {} if zip_id: - bzip = self.pool['res.better.zip'].browse(cursor, uid, zip_id) + bzip = self.pool['res.better.zip'].browse(cursor, uid, zip_id, context=context) result = {'value': {'zip': bzip.name, 'country_id': bzip.country_id.id if bzip.country_id else False, 'city': bzip.city, From 9d1a8031692400fd2e401f70776b146729ec7e6b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Jul 2013 10:08:27 +0200 Subject: [PATCH 16/16] [FIX] variable name cursor -> cr --- base_location/company.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_location/company.py b/base_location/company.py index c01c1589b..6f52c7bd0 100644 --- a/base_location/company.py +++ b/base_location/company.py @@ -26,12 +26,12 @@ class ResCompany(orm.Model): _inherit = 'res.company' - def on_change_city(self, cursor, uid, ids, zip_id, context=None): + def on_change_city(self, cr, uid, ids, zip_id, context=None): result = {} if context is None: context = {} if zip_id: - bzip = self.pool['res.better.zip'].browse(cursor, uid, zip_id, context=context) + bzip = self.pool['res.better.zip'].browse(cr, uid, zip_id, context=context) result = {'value': {'zip': bzip.name, 'country_id': bzip.country_id.id if bzip.country_id else False, 'city': bzip.city,