Hi guys!!
Please i want to put a value in a field. Why when i do this:
return {'value': {'field_name': value}}
Nothing happens. Am i wrong please need help
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi guys!!
Please i want to put a value in a field. Why when i do this:
return {'value': {'field_name': value}}
Nothing happens. Am i wrong please need help
Hi Abdelwahed,
Are you talking about updating a value in an on_change? Please add some more information/code?
An example of an on_change that changes values:
#This method will be called when either the field CostPrice or the field ShippingCost changes in the view. def on_change_price(self,cr,user,ids,CostPrice,ShippingCost,context=None): #Calculate the total total = CostPrice + ShippingCost res = { 'value': { #This sets the total price on the field standard_price. 'standard_price': total } } #Return the values to update it in the view. return res
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 3 25
|
1291 | ||
|
0
thg 1 25
|
3396 | ||
|
1
thg 8 23
|
14713 | ||
change password
Đã xử lý
|
|
1
thg 8 23
|
13316 | |
|
1
thg 7 23
|
10351 |