Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
956 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 23
13211
13
thg 10 17
17861
0
thg 12 21
2440
0
thg 3 15
3571
0
thg 7 19
669