[IMP] Improved warning messages for account* modules
bzr revid: pso@tinyerp.com-20120725113900-sx79bzkhh9812hib
This commit is contained in:
parent
4c4055a4e0
commit
c59e7ab9d0
|
@ -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)
|
pids = ana_plan_instance_obj.search(cr, uid, [('name','=',vals['name']), ('code','=',vals['code']), ('plan_id','<>',False)], context=context)
|
||||||
if pids:
|
if pids:
|
||||||
raise osv.except_osv(_('Error'), _('A model having same name and code.'))
|
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)
|
res = acct_anal_plan_line_obj.search(cr, uid, [('plan_id','=',journal.plan_id.id)], context=context)
|
||||||
for i in res:
|
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):
|
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']
|
total_per_plan += tempo[2]['rate']
|
||||||
if total_per_plan < item.min_required or total_per_plan > item.max_required:
|
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)
|
return super(account_analytic_plan_instance, self).create(cr, uid, vals, context=context)
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ msgstr ""
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
|
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "User Error"
|
msgid "User Error!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
|
@ -189,7 +189,7 @@ msgstr ""
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
|
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "No analytic plan defined."
|
msgid "Please define analytic plan."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
|
@ -341,7 +341,7 @@ msgstr ""
|
||||||
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
|
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
|
||||||
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
|
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Error"
|
msgid "Error!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
|
@ -351,7 +351,7 @@ msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: constraint:account.move.line:0
|
#: constraint:account.move.line:0
|
||||||
msgid "You can not create journal items on an account of type view."
|
msgid "You cannot create journal items on an account of type view."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
|
@ -394,7 +394,7 @@ msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: constraint:account.analytic.line:0
|
#: constraint:account.analytic.line:0
|
||||||
msgid "You can not create analytic line on view account."
|
msgid "You cannot create analytic line on view account."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
|
@ -502,7 +502,7 @@ msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: constraint:account.move.line:0
|
#: constraint:account.move.line:0
|
||||||
msgid "You can not create journal items on closed account."
|
msgid "You cannot create journal items on closed account."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
|
@ -523,6 +523,6 @@ msgstr ""
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
|
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Value Error"
|
msgid "Value Error!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class account_crossovered_analytic(osv.osv_memory):
|
||||||
flag = False
|
flag = False
|
||||||
break
|
break
|
||||||
if flag:
|
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 = {
|
datas = {
|
||||||
'ids': [],
|
'ids': [],
|
||||||
|
|
|
@ -35,10 +35,10 @@ class analytic_plan_create_model(osv.osv_memory):
|
||||||
if 'active_id' in context and context['active_id']:
|
if 'active_id' in context and context['active_id']:
|
||||||
plan = plan_obj.browse(cr, uid, context['active_id'], context=context)
|
plan = plan_obj.browse(cr, uid, context['active_id'], context=context)
|
||||||
if (not plan.name) or (not plan.code):
|
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)
|
pids = anlytic_plan_obj.search(cr, uid, [], context=context)
|
||||||
if not pids:
|
if not pids:
|
||||||
raise osv.except_osv(_('Error'), _('No analytic plan defined.'))
|
raise osv.except_osv(_('Error!'), _('Please define analytic plan.'))
|
||||||
plan_obj.write(cr, uid, [context['active_id']], {'plan_id':pids[0]}, context=context)
|
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)
|
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'),('name', '=', 'view_analytic_plan_create_model')], context=context)
|
||||||
|
|
|
@ -127,7 +127,7 @@ class account_bank_statement_line(osv.osv):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
if context.get('block_statement_line_delete', False):
|
if context.get('block_statement_line_delete', False):
|
||||||
raise osv.except_osv(_('Warning'), _('Delete operation not allowed ! \
|
raise osv.except_osv(_('Warning!'), _('Delete operation not allowed ! \
|
||||||
Please go to the associated bank statement in order to delete and/or modify 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)
|
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ msgstr ""
|
||||||
#. module: account_bank_statement_extensions
|
#. module: account_bank_statement_extensions
|
||||||
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
|
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Warning"
|
msgid "Warning!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_bank_statement_extensions
|
#. module: account_bank_statement_extensions
|
||||||
|
|
|
@ -107,7 +107,7 @@ class account_move_line(osv.osv):
|
||||||
if line.id not in line2bank and line.partner_id.bank_ids:
|
if line.id not in line2bank and line.partner_id.bank_ids:
|
||||||
line2bank[line.id] = line.partner_id.bank_ids[0].id
|
line2bank[line.id] = line.partner_id.bank_ids[0].id
|
||||||
else:
|
else:
|
||||||
raise osv.except_osv(_('Error !'), _('No partner defined on entry line.'))
|
raise osv.except_osv(_('Error !'), _('No partner is defined on entry line.'))
|
||||||
return line2bank
|
return line2bank
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
|
|
|
@ -71,8 +71,8 @@ class payment_order(osv.osv):
|
||||||
#dead code
|
#dead code
|
||||||
def get_wizard(self, type):
|
def get_wizard(self, type):
|
||||||
logger = netsvc.Logger()
|
logger = netsvc.Logger()
|
||||||
logger.notifyChannel("warning", netsvc.LOG_WARNING,
|
logger.notifyChannel("Warning!", netsvc.LOG_WARNING,
|
||||||
"No wizard found for the payment type '%s'." % type)
|
"No wizard is found for the payment type '%s'." % type)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _total(self, cursor, user, ids, name, args, context=None):
|
def _total(self, cursor, user, ids, name, args, context=None):
|
||||||
|
|
|
@ -402,7 +402,7 @@ msgstr ""
|
||||||
#. module: account_payment
|
#. module: account_payment
|
||||||
#: code:addons/account_payment/account_move_line.py:110
|
#: code:addons/account_payment/account_move_line.py:110
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "No partner defined on entry line."
|
msgid "No partner is defined on entry line."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_payment
|
#. module: account_payment
|
||||||
|
|
|
@ -952,11 +952,11 @@ class account_voucher(osv.osv):
|
||||||
if amount_residual > 0:
|
if amount_residual > 0:
|
||||||
account_id = line.voucher_id.company_id.expense_currency_exchange_account_id
|
account_id = line.voucher_id.company_id.expense_currency_exchange_account_id
|
||||||
if not account_id:
|
if not account_id:
|
||||||
raise osv.except_osv(_('Warning'),_("First configure the 'Income Currency Rate' on the company,after that create accounting entry for currency rate difference."))
|
raise osv.except_osv(_('Warning!'),_("First configure the 'Income Currency Rate' on the company,after that create accounting entry for currency rate difference."))
|
||||||
else:
|
else:
|
||||||
account_id = line.voucher_id.company_id.income_currency_exchange_account_id
|
account_id = line.voucher_id.company_id.income_currency_exchange_account_id
|
||||||
if not account_id:
|
if not account_id:
|
||||||
raise osv.except_osv(_('Warning'),_("First configure the 'Expense Currency Rate' on the company,after that create accounting entry for currency rate difference."))
|
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
|
# 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
|
# 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
|
account_currency_id = company_currency <> current_currency and current_currency or False
|
||||||
|
@ -1516,7 +1516,7 @@ class account_bank_statement_line(osv.osv):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
_constraints = [
|
_constraints = [
|
||||||
(_check_amount, 'The amount of the voucher must be the same amount as the one on the statement line', ['amount']),
|
(_check_amount, 'The amount of the voucher must be the same amount as the one on the statement line.', ['amount']),
|
||||||
]
|
]
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
|
|
|
@ -299,7 +299,7 @@ msgstr ""
|
||||||
#: code:addons/account_voucher/account_voucher.py:927
|
#: code:addons/account_voucher/account_voucher.py:927
|
||||||
#: code:addons/account_voucher/account_voucher.py:931
|
#: code:addons/account_voucher/account_voucher.py:931
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Warning"
|
msgid "Warning!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
|
@ -346,7 +346,7 @@ msgstr ""
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: constraint:res.company:0
|
#: constraint:res.company:0
|
||||||
msgid "Error! You can not create recursive companies."
|
msgid "Error! You cannot create recursive companies."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
|
@ -520,7 +520,7 @@ msgstr ""
|
||||||
#: constraint:account.bank.statement.line:0
|
#: constraint:account.bank.statement.line:0
|
||||||
msgid ""
|
msgid ""
|
||||||
"The amount of the voucher must be the same amount as the one on the "
|
"The amount of the voucher must be the same amount as the one on the "
|
||||||
"statement line"
|
"statement line."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
|
|
|
@ -453,9 +453,9 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||||
# add a result message in the wizard:
|
# add a result message in the wizard:
|
||||||
msgs = ["Anonymization successful.",
|
msgs = ["Anonymization successful.",
|
||||||
"",
|
"",
|
||||||
"Don't forget to save the resulting file to a safe place because you will not be able to revert the anonymization without this file.",
|
"Donot forget to save the resulting file to a safe place because you will not be able to revert the anonymization without this file.",
|
||||||
"",
|
"",
|
||||||
"This file is also stored in the %s directory. The absolute file path is: %s",
|
"This file is also stored in the %s directory. The absolute file path is: %s.",
|
||||||
]
|
]
|
||||||
msg = '\n'.join(msgs) % (dirpath, abs_filepath)
|
msg = '\n'.join(msgs) % (dirpath, abs_filepath)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue