Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
13061 มุมมอง

I have a requirement that I want to call external APIs from odoo(this needs changing the code of odoo) whenever an odoo api is hit(so basically i want to update data in my other database of which the server is on Nodejs and mongodb) and data in odoo database is changed. How can it be done?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด


you can add it by overriding the create and write methods , for the form editing . and you can add a separate sync function to sync the datas with your other database 


EDIT : - you can create a inherited module to add the new codes . it does't affect you actual source codes

you can do it even without the sync function , Thats your choice 


thank you 

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi Ramasad,

Thank you so much for your reply. I was wondering how the overriding of create and write methods can be done. Does it require the change in source code of odoo, as my odoo app is already in production.

I don't want to do the sync function( as it can add complexity as i have 2 external nodejs servers and 2 separate external databases to update)


Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi @Shubham, were you able to call your nodes js API from odoo as per suggested approach?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ธ.ค. 24
2166
1
ก.พ. 22
3975
1
ก.พ. 22
6879
0
พ.ย. 21
4413
0
มี.ค. 19
4117