Files
odoo_source/addons/base_address_extended/__init__.py
T
Goffin Simon 825dcb242b [FIX] base_address_extended: Wrong street format
Steps to reproduce the bug:

- Create a german contact C with street1 = 'Istanbulstraße 22-26'
- Install base_address_extended
- Go to C and edit it

Bug:

'Istanbulstraße' was  displayed in the number of the street

PS: A post init hook is needed otherwise the default street_format
'%(street_number)s/%(street_number2)s %(street_name)s' was always used.

opw:2320385

closes odoo/odoo#58905

X-original-commit: a97d981b9dd96b0066e09d763eff10a6ca70819c
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-09-30 16:40:59 +00:00

11 lines
304 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
from odoo import api, SUPERUSER_ID
def _update_street_format(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
env['res.partner'].search([])._compute_street_data()