Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4186 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
März 25
1346
1
März 23
5090
1
Okt. 22
11268
7
Jan. 22
18696
1
Jan. 24
15034