Commit b0c2331a authored by Jérome Perrin's avatar Jérome Perrin

prevent "bad operand type for unary -" TypeErrors when total_price is None

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21630 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 902d7cee
......@@ -129,7 +129,7 @@ base_total = 0\n
\n
i = 0\n
for inventory in employee_inventory_list:\n
price = - inventory.total_price or 0\n
price = - (inventory.total_price or 0)\n
movement = inventory.getObject()\n
employee = movement.getDestinationValue()\n
salary_range = movement.getSalaryRange()\n
......@@ -149,7 +149,7 @@ for inventory in employee_inventory_list:\n
base_total += inventory.quantity\n
\n
for inventory in employer_inventory_list:\n
price = - inventory.total_price or 0\n
price = - (inventory.total_price or 0)\n
movement = inventory.getObject()\n
employee = movement.getDestinationValue()\n
salary_range = movement.getSalaryRange()\n
......
288
\ No newline at end of file
291
\ 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