Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3841 Lượt xem

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.



Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

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

Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 3 25
8671
4
thg 3 25
9522
4
thg 6 25
5829
2
thg 7 24
5859
0
thg 12 21
2331