error when consulting account chart

Bug #535601 reported by Nicolas Bessi - Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
Vinay Rana (OpenERP)

Bug Description

Hello,
when working with consolidated account a small bug may appear there may be And And in sql because some string are not empty.

This fix the problem :

=== modified file 'account/account.py'
--- account/account.py 2010-03-03 08:39:20 +0000
+++ account/account.py 2010-03-10 09:41:06 +0000
@@ -211,9 +211,9 @@
             aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)

             wheres = [""]
- if query:
+ if query.strip():
                 wheres.append(query.strip())
- if aml_query:
+ if aml_query.strip():
                 wheres.append(aml_query.strip())
             query = " AND ".join(wheres)

Related branches

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Nicolas,

Would you please introduce us to such a situation which can generate the bug?

We agree with your solution, but we don't see any way to face to this error.

Thank you for noting this point.

Changed in openobject-addons:
assignee: nobody → vra (openerp) (vra-openerp)
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Its better to cover few attacks.
It has been fixed by revision 2680 <email address hidden>.
Thanks.

Changed in openobject-addons:
importance: Undecided → Medium
milestone: none → 5.0.8
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.