[FIX] ir_values: revert r3568: caused a crash when creating a new purchase.order
authorolt@tinyerp.com <>
Thu, 9 Feb 2012 08:53:51 +0000 (09:53 +0100)
committerolt@tinyerp.com <>
Thu, 9 Feb 2012 08:53:51 +0000 (09:53 +0100)
bzr revid: olt@tinyerp.com-20120209085351-c7s0p221nqfz20gr

bin/addons/base/ir/ir_values.py

index a21fc13..5c5591c 100644 (file)
@@ -179,7 +179,7 @@ class ir_values(osv.osv):
                     where.append('res_id=%s')
                     params.append(res_id)
 
-            order = 'user_id, company_id'
+            order = 'id, company_id'
             where.append('''(user_id=%s or (user_id IS NULL))
                 and (company_id is null or
                 company_id = (SELECT company_id FROM res_users WHERE id = %s)) order by '''+ order)