mirror of
https://github.com/NaN-tic/trytond-country_zip.git
synced 2023-12-14 07:42:54 +01:00
Return first zip when search by subbisivion and country with multiples zips
This commit is contained in:
parent
b22c0b27c1
commit
f09be8d1c7
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ class Address:
|
|||
zips = Zip.search([
|
||||
('zip', '=', self.zip),
|
||||
('subdivision.country', '=', self.country.id),
|
||||
])
|
||||
], limit=1)
|
||||
if zips:
|
||||
zip_, = zips
|
||||
self.city = zip_.city
|
||||
|
|
Loading…
Reference in a new issue