[IMP][account_banking_payment_transfer] Decorate debit_reconcile method with @api.cr_uid_id_context and call this one directly with a recordset

This commit is contained in:
Adrien Peiffer (ACSONE)
2015-07-01 09:43:02 +02:00
parent 1f031c4755
commit c430f3e986
2 changed files with 4 additions and 3 deletions

View File

@@ -215,11 +215,11 @@ class PaymentOrder(models.Model):
# on the payment line and call reconciliation on it
line.write({'transit_move_line_id': partner_move_line.id})
@api.model
def _reconcile_payment_lines(self, payment_lines):
pl_obj = self.env['payment.line']
for line in payment_lines:
if line.move_line_id:
pl_obj.debit_reconcile(line.id)
line.debit_reconcile()
else:
self.action_sent_no_move_line_hook(line)

View File

@@ -24,7 +24,7 @@
##############################################################################
from openerp.osv import orm, fields
from openerp import workflow
from openerp import workflow, api
from openerp.tools.translate import _
@@ -116,6 +116,7 @@ class PaymentLine(orm.Model):
return False
@api.cr_uid_id_context
def debit_reconcile(self, cr, uid, payment_line_id, context=None):
"""
Reconcile a debit order's payment line with the the move line