Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
959 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
apr 23
13212
13
ott 17
17863
0
dic 21
2440
0
mar 15
3571
0
lug 19
669