From 13ee5596c6dd32b3471ce705b62b54ea59c00431 Mon Sep 17 00:00:00 2001 From: fka-odoo Date: Fri, 31 Mar 2017 17:10:23 +0530 Subject: [PATCH] [IMP] base: Adapt address format for Japan. Purpose ======= ja_JP: the implemented language font in Odoo is not Japanese but Chinese. In Japan address structure is different: First: Postal code Next: City + ward (like a neighbourhoos name) Next: Building (all buildings have names) Name: Customer or Company Specification =========== New address structure for Japan: %(zip)s %(state_name)s %(city)s %(street)s %(street2)s %(country_name)s In Countries form view, add one selection field which set the customer name position in reports base on the customer country settings. --- odoo/addons/base/ir/ir_qweb.xml | 30 ++++++++++++++--------- odoo/addons/base/res/res_country.py | 5 ++++ odoo/addons/base/res/res_country_data.xml | 2 ++ odoo/addons/base/res/res_country_view.xml | 1 + 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/odoo/addons/base/ir/ir_qweb.xml b/odoo/addons/base/ir/ir_qweb.xml index b882a847d30..a749e30705a 100644 --- a/odoo/addons/base/ir/ir_qweb.xml +++ b/odoo/addons/base/ir/ir_qweb.xml @@ -1,20 +1,25 @@ + diff --git a/odoo/addons/base/res/res_country.py b/odoo/addons/base/res/res_country.py index bbf8784aefa..36e539f8e23 100644 --- a/odoo/addons/base/res/res_country.py +++ b/odoo/addons/base/res/res_country.py @@ -59,6 +59,11 @@ class Country(models.Model): country_group_ids = fields.Many2many('res.country.group', 'res_country_res_country_group_rel', 'res_country_id', 'res_country_group_id', string='Country Groups') state_ids = fields.One2many('res.country.state', 'country_id', string='States') + name_position = fields.Selection([ + ('before', 'Before Address'), + ('after', 'After Address'), + ], string="Customer Name Position", default="before", + help="Determines where the customer/company name should be placed, i.e. after or before the address.") _sql_constraints = [ ('name_uniq', 'unique (name)', diff --git a/odoo/addons/base/res/res_country_data.xml b/odoo/addons/base/res/res_country_data.xml index 056b03a47ac..86978437404 100644 --- a/odoo/addons/base/res/res_country_data.xml +++ b/odoo/addons/base/res/res_country_data.xml @@ -804,6 +804,8 @@ jp + + after diff --git a/odoo/addons/base/res/res_country_view.xml b/odoo/addons/base/res/res_country_view.xml index 170bc629631..5b883b993e3 100644 --- a/odoo/addons/base/res/res_country_view.xml +++ b/odoo/addons/base/res/res_country_view.xml @@ -37,6 +37,7 @@
Choose a subview of partners that includes only address fields, to change the way users can input addresses.
Change the way addresses are displayed in reports
+