Can someone explain how this line is gonna work? Also the lambda function too...(code from sale.order in sale.py)
for line in order.order_line.sorted(key=lambda l: l.qty_to_invoice < 0):
Also if I how to sort the order_line according to the product type (service, consumable, or stockable), so that the order lines are selected according to the their type. (ie, first all the consumable products in the order_line are selected and executed, then all service type, etc....)