Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Where exactly can I modify the default behaviour that formats the address?
Currently when you create a customer and do not add a country it will print out the following structure:
But I want the ZIP code before the city.. So, where should I change the code so that the ZIP is printed in front of the city when no country is filled in?
res_partner.py seems to be responsible for the layout in the menu (https://github.com/odoo/odoo/blob/8.0/openerp/addons/base/res/res_partner.py#L61-77) but where can I modify it for all reports / everywhere at once?
Note: I do not want to configure this per country in the country list. It has to be set automaticly when a customer has no country filled in to ZIP address in place of adress ZIP.
With kind regards
Address format is predefined in Country - go to Sales/Address Book/Localization/Countries
or in res_partner.py, method _display_address(...)
# get the information that will be injected into the display format
# get the address format
address_format = address.country_id.address_format or \
"%(street)s\n%(street2)s\n%(city)s %(state_code)s %(zip)s\n%(country_name)s"
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 2/18/15, 8:38 AM|
|Seen: 2375 times|
|Last updated: 3/16/15, 8:10 AM|