[IMP] Improved warning messages/exceptions of account modules

bzr revid: pso@tinyerp.com-20120716102355-zrnp539yrp4jfp1k
This commit is contained in:
pso (OpenERP) 2012-07-16 15:53:55 +05:30
commit dbce4a71ef
14 changed files with 33 additions and 33 deletions

View File

@ -2538,7 +2538,7 @@ msgstr ""
#: code:addons/account/account_invoice.py:688
#: code:addons/account/account_move_line.py:173
#, python-format
msgid "You have to define an analytic journal on the '%s' journal!"
msgid "You have to define an analytic journal on the '%s' journal."
msgstr ""
#. module: account

View File

@ -218,7 +218,7 @@ class account_analytic_plan_instance(osv.osv):
pids = ana_plan_instance_obj.search(cr, uid, [('name','=',vals['name']), ('code','=',vals['code']), ('plan_id','<>',False)], context=context)
if pids:
raise osv.except_osv(_('Error'), _('A model having this name and code already exists !'))
raise osv.except_osv(_('Error'), _('A model having same name and code.'))
res = acct_anal_plan_line_obj.search(cr, uid, [('plan_id','=',journal.plan_id.id)], context=context)
for i in res:
@ -231,7 +231,7 @@ class account_analytic_plan_instance(osv.osv):
if acct_anal_acct.search(cr, uid, [('parent_id', 'child_of', [item.root_analytic_id.id]), ('id', '=', tempo[2]['analytic_account_id'])], context=context):
total_per_plan += tempo[2]['rate']
if total_per_plan < item.min_required or total_per_plan > item.max_required:
raise osv.except_osv(_('Value Error'),_('The Total Should be Between %s and %s') % (str(item.min_required), str(item.max_required)))
raise osv.except_osv(_('Value Error'),_('The total should be between %s and %s.') % (str(item.min_required), str(item.max_required)))
return super(account_analytic_plan_instance, self).create(cr, uid, vals, context=context)
@ -338,7 +338,7 @@ class account_move_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
if line.analytics_id:
if not line.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (line.journal_id.name,))
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
toremove = analytic_line_obj.search(cr, uid, [('move_id','=',line.id)], context=context)
if toremove:
@ -482,7 +482,7 @@ class account_bank_statement(osv.osv):
for st_line in st.line_ids:
if st_line.analytics_id:
if not st.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (st.journal_id.name,))
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
if not st_line.amount:
continue
return True

View File

@ -183,13 +183,13 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#, python-format
msgid "A model having this name and code already exists !"
msgid "A model having same name and code."
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "No analytic plan defined !"
msgid "No analytic plan defined."
msgstr ""
#. module: account_analytic_plans
@ -278,7 +278,7 @@ msgstr ""
#: code:addons/account_analytic_plans/account_analytic_plans.py:341
#: code:addons/account_analytic_plans/account_analytic_plans.py:485
#, python-format
msgid "You have to define an analytic journal on the '%s' journal!"
msgid "You have to define an analytic journal on the '%s' journal."
msgstr ""
#. module: account_analytic_plans
@ -362,7 +362,7 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#, python-format
msgid "Please put a name and a code before saving the model !"
msgid "Please put a name and a code before saving the model."
msgstr ""
#. module: account_analytic_plans
@ -426,7 +426,7 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "The Total Should be Between %s and %s"
msgid "The total should be between %s and %s."
msgstr ""
#. module: account_analytic_plans

View File

@ -58,7 +58,7 @@ class account_crossovered_analytic(osv.osv_memory):
flag = False
break
if flag:
raise osv.except_osv(_('User Error'),_('There are no Analytic lines related to Account %s' % name))
raise osv.except_osv(_('User Error'),_('There are no Analytic lines related to Account %s.' % name))
datas = {
'ids': [],

View File

@ -35,10 +35,10 @@ class analytic_plan_create_model(osv.osv_memory):
if 'active_id' in context and context['active_id']:
plan = plan_obj.browse(cr, uid, context['active_id'], context=context)
if (not plan.name) or (not plan.code):
raise osv.except_osv(_('Error'), _('Please put a name and a code before saving the model !'))
raise osv.except_osv(_('Error'), _('Please put a name and a code before saving the model.'))
pids = anlytic_plan_obj.search(cr, uid, [], context=context)
if not pids:
raise osv.except_osv(_('Error'), _('No analytic plan defined !'))
raise osv.except_osv(_('Error'), _('No analytic plan defined.'))
plan_obj.write(cr, uid, [context['active_id']], {'plan_id':pids[0]}, context=context)
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'),('name', '=', 'view_analytic_plan_create_model')], context=context)

View File

@ -270,7 +270,7 @@ class account_asset_asset(osv.osv):
return True
_constraints = [
(_check_recursion, 'Error ! You can not create recursive assets.', ['parent_id']),
(_check_recursion, 'Error ! You cannot create recursive assets.', ['parent_id']),
(_check_prorata, 'Prorata temporis can be applied only for time method "number of depreciations".', ['prorata']),
]

View File

@ -323,7 +323,7 @@ msgstr ""
#. module: account_asset
#: constraint:account.asset.asset:0
msgid "Error ! You can not create recursive assets."
msgid "Error ! You cannot create recursive assets."
msgstr ""
#. module: account_asset

View File

@ -127,7 +127,7 @@ class account_bank_statement_line(osv.osv):
context = {}
if context.get('block_statement_line_delete', False):
raise osv.except_osv(_('Warning'), _('Delete operation not allowed ! \
Please go to the associated bank statement in order to delete and/or modify this bank statement line'))
Please go to the associated bank statement in order to delete and/or modify bank statement line.'))
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
account_bank_statement_line()

View File

@ -112,7 +112,7 @@ msgstr ""
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
#, python-format
msgid "Delete operation not allowed ! Please go to the associated bank statement in order to delete and/or modify this bank statement line"
msgid "Delete operation not allowed ! Please go to the associated bank statement in order to delete and/or modify bank statement line."
msgstr ""
#. module: account_bank_statement_extensions

View File

@ -107,7 +107,7 @@ class account_move_line(osv.osv):
if line.id not in line2bank and line.partner_id.bank_ids:
line2bank[line.id] = line.partner_id.bank_ids[0].id
else:
raise osv.except_osv(_('Error !'), _('No partner defined on entry line'))
raise osv.except_osv(_('Error !'), _('No partner defined on entry line.'))
return line2bank
_columns = {

View File

@ -402,7 +402,7 @@ msgstr ""
#. module: account_payment
#: code:addons/account_payment/account_move_line.py:110
#, python-format
msgid "No partner defined on entry line"
msgid "No partner defined on entry line."
msgstr ""
#. module: account_payment

View File

@ -473,7 +473,7 @@ class account_voucher(osv.osv):
tr_type = 'purchase'
else:
if not journal.default_credit_account_id or not journal.default_debit_account_id:
raise osv.except_osv(_('Error !'), _('Please define default credit/debit accounts on the journal "%s" !') % (journal.name))
raise osv.except_osv(_('Error !'), _('Please define default credit/debit accounts on the journal "%s".') % (journal.name))
account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
tr_type = 'receipt'
@ -822,7 +822,7 @@ class account_voucher(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for t in self.read(cr, uid, ids, ['state'], context=context):
if t['state'] not in ('draft', 'cancel'):
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Voucher(s) which are already opened or paid !'))
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Voucher(s) which are already opened or paid.'))
return super(account_voucher, self).unlink(cr, uid, ids, context=context)
def onchange_payment(self, cr, uid, ids, pay_now, journal_id, partner_id, ttype='sale'):
@ -920,7 +920,7 @@ class account_voucher(osv.osv):
name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=context)
else:
raise osv.except_osv(_('Error !'),
_('Please define a sequence on the journal !'))
_('Please define a sequence on the journal.'))
if not voucher_brw.reference:
ref = name.replace('/','')
else:
@ -952,11 +952,11 @@ class account_voucher(osv.osv):
if amount_residual > 0:
account_id = line.voucher_id.company_id.expense_currency_exchange_account_id
if not account_id:
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! "))
raise osv.except_osv(_('Warning'),_("First configure the 'Income Currency Rate' on the company,after that create accounting entry for currency rate difference."))
else:
account_id = line.voucher_id.company_id.income_currency_exchange_account_id
if not account_id:
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! "))
raise osv.except_osv(_('Warning'),_("First configure the 'Expense Currency Rate' on the company,after that create accounting entry for currency rate difference."))
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
# the receivable/payable account may have a secondary currency, which render this field mandatory
account_currency_id = company_currency <> current_currency and current_currency or False

View File

@ -81,7 +81,7 @@ msgstr ""
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:797
#, python-format
msgid "Cannot delete Voucher(s) which are already opened or paid !"
msgid "Cannot delete Voucher(s) which are already opened or paid."
msgstr ""
#. module: account_voucher
@ -620,8 +620,8 @@ msgstr ""
#: code:addons/account_voucher/account_voucher.py:927
#, python-format
msgid ""
"Unable to create accounting entry for currency rate difference. You have to "
"configure the field 'Income Currency Rate' on the company! "
"First configure the 'Income Currency Rate' on the company,after that create "
"accounting entry for currency rate difference."
msgstr ""
#. module: account_voucher
@ -751,7 +751,7 @@ msgstr ""
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:462
#, python-format
msgid "Please define default credit/debit accounts on the journal \"%s\" !"
msgid "Please define default credit/debit accounts on the journal \"%s\"."
msgstr ""
#. module: account_voucher
@ -762,7 +762,7 @@ msgstr ""
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:895
#, python-format
msgid "Please define a sequence on the journal !"
msgid "Please define a sequence on the journal."
msgstr ""
#. module: account_voucher
@ -1059,8 +1059,8 @@ msgstr ""
#: code:addons/account_voucher/account_voucher.py:931
#, python-format
msgid ""
"Unable to create accounting entry for currency rate difference. You have to "
"configure the field 'Expense Currency Rate' on the company! "
"First configure the 'Expense Currency Rate' on the company,after that create "
"accounting entry for currency rate difference."
msgstr ""
#. module: account_voucher

View File

@ -425,7 +425,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
elif field_type == 'integer':
anonymized_value = 0
elif field_type in ['binary', 'many2many', 'many2one', 'one2many', 'reference']: # cannot anonymize these kind of fields
msg = "Cannot anonymize fields of these types: binary, many2many, many2one, one2many, reference"
msg = "Cannot anonymize fields of these types: binary, many2many, many2one, one2many, reference."
self._raise_after_history_update(cr, uid, history_id, 'Error !', msg)
if anonymized_value is None:
@ -515,7 +515,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
wizards = self.browse(cr, uid, ids, context=context)
for wizard in wizards:
if not wizard.file_import:
msg = "The anonymization export file was not supplied. It is not possible to reverse the anonymization process without this file."
msg = "It is not possible to reverse the anonymization process without supplying anonymization export file."
self._raise_after_history_update(cr, uid, history_id, 'Error !', msg)
# reverse the anonymization: