diff --git a/account_constraints/account_constraints.py b/account_constraints/account_constraints.py index b8a4c267c..8190e9854 100644 --- a/account_constraints/account_constraints.py +++ b/account_constraints/account_constraints.py @@ -48,7 +48,7 @@ class AccountMoveLine(orm.Model): for line in self.browse(cr, uid, ids, context=context): if line.invoice: err_msg = (_('Invoice name (id): %s (%s)') % - (line.invoice.name, str(line.invoice.id))) + (line.invoice.name, line.invoice.id)) raise osv.except_osv( _('Error'), _('You cannot do this on an entry generated by an invoice. You must ' @@ -59,7 +59,7 @@ class AccountMoveLine(orm.Model): for line in self.browse(cr, uid, ids, context=context): if line.statement_id: err_msg = (_('Bank statement name (id): %s (%s)') % - (line.statement_id.name, str(line.statement_id.id))) + (line.statement_id.name, line.statement_id.id)) raise osv.except_osv( _('Error'), _('You cannot do this on an entry generated by a bank statement. ' @@ -100,7 +100,7 @@ class AccountMoveLine(orm.Model): if not context.get('from_parent_object', False): self._check_invoice_related_move(cr, uid, ids, context=context) self._check_statement_related_move(cr, uid, ids, context=context) - return super(AccountMoveLine, self).write(cr, uid, ids, vals, + return super(AccountMoveLine, self).write(cr, uid, ids, vals, context=context, check=check, update_check=update_check) def _check_currency_and_amount(self, cr, uid, ids, context=None):