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_state_id

Inputs Method Outputs
if hasattr(super(), "_compute_state_id"):
            return super()._compute_state_id()
for record in self:
            state = record.zip_id.city_id.state_id
            if state and record.state_id != state:
                record.state_id = record.zip_id.city_id.state_id

Back to entity