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', (period_id, journal_id)) + self.cr.execute('select id from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\' order by date,ref', (period_id, journal_id)) ids = map(lambda x: x[0], self.cr.fetchall()) return self.pool.get('account.move.line').browse(self.cr, self.uid, ids) 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
