Hi All,
I have created a model
the above model has a relation with another model using field business_funding_ids, below is that model
I'm getting the multiple values using a webform
below is the controller where in getting the data in kw.
and tring to store in the One2many fields
with the above code it creates new record with but I want append the values in the existing record without creating a new one.
How can I solve this issue?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
for updating the record only I wrote
business_funding.business_case_id.write({'business_funding_ids': funding_data})
but with this a new record is getting created in the DB
Please check the lead 2 values
Hi,
On quick check it seems you are adding data to one2many field and i believe it is working fine ? So instead of adding you need to update the existing one2many records right ? iF yes, you need to adjust the last lines of code
If its fine, how about clearing the current data in one2many and adding all again once ?
Thanks
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
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 7 24
|
30 | ||
|
1
thg 11 22
|
2720 | ||
|
0
thg 2 21
|
2276 | ||
|
0
thg 9 24
|
140 | ||
|
5
thg 4 16
|
5730 |