Skip to Content
मेन्यू
This question has been flagged
1 Reply
4129 Views

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.



Avatar
Discard
Best Answer

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.

Avatar
Discard
Related Posts Replies Views Activity
1
मार्च 25
1262
1
मार्च 23
5007
1
अक्तू॰ 22
11215
7
जन॰ 22
18622
1
जन॰ 24
14968