Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3835 Weergaven

Hello, what if I want to compute a base field using custom fields? how do i do it on SaaS?

For example, i created the following custom fields: 

-employee last name

-employee first name

I want the base field "name" to be automatically populated when the custom fields are filled up. Thank you.



Avatar
Annuleer
Auteur

I am using the cloud or online version of odoo. where do i write that code? thank you

For online version of odoo you can use odoo studio app for customizations..

Auteur

Thank you for your response Muhammad Anees. Could i customize without using studio apps though?

Beste antwoord

You can write onchange function something like this.

@api.onchange('first_name', 'last_name')
def _onchange_first_last_name(self)
  self.name = self.first_name + ' '+ self.last_name


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
4
mrt. 25
8608
4
mrt. 25
9490
4
jun. 25
5785
2
jul. 24
5829
0
dec. 21
2313