*improvement
bzr revid: qdp@tinyerp.com-20080829135512-800tyllrmf7y4gw7
This commit is contained in:
parent
caddb2b787
commit
6edbff86a0
|
@ -63,8 +63,11 @@ def search_entries(self, cr, uid, data, context):
|
|||
|
||||
# Search for move line to pay:
|
||||
line_ids = line_obj.search(cr, uid, [
|
||||
('reconcile_id', '=', False),
|
||||
('amount_to_pay', '>', 0),('date_maturity','<=',search_due_date)], context=context)
|
||||
('reconcile_id', '=', False),
|
||||
('account_id.type', '=', 'payable'),
|
||||
('amount_to_pay', '>', 0),
|
||||
('date_maturity','<=',search_due_date)
|
||||
], context=context)
|
||||
|
||||
|
||||
FORM.string = '''<?xml version="1.0"?>
|
||||
|
@ -87,7 +90,6 @@ def create_payment(self, cr, uid, data, context):
|
|||
t = payment.mode and payment.mode.type.code or 'manual'
|
||||
line2bank= pool.get('account.move.line').line2bank(cr, uid,
|
||||
line_ids, t, context)
|
||||
|
||||
## Finally populate the current payment with new lines:
|
||||
for line in line_obj.browse(cr, uid, line_ids, context=context):
|
||||
pool.get('payment.line').create(cr,uid,{
|
||||
|
@ -96,7 +98,7 @@ def create_payment(self, cr, uid, data, context):
|
|||
'bank_id': line2bank.get(line.id),
|
||||
'order_id': payment.id,
|
||||
'partner_id': line.partner_id and line.partner_id.id or False,
|
||||
'communication': line.ref or '/'
|
||||
'communication': line.ref or '/',
|
||||
}, context=context)
|
||||
return {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue