Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4113 Представления

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мар. 25
1254
1
мар. 23
4992
1
окт. 22
11210
7
янв. 22
18602
1
янв. 24
14951