app icon
Odoo
Cyllo

Partner First name and Last name

This module, Partner First name and Last name extend the functionality of contacts to support having separate last name and first name.

You can Customize how partner names appear by choosing from three display formats from : "First Name Last Name," "Last Name First Name," or "Last Name, First Name."

This module split first name and last name for non company partners. You can configure some common name patterns for the inverse function in Settings > General settings:

  • Lastname Firstname: For example 'Anderson Robert'
  • Lastname, Firstname: For example 'Anderson, Robert'
  • Firstname Lastname: For example 'Robert Anderson'

After applying the changes, you can recalculate all partners name clicking "Recalculate names" button. Note: This process could take so much time depending how many partners there are in database.

You can use _get_inverse_name method to get lastname and firstname from a simple string and also _get_computed_name to get a name form the lastname and firstname. These methods can be overridden as follows to change the format specified above.

                    
                         class ResPartner(models.Model):
                            _inherit = "res.partner"

                            def _get_inverse_name(self, name, is_company=False):
                                base_inverse_name = super()._get_inverse_name(name, is_company)
                                # Customize
                                return base_inverse_name
                    
                

Key Features

  • Split first name and last name for non company partners
  • Users can configure the name pattern
  • Easy to configure
Compatibility-preserving Field Naming

This feature defines a naming convention where the field name becomes a stored function that concatenates the last and first name. This approach avoids breaking compatibility with existing modules that rely on the original field names.

Dynamic Field Construction

This feature utilizes stored functions to construct field names dynamically. The stored function combines the last and first name, providing flexibility and ensuring compatibility with existing systems that might expect specific field names.

Disabled tab content

GNU Affero General Public License v3.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you comply with the terms of the GNU Affero General Public License, version 3.0, available at https://www.gnu.org/licenses/agpl-3.0.html. You may develop software that uses the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those software under the terms of the GNU Affero General Public License, version 3.0. It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software without including the complete text of the GNU Affero General Public License, version 3.0, along with any applicable additional permissions. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Free
0
Technical Name partner_firstname
License AGPL-3
Lines of Code 1214
  • base_setup
  • contacts
You bought this module and need support? Click Here!