Order lines for reconciliation

By ordering lines on credit for receivable and debit for payable, we show the
lines to proceed first.

review952002
This commit is contained in:
Cédric Krier
2013-07-22 14:51:43 +02:00
parent fae7afbba6
commit 7d2eb331e0
+9 -1
View File
@@ -1600,10 +1600,18 @@ class OpenReconcileLines(Wizard):
open_ = StateAction('account.act_move_line_form')
def do_open_(self, action):
action['pyson_domain'] = PYSONEncoder().encode([
encoder = PYSONEncoder()
action['pyson_domain'] = encoder.encode([
('account', '=', self.start.account.id),
('reconciliation', '=', None),
])
if self.start.account.kind == 'receivable':
order = [('credit', 'DESC'), ('id', 'DESC')]
elif self.start.account.kind == 'payable':
order = [('debit', 'DESC'), ('id', 'DESC')]
else:
order = None
action['pyson_order'] = encoder.encode(order)
return action, {}