Merge lp:~camptocamp/openobject-addons/7.0-fix-1206167 into lp:openobject-addons/7.0

Proposed by Yannick Vaucher @ Camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/7.0-fix-1206167
Merge into: lp:openobject-addons/7.0
Diff against target: 15 lines (+4/-1)
1 file modified
account_payment/wizard/account_payment_order.py (+4/-1)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/7.0-fix-1206167
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+180304@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

9312. By Yannick Vaucher @ Camptocamp on 2013-07-30

[PEP8]

9311. By Vincent Renaville@camptocamp on 2013-07-30

[FIX] account_payment - Add journal type filter, to prevent import of unreconciled bank move line

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_payment/wizard/account_payment_order.py'
2--- account_payment/wizard/account_payment_order.py 2013-06-20 13:32:51 +0000
3+++ account_payment/wizard/account_payment_order.py 2013-08-15 09:37:32 +0000
4@@ -104,7 +104,10 @@
5 # payment = self.pool.get('payment.order').browse(cr, uid, context['active_id'], context=context)
6
7 # Search for move line to pay:
8- domain = [('reconcile_id', '=', False), ('account_id.type', '=', 'payable'), ('amount_to_pay', '>', 0)]
9+ domain = [('reconcile_id', '=', False),
10+ ('account_id.type', '=', 'payable'),
11+ ('journal_id.type','<>','bank'),
12+ ('amount_to_pay', '>', 0)]
13 domain = domain + ['|', ('date_maturity', '<=', search_due_date), ('date_maturity', '=', False)]
14 line_ids = line_obj.search(cr, uid, domain, context=context)
15 context.update({'line_ids': line_ids})