Hi friends,
I Need to add a new line in one2many field from js without using python. And also I need to edit existing records using js.
odoo version : -13 or 14
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi friends,
I Need to add a new line in one2many field from js without using python. And also I need to edit existing records using js.
odoo version : -13 or 14
You can use rpc.query for this. In rpc, there are several methods available: create,read,write, search_read, etc.
For Example:
if I need to add sale_order_lines to a sale_order.
var res = rpc.query({
model: 'sale.order.line',
method: 'create',
args: [{
order_id: orderID, // ID of the sales order
product_id: productID, // ID of the product to add
product_uom_qty: quantity // Quantity of the product }],
kwargs: {}
})
Regards
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
Rekisteröidy| Aiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
|---|---|---|---|---|
|
1
syysk. 15
|
5818 | |||
|
1
syysk. 23
|
4370 | |||
|
2
lokak. 22
|
22744 | |||
|
1
kesäk. 22
|
7514 | |||
|
3
huhtik. 20
|
11712 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.