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

I'm new to the Odoo api, and trying to figure out how to get some fields is quite hard.

What I want to find is for example the 'payment_method_id'. In a sale.order it looks like, 'payment_method_id': [3,'adyen_eur']. But I only have the 'adyen_eur' part of the payment_method_id, so to get the int 3 I have to 'search_read' some database, but which one?

To make it a bit more clear I do the same for 'country_id'. What I have is:

country_code = 'GB'

To get the country_id I do:

country_id = models.execute_kw(db, uid, password, 'res.country', 'search_read',[[('code','=',country_code)]])[0]

The integer that comes out of the country_id is what I need. In the same way I want to get the payment_method_id and workflow_process_id. Is there a database like 'res.country', 'order.sales' ,... where I can find these Id's?


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

you can get the data from model payment.acquirer and provider name is 'adyen'. In this model saves all data related with payment acquirers used in odoo. Here there is a column named provider which saves the name of payment acquirer.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 24
1337
0
พ.ย. 23
1543
1
ต.ค. 20
6000
0
ส.ค. 22
5130
2
พ.ค. 22
10318