Basically I have this code block
This code works, but I need to create new order lines based on a variable. For example, if the variable = 3, create 3 order lines. I have tried this example but can't get it to work.
so_id = models.execute_kw(db, uid, password, 'sale.order', 'create', [{
'partner_id': 10,
'order_line': [(0, 0, {'product_id':x,'product_uom_qty':quantity}),
(0, 0, {'product_id': 1, 'product_uom_qty': 1})]
}])