0 votes

I want to update multiple records of "sale.order.line" products, using Odoo Xmlrpc

for (let i = 0; i <sell.products.length; i ++) {                
          var inParams = [];
          inParams.push ([value1 [i]]);  //id to update
          inParams.push ({
            'name': sale.products [i] .name,
            'product_uom_qty': sales.products [i] .product_uom_qty,
            'price_unit': sales.products [i] .price_unit,
            'product_id': sales.products [i] .product_id
          var params = [];
          params.push (inParams);
          db.execute_kw ('sale.order.line', 'write', params, function (err, value) {
            if (err) {return console.log (err);}
            return console.log ('Result2:', value);

and here is the error: raise psycopg2.OperationalError (msg) \ npsycopg2.OperationalError: Unable to use a closed cursor.I use Odoo version 12 thank you in advance

in Server by (10.5k points) | 83 views

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
204 questions
180 answers
268,129 users