Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3834 Vizualizări

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.



Imagine profil
Abandonează
Autor

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..

Autor

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

Cel mai bun răspuns

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


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
4
mar. 25
8603
4
mar. 25
9487
4
iun. 25
5782
2
iul. 24
5829
0
dec. 21
2312