Commit 65a6d25b authored by Nicolas Delaby's avatar Nicolas Delaby

Avoid KeyError if quantity is not in dictionary. It might happen if field is...

Avoid KeyError if quantity is not in dictionary. It might happen if field is not editable (TALES expression)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42683 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0369d554
......@@ -138,7 +138,8 @@ for line in listbox:\n
if no_inventory is False:\n
# First defined the price\n
line["total_price"] = 0.0\n
if line["quantity"] in (None, ""):\n
quantity = line.get(\'quantity\')\n
if quantity in (None, ""):\n
line["quantity"] = 0.0\n
if line[\'price\'] in (None,""):\n
if variation_list:\n
......
1097
\ No newline at end of file
1099
\ No newline at end of file
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