mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user