Skip to Content
Menú
This question has been flagged

I am building a WooCommerce <-> Odoo Online integration using n8n workflows with the Odoo Connector. So far, I'm impressed with what the tool can do. I successfully synced Categories, Products, Orders, and Order Line Items, but I’m facing an issue with setting the shipping method on an Order.


Issue

When I set carrier_id on sale.order, it appears correctly when retrieving the order via API:

...

"carrier_id": [

  1,

  "Verzending met Postnl of DPD"

]

...

However, this shipping method does not appear in the Odoo Sales Order UI.


Question

Is there a method or additional field required to make the shipping method visible in the UI? Any insights would be greatly appreciated!

Avatar
Descartar
Autor Best Answer

I managed to get it working using:

  1. Executing a CREATE on choose.delivery.carrier
  2. Executing a custom jsonrpc call to confirm the carrier:
  {
    "jsonrpc": "2.0",
    "method": "call",
    "params": {
      "service": "object",
      "method": "execute_kw",
      "args": [
        "ODOO_INSTANCE",
        2,
        "AUTH_KEY_REMOVED",
        "choose.delivery.carrier",
        "button_confirm",
        [[ID_FROM_PREVIOUS_STEP]]
      ]
    },
    "id": 1
  }


Is this the correct way to do it? It feels a bit overcomplicated to use a wizard model intended for the UI to set the carrier.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’abr. 23
13213
13
d’oct. 17
17863
0
de des. 21
2445
0
de març 15
3571
0
de jul. 19
669