Availability |
Odoo Online
Odoo.sh
On Premise
|
Technical Name |
l10n_es_ine_code |
License | AGPL-3 |
Website | http://www.moval.es |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Technical Name |
l10n_es_ine_code |
License | AGPL-3 |
Website | http://www.moval.es |
L10n_es INE Codes
National Statistics Institute codes for Spanish cities.
This module contains the codes of the National Statistics Institute (INE) for Spanish cities.
The name of the city is in Spanish, in another language (if applicable) and reordered (if applicable).
These three variants of the city name are simplified (in capital letters and without diacritical characters)
to facilitate comparison.
If the city name is found, the city, province and state codes can be obtained.
Example:
city_name = self.partner_id.city
city_name_simplified = unicodedata.normalize('NFKD', city_name).upper()
codes = self.env['res.ine.code'].search(
['|', '|', '|',
('city_name_simplified', '=', city_name_simplified),
('city_name_aka_simplified', '=', city_name_simplified),
('city_name_reordered_simplified', '=', city_name_simplified)])
if codes:
state_code = codes.ine_code_state
province_code = codes.ine_code_province
city_code = codes.ine_code_city
Please log in to comment on this module