Hello Odoo experts,
I'm creating sales orders with the JSONRPC API of Odoo.
I recently noticed that the delivery zone was not being properly determined, so I assumed I had to add the field to my request. The problem is that is not working, the value I'm passing is not being considered.
Any idea why?
This is the body of my request:
{ "method": "call",
"params": {
"service": "object",
"method": "execute_kw",
"args": [
"x",
"y",
"z",
"sale.order",
"create", [
{ "warehouse_id": 1,
"partner_id": 44720,
"partner_invoice_id": 44722,
"partner_shipping_id": 44728,
"date_order": "2024-05-21",
"validity_date": "2024-05-21",
"referencia_pedido_choco": "test",
"user_id": 16,
"type_id": 3,
"state": "to_approve",
"commitment_date": "2024-05-22 08:00:00",
"payment_mode_id": 12,
"payment_term_id": 12,
"imprimir_factura": true,
"delivery_zone_id": 21,
"valued": true,
"pricelist_id": 1,
"order_line": [ [ 0, 0, { "product_id": 13972, "product_uom_qty": 2 } ] ] } ] ] }}
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
2
Trả lời
1676
Lượt xem
Hi,
Checking on standard Odoo 17 Source code, am not able to see such a field, so i believe it will be a custom field.
So as part of debugging, check if that field is a related field or a computed field, so that it rejects/rewrite the value you are passing.
Thanks
Any idea?
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 11 21
|
6459 | ||
|
1
thg 10 21
|
4713 | ||
|
0
thg 12 19
|
2575 | ||
|
1
thg 2 16
|
4050 | ||
|
1
thg 9 22
|
3872 |
Hello Niyas Raphy,
Thank you very much for your answer.
When I request a fields.get from sales.order I get the following:
"delivery_zone_id": {
"required": true,
"change_default": false,
"sortable": true,
"store": true,
"string": "Zona de entrega",
"company_dependent": false,
"searchable": true,
"context": {},
"readonly": false,
"depends": [],
"type": "many2one",
"manual": false,
"relation": "partner.delivery.zone",
"domain": []
}
Does this helps to confirm whether is a custom field or not? can I see somewhere whether it's a computed field or not?
Issue solved! It was a stupid misunderstanding.