Skip to content
Health
90/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 2 months ago
  • Required by15/25
    1 module depends on it
  • Maturity25/25
    In 13 Odoo series since 7.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
1
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.43 MB
Module directory on disk
Code analysis 0 migration notes 4 models 4 views 0 HTTP endpoints

Description

This module was written to extend the functionality of contacts to support having separate last name and first name.

Dependencies

Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
crm_lead_firstname

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 4

XML IDNameModelTypeStatus
res_config_settings_view_form Add partner_names_order config parameter res.config.settings form Inherits base_setup.res_config_settings_view_form
view_partner_form res.partner form Inherits base.view_partner_form
view_partner_simple_form res.partner form Inherits base.view_partner_simple_form
view_users_form Add firstname and surnames res.users form Inherits base.view_users_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 4

New fields (3)
  • firstname_required Boolean
    compute='_compute_firstname_lastname_required'
  • form_has_lastname_first Boolean
    compute='_compute_form_has_lastname_first'
  • lastname_required Boolean
    compute='_compute_firstname_lastname_required'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
    Invert name when getting default values.
  • name_fields_in_vals(self, vals)
    @api.model
    Method to check if any name fields are in `vals`.

New fields (3)
  • partner_names_order Selection
    config_parameter='partner_names_order' default=<expr> help='Order to compose partner fullname' inverse='_inverse_partner_names_order' required=True selection='_partner_names_order_selection'
  • partner_names_order_changed Boolean
    config_parameter='partner_names_order_changed'
  • partner_names_required_fields Selection
    config_parameter='partner_firstname.required_fields' help='Define which fields are required or not' required=True selection='_partner_names_required_fields_selection'
Public methods (1)
  • action_recalculate_partners_name(self)

New fields (3)
  • firstname Char
    index=True args: 'First name'
  • lastname Char
    index=True args: 'Last name'
  • name Char
    compute='_compute_name' inverse='_inverse_name_after_cleaning_whitespace' precompute=True readonly=False store=True
Public methods (3)
  • copy(self, default=None)
    Ensure partners are copied right. Odoo adds ``(copy)`` to the end of :attr:`~.name`, but that would get ignored in :meth:`~.create` because it also copies explicitly firstname and lastname fields.
  • create(self, vals_list)
    @api.model_create_multi
    Add inverted names at creation if unavailable. Also, remove the full name from `vals` and context if the partner is an individual and is being created with any name fields, as the name must be computed from the provided name parts; otherwise, the name fields will be computed from the `name` again, when calling its inverse method. Note that, to avoid deleting the 'default_name' context for all partners when it's not appropriate, we must call `create` for each partner individually with the correct context.
  • get_extra_default_copy_values(self)
    Method to add '(copy)' suffix to lastname or firstname, depending on name order configuration.

New fields (0)

No new fields.

Public methods (1)
  • copy(self, default=None)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…