Partner Title Extension

class partner.res_partner_title_extension(pool, cr)[source]

Extends Odoo’s res_partner_title to include method get_title_by_name().

get_title_by_name(*args, **kwargs)[source]

Searches for the title by name. If the title does not exist, a new title is created by default.

Parameters:
  • title (string) – title of partner (‘Mr’, ‘Dr, ‘Miss’, etc.)
  • create (bool [default is True]) – when True, the title will be created if the title doesn’t exist
Returns:

id of title

Return type:

int