跳至内容
菜单
此问题已终结
1 回复
4235 查看

Hi guys,

I am building mobile app for the invoice module. So when the invoice has state of "Open", and I click on "Register Payment" --> it shows a new payment form --> and then I click to validate button --> it changes the Invoice status to "Paid".

So as I read the code --> when it opens a new form of Register Payment --> the context use the active_id of the current invoice for this payment. And then when I press button Validate, it creates new payment record and validate. 

In the view of external API using XML-RPC, what should I do to present this logic?

One solution that I think of: When pushing the Validate button on mobile phone --> I will two request sequently: 1st one is to create new record of payment, 2nd one is to validate the payment. But it fails, because the response of the 1st one return "True", I don't know the payment record id to ask the server to validate it. 

Odoo version: 11.0 community.



形象
丢弃
最佳答案

You did not show code, so it's difficult to advise.
See the XML-RPC documentation: https://www.odoo.com/documentation/11.0/webservices/odoo.html
Method create should return record ID not True.

形象
丢弃
相关帖文 回复 查看 活动
1
3月 25
1472
1
3月 23
5205
1
10月 22
11391
7
1月 22
18802
1
1月 24
15134