Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4111 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
mars 25
1254
1
mars 23
4992
1
oct. 22
11210
7
janv. 22
18602
1
janv. 24
14951