Hi,
We are developing a module for Odoo 10 that sends data to a fiscal device using POST method. The fiscal device has an api and for the invoice, the following is the json.dump;
payload_tuples = json.dumps({
"invoiceType": 0,
"transactionType": 0,
"cashier": "Benjamin",
"TraderSystemInvoiceNumber": "test0123",
"buyer": {
"buyerName": "Buyer Name",
"pinOfBuyer": "Buyers Pin",
"buyerAddress": "Buyers Address",
"buyerPhone": "Buyers Phone"
},
"items": [
{
"name": "test",
"quantity": 1.0,
"unitPrice": 1.0
}
],
"payment": [
{
"amount": 1,
"paymentType": "Cash"
}
],
"lines": [
{
"lineType": "Text",
"alignment": "bold center",
"format": "Bold",
"value": "Thank you!!"
}
]
})
For this case, we wish to match data from the linvoice lines as follows;
In the items part i.e.
"items": [
{
"name": "test",
"quantity": 1.0,
"unitPrice": 1.0
}
],
I wish that my module gets figures for the following "name": from line.name ; "quantity": from line.quantity AND "unitPrice": from line.price_unit . fields that are in the invoice lines.
I am using Odoo 10 CE hosted on a ubuntu 16 server.
Kindly assist.
Regards.