TIP: You can type at any time to perform a new search.
Partner first name and last name
partner_firstname · OCA/partner-contact
- Repository
- OCA/partner-contact · module folder · Try on Runboat
- Module version
- 1.0.1
- Category
- Extra Tools
- Folder size
- 0.39 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/partner-contact
- Last tracking update
- 2026-08-07 09:06:26
- Authors
- Camptocamp, ACSONE SA/NV, Odoo Community Association (OCA), GRAP, Tecnativa, LasLabs, Grupo ESOC Ingeniería de Servicios, DynApps NV
- Maintainers
- Camptocamp, ACSONE SA/NV, Odoo Community Association (OCA), GRAP, Tecnativa, LasLabs, Grupo ESOC Ingeniería de Servicios, DynApps NV
- Committers
- Weblate, OCA-git-bot, oca-ci, Pierre Halleux, AEstLo
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
This module was written to extend the functionality of contacts to support having separate last name and first name.
Code Analysis ⓘ
Views touched (4)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_requiredBooleancompute='_compute_firstname_lastname_required' -
form_has_lastname_firstBooleancompute='_compute_form_has_lastname_first' -
lastname_requiredBooleancompute='_compute_firstname_lastname_required'
-
default_get(self, fields_list)@api.modelInvert name when getting default values. -
name_fields_in_vals(self, vals)@api.modelMethod to check if any name fields are in `vals`.
New fields (3)
-
partner_names_orderSelectionconfig_parameter='partner_names_order'default=<expr>help='Order to compose partner fullname'inverse='_inverse_partner_names_order'required=Trueselection='_partner_names_order_selection' -
partner_names_order_changedBooleanconfig_parameter='partner_names_order_changed' -
partner_names_required_fieldsSelectionconfig_parameter='partner_firstname.required_fields'help='Define which fields are required or not'required=Trueselection='_partner_names_required_fields_selection'
-
action_recalculate_partners_name(self)
New fields (3)
-
firstnameCharindex=True args: 'First name' -
lastnameCharindex=True args: 'Last name' -
nameCharcompute='_compute_name'inverse='_inverse_name_after_cleaning_whitespace'readonly=Falserequired=Falsestore=True
-
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_multiAdd 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…