Commit 5cb78552 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Cédric Le Ninivin

Revert "erp5_accounting: total assert price can be None"

better raise error
parent f8893415
...@@ -55,7 +55,7 @@ def roundLine(resource, get_method, set_method, exchange_ratio): ...@@ -55,7 +55,7 @@ def roundLine(resource, get_method, set_method, exchange_ratio):
precision = context.getQuantityPrecisionFromResource(resource) precision = context.getQuantityPrecisionFromResource(resource)
total_quantity = 0.0 total_quantity = 0.0
for line in line_list: for line in line_list:
line_quantity = round(getattr(line, get_method)() or 0, precision) line_quantity = round(getattr(line, get_method)(), precision)
getattr(line, set_method)(line_quantity) getattr(line, set_method)(line_quantity)
total_quantity += line_quantity total_quantity += line_quantity
......
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