# Node-red x Odoo xmlrpc : using etable to display data

**URL:** https://discourse.nodered.org/t/node-red-x-odoo-xmlrpc-using-etable-to-display-data/60725
**Category:** Dashboard
**Created:** [3 April 2022 14:47 UTC](https://discourse.nodered.org/t/node-red-x-odoo-xmlrpc-using-etable-to-display-data/60725 "2022-04-03T14:47:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cpedroni](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cpedroni/32/59502_2.png) [@cpedroni](https://discourse.nodered.org/u/cpedroni)
#### Post date: [3 April 2022 14:47 UTC](https://discourse.nodered.org/t/node-red-x-odoo-xmlrpc-using-etable-to-display-data/60725/1 "2022-04-03T14:47:39Z")

</div>

Hello, I'm new to node-red and am using it with Odoo ERP. I want to display my data in an editable table (widget etable).  
I'm fetching the data using first the change node with this code :

```auto
[
   [
       ['partner_id', '=',msg.payload],
       ['state', '=', 'draft']
   ],
   ['name', 'state','date_order','amount_total','partner_id']
]

```

then the odoo-xmlrpc-search-read node on the model sale.order. Now to display the data in an etable I would need first to add a fonction to format the data and I think it's were I'm doing it wrong. I've tried doing so many different ways but nothing works. The fact that I'm completely new to this doesn't help either. Here is what my function node has now :

```auto
var id = msg.payload.id
var name = msg.payload.name
var date_order = msg.payload.date_order
var amount_total = msg.payload.amount_total
var client = msg.payload.partner_id
var state = msg.payload.state

msg.payload = [
    { "name": ["name"],
    "date_order" : ["date_order"], 
    "amount_total" : ["amount_total"], 
    "client": ["client"],
    "state":["state"] },
    ];

return msg;

```

Ultimately I would also want to add a fonction after the etable so that the changes made in the lines of the etable could be uptated to the Odoo ERP.

---

<div class="post-metadata">

### Author: ![progwa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/progwa/32/59912_2.png) [@progwa](https://discourse.nodered.org/u/progwa)
#### Post date: [11 April 2022 09:05 UTC](https://discourse.nodered.org/t/node-red-x-odoo-xmlrpc-using-etable-to-display-data/60725/2 "2022-04-11T09:05:06Z")

</div>

Hello cpedroni,

right now I am also working on connecting Node-red to Odoo. I want to get a list of all my sale orders, so your problem discribed seems to be very similiar.

Have you already found a solution? If so, please let me know!

All the best

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [11 May 2022 09:05 UTC](https://discourse.nodered.org/t/node-red-x-odoo-xmlrpc-using-etable-to-display-data/60725/3 "2022-05-11T09:05:21Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
