diff --git a/account_constraints/account_constraints.py b/account_constraints/account_constraints.py index 63a0912c6..b8a4c267c 100644 --- a/account_constraints/account_constraints.py +++ b/account_constraints/account_constraints.py @@ -47,8 +47,8 @@ class AccountMoveLine(orm.Model): def _check_invoice_related_move(self, cr, uid, ids, context=None): 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)) + err_msg = (_('Invoice name (id): %s (%s)') % + (line.invoice.name, str(line.invoice.id))) raise osv.except_osv( _('Error'), _('You cannot do this on an entry generated by an invoice. You must ' @@ -58,8 +58,8 @@ class AccountMoveLine(orm.Model): def _check_statement_related_move(self, cr, uid, ids, context=None): 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)) + err_msg = (_('Bank statement name (id): %s (%s)') % + (line.statement_id.name, str(line.statement_id.id))) raise osv.except_osv( _('Error'), _('You cannot do this on an entry generated by a bank statement. '