[FIX] Fix several obvious bugs that I found when testing the code.

This commit is contained in:
Alexis de Lattre
2013-08-03 00:41:42 +02:00
parent 63be70d753
commit 4c2bd0f6c9
2 changed files with 5 additions and 5 deletions

View File

@@ -133,14 +133,14 @@ class payment_line(orm.Model):
"""
if isinstance(payment_line_id, (list, tuple)):
payment_line_id = payment_line_id[0]
payment_line = self.read(
payment_line_vals = self.read(
cr, uid, payment_line_id, ['storno', 'name'], context=context)
if payment_line['storno']:
if payment_line_vals['storno']:
raise orm.except_orm(
_('Can not reconcile'),
_('Cancelation of payment line \'%s\' has already been '
'processed') % payment_line['name'])
return super(self, payment_line).debit_reconcile(
'processed') % payment_line_vals['name'])
return super(payment_line, self).debit_reconcile(
cr, uid, payment_line_id, context=context)
_columns = {