Turns out I had to edit the report definition as it used static SQL queries 
which defined the sort order :

tinyerp-server/addons/account/report/account_journal.py

        def lines(self, period_id, journal_id, 
*args):
                
self.cr.execute('update account_journal_period set state=%s where 
journal_id=%d and period_id=%d and state=%s', 
('printed',journal_id,period_id,'draft'))
                self.cr.commit()
-                
self.cr.execute('select id from account_move_line where period_id=%d and 
journal_id=%d and state<>\'draft\' order by date,id', &#40;period_id, 
journal_id&#41;&#41;
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
self.cr.execute&#40;'select id from account_move_line where period_id=%d and 
journal_id=%d and state<>\'draft\' order by date,ref', &#40;period_id, 
journal_id&#41;&#41;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ids = map&#40;lambda 
x&#58; x&#91;0&#93;, self.cr.fetchall&#40;&#41;&#41;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 
self.pool.get&#40;'account.move.line'&#41;.browse&#40;self.cr, self.uid, 
ids&#41;


Thats what you get when you go around the orm :)

FYI: We are using the




_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to