콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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.



아바타
취소
작성자

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

작성자

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

베스트 답변

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


아바타
취소
관련 게시물 답글 화면 활동
4
3월 25
8738
4
3월 25
9550
4
6월 25
5864
2
7월 24
5888
0
12월 21
2344