Commit 38c0a7d9 authored by Cédric Krier's avatar Cédric Krier
Browse files

Do not convert into float search amount of invoice if it is None

parent b6ab2f2687eb
......@@ -834,7 +834,7 @@
invoice_query = Rule.query_get('account.invoice')
Operator = fields.SQL_OPERATORS[operator]
# SQLite uses float for sum
if backend.name == 'sqlite':
if value is not None and backend.name == 'sqlite':
value = float(value)
union = (line.join(invoice, condition=(invoice.id == line.invoice)
......@@ -870,7 +870,7 @@
invoice_query = Rule.query_get('account.invoice')
Operator = fields.SQL_OPERATORS[operator]
# SQLite uses float for sum
if backend.name == 'sqlite':
if value is not None and backend.name == 'sqlite':
value = float(value)
query = line.join(invoice,
......@@ -899,7 +899,7 @@
invoice_query = Rule.query_get('account.invoice')
Operator = fields.SQL_OPERATORS[operator]
# SQLite uses float for sum
if backend.name == 'sqlite':
if value is not None and backend.name == 'sqlite':
value = float(value)
query = tax.select(tax.invoice,
......
Supports Markdown
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