콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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

I used this code:
  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

아바타
취소
관련 게시물 답글 화면 활동
1
11월 23
1770
3
6월 20
4606
0
1월 17
2628
1
7월 25
1449
3
4월 24
2580