Skip to Content
Menú
This question has been flagged
3 Respostes
3720 Vistes

I need a first name and a last name field in the contacts/partners model so these fields are usable throughout odoo.
In odoo online, is there another way than add these two fields with odoo studio, customize views/lists manually and eventually customize the name field to a calculated field? 
Is there another, easier way? For odoo.sh and onprem-hostings I found apps...

Thanks for your inputs!
Bernhard


Avatar
Descartar

Hi Bernhard!

Have you found a solution that works for you? I share your opinion. There seem to be more fields that should be broken down into parts, just think of the phone number or the address line.

Regards

Gregor 

Autor

@Gregor Teichmann
No, I found no other ways as the below explained workarounds. Hope Odoo notices this requirement and includes it in future versions.

Best Answer

Hi Bernhard - It's probably not too difficult to add the two fields (using Studio) and then create an Automated Action that would concatenate them into the name (for individuals only).

Is that what you are looking for?

Avatar
Descartar
Autor

Yes, this is probably the "simple" customizing way.

Autor Best Answer

Hi Cybrosys

Is there really no standard way how first name and last name can be activated for individuals and what is the concept of odoo in this case? I don't know any other solutions to manage contacts where these fields aren't included in the standard data model. Openness or not - for me, this concept is quite a gap/disadvantage to use odoo without customizing and brings a lot of work in other modules/apps too. Or do I not understand the partner/contact concept of odoo standard? 

Kind regards,
Bernhard

Avatar
Descartar
Best Answer

HI,

In Odoo Online, if you need to add a first name and a last name field to the contacts/partners model and make them usable throughout Odoo without extensive customization, there is indeed a simpler approach than manually customizing views and lists.

One common approach is to utilize Odoo's "Technical Settings" feature, which allows you to enable developer mode and make direct modifications to fields and models without needing to customize views manually.

Here's a step-by-step guide on how to achieve this:

  1. Enable Developer Mode: Go to Settings > Activate the Developer Mode.
  2. Access Technical Settings: Once Developer Mode is activated, you'll see additional options in the Settings menu. Look for the "Technical" section and access it.
  3. Modify Fields: Within the "Technical" section, you'll find options to modify fields, models, and other technical configurations. Look for the "Database Structure" section and select "Fields".
  4. Add Fields: In the fields menu, you can add new fields to the contacts/partners model. Add fields for first name and last name.
  5. Update Views (if necessary): In some cases, you may need to update views to display the new fields correctly. You can do this by accessing the "Views" section under "Technical" settings and modifying the appropriate views.
  6. Update Name Field (optional): If you want to use the first name and last name fields to generate the partner's name, you can customize the existing "name" field to be a calculated field based on the first name and last name fields.
  7. Test and Validate: Once you've made the necessary modifications, be sure to test the changes thoroughly to ensure they behave as expected.

By utilizing the Technical Settings in Odoo Online, you can efficiently add first name and last name fields to the contacts/partners model without the need for extensive customization. This approach simplifies the process and ensures consistency across Odoo without manually customizing views and lists

Hope it helps

Avatar
Descartar
Autor

Hi Cybrosys

Thanks for the detailed explanation of my first thoughts (adding fields individually). 
Btw, point 6 seams is inconsistent to me. In the partner model are companies and individuals stored. Therefore, the calculation should be only triggered by an change/update in the fields first name or last name and in case the contact type is an individual.

Is there really no standard way how first name and last name can be activated for individuals and what is the concept of odoo in this case? I don't know any other solutions to manage contacts where these fields aren't included in the standard data model. Openness or not - for me, this concept is quite a gap/disadvantage to use odoo without customizing and brings a lot of work in other modules/apps too. Or do I not understand the partner/contact concept of odoo standard? 

Kind regards,
Bernhard

Avatar
Guillaume LEBOURG
il y a 1 seconde
Hi you can't do that. not only that.

Because if you have a web site on wich user could create thier own account. JS take car of name, but will not take care of your x_fistname and x_lastname.

Hi

I tried Developer Mode → Technical but the Modify Fields and following points were not available.
I am on Odoo 16.0+e (Enterprise Edition)

BTW: I have read the arguments for one name field and they do not apply to my needs and circumstances. A factor behind my chosing Odoo is that I thought it had a freeware ("free" as in freedom of choice") rather than peremptory ethos.

Related Posts Respostes Vistes Activitat
1
d’abr. 17
329
1
de set. 16
2907
4
de juny 20
6177
3
d’oct. 16
3530
1
de febr. 25
1826