跳至內容
選單
此問題已被標幟
1 回覆
3820 瀏覽次數

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
8583
4
3月 25
9475
4
6月 25
5771
2
7月 24
5813
0
12月 21
2305