summaryrefslogtreecommitdiff
path: root/addons/payment/static
diff options
context:
space:
mode:
authorNasreddin Boulif (bon) <bon@odoo.com>2021-05-11 23:35:36 +0000
committerNasreddin Boulif (bon) <bon@odoo.com>2021-05-16 13:02:24 +0000
commit74116c982a5ddef65a05ef90017ac4ce63bdf58f (patch)
tree185592daf77471ba7e9a8b457b8f22a2f92d9368 /addons/payment/static
parent598dda32f48ffeb64cbd398c6ffb1fe7577468f2 (diff)
[FIX] base_address_extended: split 'correctly' street name
Issue - Install "Contacts" & 'base_address_extended' modules - Go to contacts and create a contact with value: - street name : Chaussee de Namur - House : 40 - Save and edit again - Set country to 'Netherlands' then save. Address not splited well (wrong values for street name and house). The issue is not present in UI but is in tests. (Issue in UI from odoo 14.0+) Cause There is 2 '_split_street_with_params' (inverse function that set street fields): - partner_autocomplete_address_extended (removed in 14.0) - base_address_extended The 'spliting' logic is not the same in both function. In UI, looks like it does not call '_split_street_with_params' from 'base_address_extended' since no super(Partner, self)... However in testing, it does call it from module 'base_address_extended' and therefore trigger the issue. Solution Adapt _split_street_with_params function (in 'base_address_extended' module): If previous field (from 'street_format') to parse in 'street_raw' is 'street_name', then: - set `tmp` to: splitted (max 1 split) street_raw with current field seperator - set `append_previous, sep, tmp[0]` to: splitted tmp[0] (first part of splited street_raw) with `rpartition(' ')` - add 'append_previous' to 'street_name' value - join 'tmp' values and set it to street (should equal to what left from `rpartition(' ')` split + seconf part of first normal split) - continue normal parsing flow opw-2476096 closes odoo/odoo#70783 X-original-commit: d094d2646023965cb3254a31ee8f59aabaf7f2ea Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Diffstat (limited to 'addons/payment/static')
0 files changed, 0 insertions, 0 deletions