Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Extra Tools
  3. Partner first name and last name v 10.0
  4. Sales Conditions FAQ

Partner first name and last name

by Camptocamp https://github.com/OCA/partner-contact , Grupo ESOC Ingeniería de Servicios https://github.com/OCA/partner-contact , Tecnativa https://github.com/OCA/partner-contact , LasLabs https://github.com/OCA/partner-contact , ACSONE SA/NV https://github.com/OCA/partner-contact , DynApps NV https://github.com/OCA/partner-contact , GRAP https://github.com/OCA/partner-contact , Odoo Community Association (OCA) https://github.com/OCA/partner-contact
Odoo
v 7.0 v 8.0 v 9.0 v 10.0 v 11.0 v 12.0 Third Party 9555
Download for v 10.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Technical Name partner_firstname
LicenseAGPL-3
Websitehttps://odoo-community.org/
Versions 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0
You bought this module and need support? Click here!

Partner first name and last name

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

Configuration

You can configure some common name patterns for the inverse function in Settings > Configuration > 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 to change the format specified above.

Usage

The field name becomes a stored function field concatenating the last name and the first name. This avoids breaking compatibility with other modules.

Users should fulfill manually the separate fields for last name and first name, but in case you edit just the name field in some unexpected module, there is an inverse function that tries to split that automatically. It assumes that you write the name in format configured ("Lastname Firstname", by default), but it could lead to wrong splitting (because it's just blindly trying to guess what you meant), so you better specify it manually.

For the same reason, after installing, previous names for contacts will stay in the name field, and the first time you edit any of them you will be asked to supply the last name and first name (just once per contact).

Try me on Runbot

For further information, please visit:

  • https://www.odoo.com/forum/help-1

Known issues / Roadmap

Patterns for the inverse function are configurable only at system level. Maybe this configuration could depend on partner language, country or company, as discussed at this OCA issue

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Contributors

  • Nicolas Bessi <nicolas.bessi@camptocamp.com>
  • Yannick Vaucher <yannick.vaucher@camptocamp.com>
  • Vincent Renaville <vincent.renaville@camptocamp.com>
  • Guewen Baconnier <guewen.baconnier@camptocamp.com>
  • Holger Brunn <hbrunn@terp.nl>
  • Jonathan Nemry <jonathan.nemry@acsone.eu>
  • Olivier Laurent <olivier.laurent@acsone.eu>
  • Sandy Carter <sandy.carter@savoirfairelinux.com>
  • Alexis de Lattre <alexis.delattre@akretion.fr>
  • Lorenzo Battistini <lorenzo.battistini@agilebg.com>
  • Hans Henrik Gabelgaard <hhg@gabelgaard.org>
  • Jairo Llopis <j.llopis@grupoesoc.es>
  • Adrien Peiffer <adrien.peiffer@acsone.eu>
  • Ronald Portier <ronald@therp.nl>
  • Sylvain Van Hoof
  • Pedro Baeza <pedro.baeza@serviciosbaeza.com>
  • Dave Lasley <dave@laslabs.com>

Translations

  • Danish: Hans Henrik Gabelgaard
  • Italian: Leonardo Donelli
  • Spanish: Antonio Espinosa
  • Antonio Espinosa <antonioea@antiun.com>

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
  • Ratings
  • Discuss
There are no ratings yet!
Cannot install
by
Austin
on 2/4/22, 5:54 AM

Hi,

I had installed the module and uninstalled it.  I tried installing it again and i keep on getting this error;

"

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/http.py", line 642, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/odoo/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/odoo/odoo-server/odoo/http.py", line 334, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/odoo/odoo-server/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/odoo/odoo-server/odoo/http.py", line 327, in checked_call
    result = self.endpoint(*a, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 942, in __call__
    return self.method(*args, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 507, in response_wrap
    response = f(*args, **kw)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 899, in call_button
    action = self._call_kw(model, method, args, {})
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 887, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/odoo/odoo-server/odoo/addons/base/module/module.py", line 413, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/odoo/odoo-server/odoo/addons/base/module/module.py", line 495, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/odoo/odoo-server/odoo/modules/registry.py", line 83, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/odoo/odoo-server/odoo/modules/loading.py", line 377, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/odoo/odoo-server/odoo/modules/loading.py", line 270, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/odoo/odoo-server/odoo/modules/loading.py", line 200, in load_module_graph
    getattr(py_module, post_init)(cr, registry)
  File "/odoo/odoo-server/addons/partner_firstname/hooks.py", line 11, in post_init_hook
    env['res.partner']._install_partner_firstname()
  File "/odoo/odoo-server/addons/partner_firstname/models/res_partner.py", line 246, in _install_partner_firstname
    records._inverse_name()
  File "/odoo/odoo-server/addons/partner_firstname/models/res_partner.py", line 198, in _inverse_name
    record.lastname = parts['lastname']
  File "/odoo/odoo-server/odoo/fields.py", line 970, in __set__
    record.write({self.name: write_value})
  File "/odoo/odoo-server/odoo/addons/base/res/res_partner.py", line 516, in write
    result = result and super(Partner, self).write(vals)
  File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 276, in write
    result = super(MailThread, self).write(values)
  File "/odoo/odoo-server/odoo/models.py", line 3595, in write
    self._write(old_vals)
  File "/odoo/odoo-server/odoo/models.py", line 3826, in _write
    self.recompute()
  File "/odoo/odoo-server/odoo/models.py", line 5381, in recompute
    recs.browse(ids)._write(dict(vals))
  File "/odoo/odoo-server/odoo/models.py", line 3696, in _write
    cr.execute(query, params + (sub_ids,))
  File "/odoo/odoo-server/odoo/sql_db.py", line 154, in wrapper
    return f(self, *args, **kwargs)
  File "/odoo/odoo-server/odoo/sql_db.py", line 231, in execute
    res = self._obj.execute(query, params)
InvalidTextRepresentation: invalid input syntax for integer: "5999-20221129060000"
LINE 1: ..., 3, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, '5999-2022...

Regards,

Austin


Small missing on signup and user details form
by
Mathieu C
on 11/3/19, 11:31 AM

Very good module. But is it normal that this module does not apply the change also on the : - signup form ? - user details form ? It would be good if the user can directly insert firstname + lastname while creating its account. How could we implement this ? Thanks and regards


Does this change leads to first and last name too?
by
Ted Lemmy
on 9/12/17, 6:48 PM

I am not sure if they use the same or not


Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with