[MERGE][IMP] account: Set the order of the sequence by date while posting journal entries from wizard Periodical Processing> Draft Entries> Post Journal Entries

bzr revid: dle@openerp.com-20140327140304-9oyq6ebl48aasia8
This commit is contained in:
Denis Ledoux 2014-03-27 15:03:04 +01:00
commit 56894a58cf
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ class validate_account_move(osv.osv_memory):
if context is None:
context = {}
data = self.browse(cr, uid, ids, context=context)[0]
ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','=',data.journal_id.id),('period_id','=',data.period_id.id)])
ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','=',data.journal_id.id),('period_id','=',data.period_id.id)], order="date")
if not ids_move:
raise osv.except_osv(_('Warning!'), _('Specified journal does not have any account move entries in draft state for this period.'))
obj_move.button_validate(cr, uid, ids_move, context=context)