Created
August 29, 2014 15:10
-
-
Save judgej/38d5bcba3c8f5e3f6fa5 to your computer and use it in GitHub Desktop.
XMLRPC Pay Invoice?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feed - OpenERP Feed - OpenERP * FAQ | |
Last visit was: Wed May 15, 2013 6:36 am It is currently Wed May 15, 2013 6:36 am | |
Board index » OpenERP - Development Topics » General Questions | |
All times are UTC | |
XMLRPC Pay Invoice? | |
Page 1 of 1 | |
[ 3 posts ] | |
Author Message | |
toomuchcode | |
Post subject: XMLRPC Pay Invoice? | |
PostPosted: Thu Apr 26, 2012 7:07 pm | |
Joined: Wed Apr 18, 2012 6:02 pm | |
Posts: 6 | |
Location: USA | |
We're trying to configure our payments to automatically post once a customer places an order on a custom website platform that we have. | |
I've managed to get the payment created however it only shows up if i access it by it's ID and won't show in list view, what's the proper way to pay an invoice over xmlrpc? | |
My code currently looks like this (however i've been trying numerous options to get this working) | |
Code: | |
pairFields = new XmlRpcStruct(); | |
pairFields.Add("partner_id", CustomerID); | |
pairFields.Add("company_id", 1); | |
pairFields.Add("journal_id", 10); | |
pairFields.Add("currency_id", 5); | |
pairFields.Add("account_id", 6); | |
pairFields.Add("amount", Order.amount); | |
pairFields.Add("date", "04/06/2012"); | |
pairFields.Add("payment_rate", 1); | |
pairFields.Add("payment_rate_currency_id", 1); | |
pairFields.Add("period_id", 4); | |
pairFields.Add("name", "Website Payment"); | |
Int32 PaymentID = rpcClient.create(db, userID, Pass, "account.voucher", "create", pairFields); | |
//Create Voucher Line | |
pairFields = new XmlRpcStruct(); | |
pairFields.Add("amount", Order.amount + ".00"); | |
pairFields.Add("name", "Website Payment"); | |
pairFields.Add("voucher_id", PaymentID); | |
pairFields.Add("payment_option", "without_writeoff"); | |
pairFields.Add("account_id", 6); | |
pairFields.Add("partner_id", CustomerID); | |
pairFields.Add("type", "dr"); | |
Int32 VoucherLineID = rpcClient.create(db, userID, Pass, "account.voucher.line", "create", pairFields); | |
I get no exceptions, however the account.voucher.line item never shows up on the payment as well, however it does create the record. | |
Top | |
toomuchcode | |
Post subject: Re: XMLRPC Pay Invoice? | |
PostPosted: Mon Apr 30, 2012 12:59 pm | |
Offline | |
Joined: Wed Apr 18, 2012 6:02 pm | |
Posts: 6 | |
Location: USA | |
Anyone? | |
Top | |
toomuchcode | |
Post subject: Re: XMLRPC Pay Invoice? | |
PostPosted: Mon Apr 30, 2012 5:12 pm | |
Offline | |
Joined: Wed Apr 18, 2012 6:02 pm | |
Posts: 6 | |
Location: USA | |
Solution : | |
"Type" must be "receipt" before it will show up.. | |
Top | |
Page 1 of 1 | |
[ 3 posts ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment