Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Location management (aka Better ZIP)

Entity: res.partner

Compute Method: _compute_city_id

Inputs Method Outputs
if hasattr(super(), "_compute_city_id"):
            return super()._compute_city_id()
for record in self:
            if record.zip_id:
                record.city_id = record.zip_id.city_id
            elif not record.country_enforce_cities:
                record.city_id = False

Back to entity