Pinakin Nayi (OpenERP) has proposed merging
lp:~openerp-commiter/openobject-addons/trunk-fix-server-log-account_log-pna
into lp:~openerp-dev/openobject-addons/trunk-fix-server-log.
Requested reviews:
Bhumika (OpenERP) (sbh-openerp)
For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-fix-server-log-account_log-pna/+merge/111797
Hello Madam,
I Fixed the server error message in Account module.
Thanks,
pna
--
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-fix-server-log-account_log-pna/+merge/111797
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-fix-server-log.
=== modified file 'account/account.py'
--- account/account.py 2012-06-22 06:48:54 +0000
+++ account/account.py 2012-06-25 09:03:20 +0000
@@ -295,7 +295,7 @@
if aml_query.strip():
wheres.append(aml_query.strip())
filters = " AND ".join(wheres)
- _logger.debug('Filters: %s'%filters)
+ _logger.debug('Filters: %s',(filters))
# IN might not work ideally in case there are too many
# children_and_consolidated, in that case join on a
# values() e.g.:
@@ -311,7 +311,7 @@
" GROUP BY l.account_id")
params = (tuple(children_and_consolidated),) + query_params
cr.execute(request, params)
- _logger.debug('Status: %s'%cr.statusmessage)
+ _logger.debug('Status: %s',(cr.statusmessage))
for res in cr.dictfetchall():
accounts[res['id']] = res
@@ -1049,7 +1049,7 @@
args.append(('company_id', '=', company_id))
ids = self.search(cr, uid, args, context=context)
if not ids:
- raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create one.')%dt)
+ raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create one.')%(dt))
return ids
def action_draft(self, cr, uid, ids, *args):
@@ -1441,7 +1441,7 @@
if move['state'] != 'draft':
raise osv.except_osv(_('UserError'),
_('You can not delete a posted journal entry "%s"!') % \
- move['name'])
+ (move['name']))
line_ids = map(lambda x: x.id, move.line_id)
context['journal_id'] = move.journal_id.id
context['period_id'] = move.period_id.id
@@ -1470,14 +1470,14 @@
if not account_id:
raise osv.except_osv(_('UserError'),
_('There is no default default debit account defined \n' \
- 'on journal "%s"') % move.journal_id.name)
+ 'on journal "%s"') % (move.journal_id.name))
else:
account_id = move.journal_id.default_credit_account_id.id
mode2 = 'credit'
if not account_id:
raise osv.except_osv(_('UserError'),
_('There is no default default credit account defined \n' \
- 'on journal "%s"') % move.journal_id.name)
+ 'on journal "%s"') % (move.journal_id.name))
# find the first line of this move with the current mode
# or create it if it doesn't exist
=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py 2012-05-23 04:57:07 +0000
+++ account/account_bank_statement.py 2012-06-25 09:03:20 +0000
@@ -300,7 +300,7 @@
context=context):
if line.state <> 'valid':
raise osv.except_osv(_('Error !'),
- _('Journal item "%s" is not valid.') % line.name)
+ _('Journal item "%s" is not valid.') % (line.name))
# Bank statements will not consider boolean on journal entry_posted
account_move_obj.post(cr, uid, [move_id], context=context)
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-06-15 13:49:45 +0000
+++ account/account_move_line.py 2012-06-25 09:03:20 +0000
@@ -1209,9 +1209,9 @@
for line in self.browse(cr, uid, ids, context=context):
err_msg = _('Move name (id): %s (%s)') % (line.move_id.name, str(line.move_id.id))
if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted):
- raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n%s') % err_msg)
+ raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n%s') % (err_msg))
if line.reconcile_id:
- raise osv.except_osv(_('Error !'), _('You can not do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n%s') % err_msg)
+ raise osv.except_osv(_('Error !'), _('You can not do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n%s') % (err_msg))
t = (line.journal_id.id, line.period_id.id)
if t not in done:
self._update_journal_check(cr, uid, line.journal_id.id, line.period_id.id, context)
=== modified file 'account/res_currency.py'
--- account/res_currency.py 2011-01-14 00:11:01 +0000
+++ account/res_currency.py 2012-06-25 09:03:20 +0000
@@ -34,7 +34,7 @@
if account and account.currency_mode == 'average' and account.currency_id:
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
cr.execute('select sum(debit-credit),sum(amount_currency) from account_move_line l ' \
- 'where l.currency_id=%s and l.account_id=%s and '+query, (account.currency_id.id,account.id,))
+ 'where l.currency_id= %s and l.account_id=%s and '+query, (account.currency_id.id,account.id,))
tot1,tot2 = cr.fetchone()
if tot2 and not account_invert:
rate = float(tot1)/float(tot2)
=== modified file 'account/wizard/account_move_journal.py'
--- account/wizard/account_move_journal.py 2012-06-09 13:50:41 +0000
+++ account/wizard/account_move_journal.py 2012-06-25 09:03:20 +0000
@@ -93,14 +93,14 @@
journal = False
if journal_id:
journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name']
- journal_string = _("Journal: %s") % tools.ustr(journal)
+ journal_string = _("Journal: %s") % (tools.ustr(journal))
else:
journal_string = _("Journal: All")
period = False
if period_id:
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
- period_string = _("Period: %s") % tools.ustr(period)
+ period_string = _("Period: %s") % (tools.ustr(period))
separator_string = _("Open Journal Items !")
cancel_string = _("Cancel")
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp