Browse Source
[RFR] Porting city addons into better zip:
[RFR] Porting city addons into better zip:
-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 -Spanish translation by Pedro M. Baezapull/2/head
unknown
12 years ago
committed by
Stefan Rijnhart
17 changed files with 689 additions and 68 deletions
-
7base_location/__init__.py
-
37base_location/__openerp__.py
-
72base_location/better_zip.py
-
20base_location/better_zip_view.xml
-
47base_location/company.py
-
19base_location/company_view.xml
-
109base_location/i18n/base_location.pot
-
107base_location/i18n/en.po
-
109base_location/i18n/es.po
-
107base_location/i18n/fr.po
-
41base_location/partner.py
-
17base_location/partner_view.xml
-
3base_location/security/ir.model.access.csv
-
22base_location/state.py
-
26base_location/state_view.xml
-
1better_zip
-
13better_zip/security/security.xml
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Author: Nicolas Bessi. Copyright Camptocamp SA |
||||
|
# Contributor: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# Ignacio Ibeas <ignacio@acysos.com> |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
{'name': 'Location management (aka Better ZIP)', |
||||
|
'version': '0.3', |
||||
|
'depends': ['base'], |
||||
|
'author': 'Camptocamp', |
||||
|
'description': """ |
||||
|
Introduces a better zip/npa management system. |
||||
|
It enables zip/city auto-completion on partners""", |
||||
|
'website': 'http://www.camptocamp.com', |
||||
|
'data': ['better_zip_view.xml', |
||||
|
'state_view.xml', |
||||
|
'company_view.xml', |
||||
|
'partner_view.xml', |
||||
|
'security/ir.model.access.csv'], |
||||
|
'installable': True, |
||||
|
'active': False, |
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Author: Nicolas Bessi. Copyright Camptocamp SA |
||||
|
# Contributor: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# Ignacio Ibeas <ignacio@acysos.com> |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
from openerp.osv import orm, fields |
||||
|
|
||||
|
|
||||
|
class BetterZip(orm.Model): |
||||
|
" City/locations completion object" |
||||
|
|
||||
|
_name = "res.better.zip" |
||||
|
_description = __doc__ |
||||
|
_order = "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'), |
||||
|
'country_id': fields.many2one('res.country', 'Country'), |
||||
|
'code': fields.char('City Code', size=64, |
||||
|
help="The official code for the city"), |
||||
|
} |
||||
|
|
||||
|
_defaults = {'priority': 100} |
||||
|
|
||||
|
def name_get(self, cursor, uid, ids, context=None): |
||||
|
res = [] |
||||
|
for bzip in self.browse(cursor, uid, ids): |
||||
|
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=None): |
||||
|
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 |
||||
|
|
||||
|
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) |
@ -0,0 +1,47 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Author: Nicolas Bessi. Copyright Camptocamp SA |
||||
|
# Contributor: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# Ignacio Ibeas <ignacio@acysos.com> |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
from openerp.osv import orm, fields |
||||
|
|
||||
|
|
||||
|
class ResCompany(orm.Model): |
||||
|
|
||||
|
_inherit = 'res.company' |
||||
|
|
||||
|
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(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, |
||||
|
'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')), |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
<!-- Add cities to the company form --> |
||||
|
<record id="view_company_form_city" model="ir.ui.view"> |
||||
|
<field name="name">res.company.form.city</field> |
||||
|
<field name="model">res.company</field> |
||||
|
<field name="inherit_id" ref="base.view_company_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="street2" position="after"> |
||||
|
<field name="better_zip_id" |
||||
|
colspan="4" |
||||
|
on_change="on_change_city(better_zip_id)" |
||||
|
placeholder="City completion" /> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</openerp> |
@ -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 "" |
||||
|
|
@ -0,0 +1,107 @@ |
|||||
|
# 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-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.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 |
||||
|
#: field:res.better.zip,priority:0 |
||||
|
msgid "Priority" |
||||
|
msgstr "Priority" |
||||
|
|
||||
|
#. 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 |
||||
|
#: 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.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 |
||||
|
#: field:res.company,better_zip_id:0 |
||||
|
msgid "Location" |
||||
|
msgstr "Location" |
||||
|
|
||||
|
#. module: better_zip |
||||
|
#: 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 |
||||
|
msgid "Partner" |
||||
|
msgstr "Partner" |
||||
|
|
||||
|
#. module: better_zip |
||||
|
#: 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 |
||||
|
msgid "Cities" |
||||
|
msgstr "Cities" |
||||
|
|
||||
|
#. module: better_zip |
||||
|
#: model:ir.model,name:better_zip.model_res_country_state |
||||
|
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" |
@ -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:47+0000\n" |
||||
|
"PO-Revision-Date: 2013-06-25 10:47+0100\n" |
||||
|
"Last-Translator: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com>\n" |
||||
|
"Language-Team: \n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: 8bit\n" |
||||
|
"Plural-Forms: \n" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: model:ir.actions.act_window,name:base_location.action_zip_tree |
||||
|
msgid "Cites/locations Management" |
||||
|
msgstr "Gestión de ciudades/ubicaciones" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: field:res.better.zip,city:0 |
||||
|
msgid "City" |
||||
|
msgstr "Ciudad" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: view:res.better.zip:0 |
||||
|
#: field:res.better.zip,name:0 |
||||
|
msgid "ZIP" |
||||
|
msgstr "C.P." |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: field:res.better.zip,country_id:0 |
||||
|
msgid "Country" |
||||
|
msgstr "País" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: field:res.better.zip,priority:0 |
||||
|
msgid "Priority" |
||||
|
msgstr "Prioridad" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: model:ir.model,name:base_location.model_res_company |
||||
|
msgid "Companies" |
||||
|
msgstr "Compañías" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: field:res.better.zip,code:0 |
||||
|
msgid "City Code" |
||||
|
msgstr "Código de ciudad" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: model:ir.model,name:base_location.model_res_better_zip |
||||
|
msgid " City/locations completion object" |
||||
|
msgstr " Objeto de completado de ciudad/ubicación" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: help:res.company,better_zip_id:0 |
||||
|
msgid "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: base_location |
||||
|
#: field:res.partner,zip_id:0 |
||||
|
msgid "City/Location" |
||||
|
msgstr "Ciudad/Ubicación" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: field:res.better.zip,state_id:0 |
||||
|
msgid "State" |
||||
|
msgstr "Provincia" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: field:res.company,better_zip_id:0 |
||||
|
msgid "Location" |
||||
|
msgstr "Ubicación" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: model:ir.ui.menu,name:base_location.zip_base |
||||
|
msgid "Cities/Locations Management" |
||||
|
msgstr "Ciudad/Ubicaciones" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: model:ir.model,name:base_location.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Empresa" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: view:res.company:0 |
||||
|
#: view:res.partner:0 |
||||
|
msgid "City completion" |
||||
|
msgstr "Autocompletado a partir de la ciudad" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: field:res.country.state,better_zip_ids:0 |
||||
|
msgid "Cities" |
||||
|
msgstr "Ciudades" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: model:ir.model,name:base_location.model_res_country_state |
||||
|
msgid "Country state" |
||||
|
msgstr "Provincia" |
||||
|
|
||||
|
#. module: base_location |
||||
|
#: help:res.better.zip,code:0 |
||||
|
msgid "The official code for the city" |
||||
|
msgstr "El código oficial para la ciudad" |
||||
|
|
@ -0,0 +1,107 @@ |
|||||
|
# 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-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.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 |
||||
|
#: field:res.better.zip,priority:0 |
||||
|
msgid "Priority" |
||||
|
msgstr "Priorité" |
||||
|
|
||||
|
#. 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 |
||||
|
#: 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.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 |
||||
|
#: field:res.company,better_zip_id:0 |
||||
|
msgid "Location" |
||||
|
msgstr "Location" |
||||
|
|
||||
|
#. module: better_zip |
||||
|
#: 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 |
||||
|
msgid "Partner" |
||||
|
msgstr "Partenaire" |
||||
|
|
||||
|
#. module: better_zip |
||||
|
#: 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 |
||||
|
msgid "Cities" |
||||
|
msgstr "Villes" |
||||
|
|
||||
|
#. module: better_zip |
||||
|
#: 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" |
@ -0,0 +1,17 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
<record id="view_partner_form" model="ir.ui.view"> |
||||
|
<field name="name">res.partner.zip_id.2</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_partner_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="city" position="before"> |
||||
|
<field name="zip_id" |
||||
|
on_change="onchange_zip_id(zip_id)" |
||||
|
placeholder="City completion"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</openerp> |
@ -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 |
@ -0,0 +1,26 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
<!-- Add cities to the State form --> |
||||
|
<record model="ir.ui.view" id="view_country_state_form2"> |
||||
|
<field name="name">view_country_state_form2</field> |
||||
|
<field name="model">res.country.state</field> |
||||
|
<field name="inherit_id" ref="base.view_country_state_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="country_id" position="after"> |
||||
|
<field name="better_zip_ids" |
||||
|
context="{'country_id': country_id}" |
||||
|
colspan="4" |
||||
|
nolabel="1"> |
||||
|
<tree editable="top"> |
||||
|
<field name="name"/> |
||||
|
<field name="code"/> |
||||
|
<field name="city"/> |
||||
|
<field name="country_id"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1 @@ |
|||||
|
base_location |
@ -1,13 +0,0 @@ |
|||||
<openerp> |
|
||||
<data> |
|
||||
<record id="ir_model_access_betterzip0" model="ir.model.access"> |
|
||||
<field name="model_id" ref="better_zip.model_res_better_zip"/> |
|
||||
<field eval="1" name="perm_read"/> |
|
||||
<field eval="'better_zip'" name="name"/> |
|
||||
<field eval="1" name="perm_unlink"/> |
|
||||
<field eval="1" name="perm_write"/> |
|
||||
<field eval="1" name="perm_create"/> |
|
||||
<field name="group_id" ref="base.group_user"/> |
|
||||
</record> |
|
||||
</data> |
|
||||
</openerp> |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue