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

Module: Discuss

Entity: res.partner

Compute Method: _compute_contact_address_inline

Inputs Method Outputs
  • contact_address
"""Compute an inline-friendly address based on contact_address."""
for partner in self:
            # replace any successive \n with a single comma
            partner.contact_address_inline = re.sub(r'\n(\s|\n)*', ', ', partner.contact_address).strip().strip(',')

Back to entity