Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1476 มุมมอง

Hello,


I've been creating a new sale order programmatically, but I get this error:


ValueError: : "new row for relation "sale_order_line" violates check constraint "sale_order_line_accountable_required_fields"

DETAIL:  Failing row contains (...). " while evaluating 'model.action_create_sale_order()'

The failing row contains:

[

  {

    "id": "nextval('sale_order_line_id_seq')",

    "create_uid": 2,

    "create_date": "(now() at time zone 'UTC')",

    "write_uid": 2,

    "write_date": "(now() at time zone 'UTC')",

    "bill_amount": 0,

    "customer_lead": 0,

    "discount": "'0.00'",

    "display_type": "NULL",

    "invoice_status": "'no'",

    "is_delivery": false,

    "name": "'ABC1234'",

    "order_id": 15772,

    "price_unit": "'0.00'",

    "product_id": "NULL",

    "product_packaging": "NULL",

    "product_uom_qty": "'0.00'",

    "qty_delivered": "'0.00'",

    "qty_delivered_manual": "'0.00'",

    "sequence": 10,

    "state": "'draft'"

  }

]


What am I missing here?

Thanks

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

solved

อวตาร
ละทิ้ง

Please what was the solution you found

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 25
1081
0
พ.ค. 25
961
2
พ.ค. 25
1715
Change filename แก้ไขแล้ว
1
พ.ค. 25
893
0
มี.ค. 25
1102