how to use order_line item i want create purchase.order with product
is this right way to create order ?
const partnerId = await odoo.create('purchase.order', {
partner_id: 12,
dest_address_id: false,
currency_id: 2,
notes: false,
invoice_count: 0,
invoice_ids: [],
invoice_status: "no",
fiscal_position_id: false,
payment_term_id: false,
"product_id": 6,
'order_line':[(0,false,{
'name':'abcd', // this must be description of product.
'date_planned':Date.now(), // Planned date need to pass.
'product_id':1,
'product_qty':20.0,
'price_unit':2.0
})]
});
how to use order_line item i want create purchase.order with product is this right way to create order ? const partnerId = await odoo.create('purchase.order', { partner_id: 12, dest_address_id: false, currency_id: 2, notes: false, invoice_count: 0, invoice_ids: [], invoice_status: "no", fiscal_position_id: false, payment_term_id: false, "product_id": 6, 'order_line':[(0,false,{ 'name':'abcd', // this must be description of product. 'date_planned':Date.now(), // Planned date need to pass. 'product_id':1, 'product_qty':20.0, 'price_unit':2.0 })] });