[IMP]Set the order of the sequence by date while posting journal entries from wizard...
authorDharti Ratani (Open ERP) <dhr@tinyerp.com>
Thu, 20 Mar 2014 09:46:00 +0000 (15:16 +0530)
committerDharti Ratani (Open ERP) <dhr@tinyerp.com>
Thu, 20 Mar 2014 09:46:00 +0000 (15:16 +0530)
bzr revid: dhr@tinyerp.com-20140320094600-7s0cfsn2yz5jr2e6

addons/account/wizard/account_validate_account_move.py

index 4372ce1..a45d2c1 100644 (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)