diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py index ff710968473..3897065da73 100644 --- a/openerp/addons/base/res/res_country.py +++ b/openerp/addons/base/res/res_country.py @@ -31,8 +31,13 @@ class Country(osv.osv): 'code': fields.char('Country Code', size=2, help='The ISO country code in two chars.\n' 'You can use this field for quick search.', required=True), - 'address_format': fields.text('Address Format', help="You can state here the usual format to use for the \ - addresses belonging to this country."), + 'address_format': fields.text('Address Format', help="""You can state here the usual format to use for the \ +addresses belonging to this country.\n\nYou can use the python-style string patern with all the field of the address \ +(for example, use '%(street)s' to display the field 'street') plus + \n%(state_name)s: the name of the state + \n%(state_code)s: the code of the state + \n%(country_name)s: the name of the country + \n%(country_code)s: the code of the country"""), } _sql_constraints = [ ('name_uniq', 'unique (name)', diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index fb04c10bf5a..32b5e08d7b6 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -356,7 +356,7 @@ class res_partner_address(osv.osv): def get_city(self, cr, uid, id): return self.browse(cr, uid, id).city - def display_address(self, cr, uid, address): + def _display_address(self, cr, uid, address, context=None): ''' The purpose of this function is to build and return an address formatted accordingly to the standards of the country where it belongs. diff --git a/openerp/report/report_sxw.py b/openerp/report/report_sxw.py index 050c53b7456..9b317bb0954 100644 --- a/openerp/report/report_sxw.py +++ b/openerp/report/report_sxw.py @@ -315,7 +315,7 @@ class rml_parse(object): return res def display_address(self, address_browse_record): - return self.pool.get('res.partner.address').display_address(self.cr, self.uid, address_browse_record) + return self.pool.get('res.partner.address')._display_address(self.cr, self.uid, address_browse_record) def repeatIn(self, lst, name,nodes_parent=False): ret_lst = []