Commit 6596d16c authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_commerce: shopping cart can be None

parent 38cffd36
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
Return list of shopping cart items. Return list of shopping cart items.
XXX : get order_line as tree not just on first level XXX : get order_line as tree not just on first level
""" """
shopping_cart_order_lines = context.SaleOrder_getShoppingCart().contentValues() shopping_cart = context.SaleOrder_getShoppingCart()
if not shopping_cart:
return []
shopping_cart_order_lines = shopping_cart.contentValues()
if include_shipping: if include_shipping:
return shopping_cart_order_lines return shopping_cart_order_lines
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment