From 8a64e7580a03db9065ca8a82c6aae31875b7f840 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Tue, 7 Aug 2012 13:31:37 +0200 Subject: [PATCH] [IMP] all the error messages now start with 'Error\!' (not 'Error' or 'Error \!') bzr revid: abo@openerp.com-20120807113137-44vehm0mthqawlo3 --- addons/account/account_analytic_line.py | 4 +- addons/account/account_bank_statement.py | 6 +-- addons/account/account_cash_statement.py | 6 +-- addons/account/account_invoice.py | 6 +-- addons/account/account_move_line.py | 16 ++++---- .../wizard/account_financial_report.py | 2 +- .../account/wizard/account_invoice_refund.py | 4 +- .../wizard/account_open_closed_fiscalyear.py | 2 +- addons/account/wizard/account_use_model.py | 2 +- addons/account/wizard/pos_box.py | 4 +- addons/account_payment/account_move_line.py | 2 +- addons/account_voucher/account_voucher.py | 4 +- addons/analytic/analytic.py | 2 +- .../analytic_user_function.py | 4 +- .../wizard/base_module_save.py | 2 +- addons/base_status/base_stage.py | 2 +- addons/base_vat/base_vat.py | 2 +- addons/caldav/calendar.py | 2 +- addons/crm/crm_lead.py | 2 +- .../wizard/google_login.py | 2 +- addons/hr_expense/hr_expense.py | 4 +- .../wizard/hr_holidays_summary_department.py | 2 +- addons/hr_payroll/hr_payroll.py | 10 ++--- .../hr_recruitment_create_partner_job.py | 4 +- .../hr_timesheet_invoice.py | 2 +- .../wizard/hr_timesheet_invoice_create.py | 2 +- .../wizard/hr_timesheet_current.py | 2 +- .../wizard/import_google_data.py | 4 +- addons/import_sugarcrm/import_sugarcrm.py | 2 +- addons/import_sugarcrm/sugar.py | 2 +- addons/l10n_ch/wizard/create_dta.py | 38 +++++++++---------- addons/l10n_fr_rib/bank.py | 4 +- addons/membership/membership.py | 4 +- addons/mrp_repair/mrp_repair.py | 8 ++-- addons/point_of_sale/point_of_sale.py | 8 ++-- addons/point_of_sale/report/pos_invoice.py | 2 +- addons/point_of_sale/wizard/pos_box.py | 2 +- .../point_of_sale/wizard/pos_box_entries.py | 6 +-- addons/point_of_sale/wizard/pos_box_out.py | 4 +- addons/product/product.py | 2 +- .../project_gtd/wizard/project_gtd_empty.py | 2 +- addons/purchase/purchase.py | 6 +-- .../purchase/wizard/purchase_line_invoice.py | 2 +- addons/sale/sale.py | 10 ++--- .../sale/wizard/sale_make_invoice_advance.py | 2 +- addons/stock/report/report_stock.py | 4 +- addons/stock/stock.py | 8 ++-- .../wizard/stock_planning_createlines.py | 2 +- .../wizard/stock_planning_forecast.py | 2 +- addons/subscription/subscription.py | 2 +- 50 files changed, 114 insertions(+), 114 deletions(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index e56629644ea..2117f6e49ea 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -87,7 +87,7 @@ class account_analytic_line(osv.osv): if not a: a = prod.categ_id.property_account_expense_categ.id if not a: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no expense account defined ' \ 'for this product: "%s" (id:%d).') % \ (prod.name, prod.id,)) @@ -96,7 +96,7 @@ class account_analytic_line(osv.osv): if not a: a = prod.categ_id.property_account_income_categ.id if not a: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no income account defined ' \ 'for this product: "%s" (id:%d).') % \ (prod.name, prod_id,)) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 1011abb7727..8df291a98d1 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -364,7 +364,7 @@ class account_bank_statement(osv.osv): context=context).line_id], context=context): if line.state <> 'valid': - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('Journal item "%s" is not valid.') % line.name) # Bank statements will not consider boolean on journal entry_posted @@ -377,7 +377,7 @@ class account_bank_statement(osv.osv): def balance_check(self, cr, uid, st_id, journal_type='bank', context=None): st = self.browse(cr, uid, st_id, context=context) if not ((abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001) or (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001)): - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('The statement balance is incorrect !\nThe expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end)) return True @@ -415,7 +415,7 @@ class account_bank_statement(osv.osv): for line in st.move_line_ids: if line.state <> 'valid': - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('The account entries lines are not in valid state.')) for st_line in st.line_ids: if st_line.analytic_account_id: diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index af0a772e239..27c3203b147 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -238,7 +238,7 @@ class account_cash_statement(osv.osv): for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} if not self._user_allow(cr, uid, statement.id, context=context): - raise osv.except_osv(_('Error !'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, ))) + raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, ))) if statement.name and statement.name == '/': c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id} @@ -260,7 +260,7 @@ class account_cash_statement(osv.osv): if journal_type == 'bank': return super(account_cash_statement, self).balance_check(cr, uid, cash_id, journal_type, context) if not self._equal_balance(cr, uid, cash_id, context): - raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on the cash register.')) + raise osv.except_osv(_('Error!'), _('The closing balance should be equal to compute balance on the cash register.')) return True def statement_close(self, cr, uid, ids, journal_type='bank', context=None): @@ -289,7 +289,7 @@ class account_cash_statement(osv.osv): for item_label, item_account in TALBES: if getattr(obj.journal_id, item_account): - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no %s Account on the journal %s.') % (item_label, obj.journal_id.name,)) is_profit = obj.difference < 0.0 diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 7c1607cb73e..053257308ef 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -835,7 +835,7 @@ class account_invoice(osv.osv): context = {} for inv in self.browse(cr, uid, ids, context=context): if not inv.journal_id.sequence_id: - raise osv.except_osv(_('Error !'), _('Please define sequence on the journal related to this invoice.')) + raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.')) if not inv.invoice_line: raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.')) if inv.move_id: @@ -866,7 +866,7 @@ class account_invoice(osv.osv): total_percent += line.value_amount total_fixed = (total_fixed * 100) / (inv.amount_total or 1.0) if (total_fixed + total_percent) > 100: - raise osv.except_osv(_('Error !'), _("Cannot create the invoice.\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. In order to avoid rounding issues, the latest line of your payment term must be of type 'balance'.")) + raise osv.except_osv(_('Error!'), _("Cannot create the invoice.\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. In order to avoid rounding issues, the latest line of your payment term must be of type 'balance'.")) # one move line per tax line iml += ait_obj.move_line_get(cr, uid, inv.id) @@ -1061,7 +1061,7 @@ class account_invoice(osv.osv): pay_ids = account_move_line_obj.browse(cr, uid, i['payment_ids']) for move_line in pay_ids: if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids: - raise osv.except_osv(_('Error !'), _('You cannot cancel an invoice which is partially paid. You need to unreconcile related payment entries first.')) + raise osv.except_osv(_('Error!'), _('You cannot cancel an invoice which is partially paid. You need to unreconcile related payment entries first.')) # First, set the invoices as cancelled and detach the move ids self.write(cr, uid, ids, {'state':'cancel', 'move_id':False}) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index ad4c023b919..d6c2124788c 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -577,14 +577,14 @@ class account_move_line(osv.osv): lines = self.browse(cr, uid, ids, context=context) for l in lines: if l.account_id.type == 'view': - raise osv.except_osv(_('Error !'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) + raise osv.except_osv(_('Error!'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) return True def _check_no_closed(self, cr, uid, ids, context=None): lines = self.browse(cr, uid, ids, context=context) for l in lines: if l.account_id.type == 'closed': - raise osv.except_osv(_('Error !'), _('You cannot create journal items on a closed account %s %s.') % (l.account_id.code, l.account_id.name)) + raise osv.except_osv(_('Error!'), _('You cannot create journal items on a closed account %s %s.') % (l.account_id.code, l.account_id.name)) return True def _check_company_id(self, cr, uid, ids, context=None): @@ -800,7 +800,7 @@ class account_move_line(osv.osv): company_list.append(line.company_id.id) for line in unrec_lines: if line.state <> 'valid': - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('Entry "%s" is not valid !') % line.name) credit += line['credit'] debit += line['debit'] @@ -823,10 +823,10 @@ class account_move_line(osv.osv): r = cr.fetchall() #TODO: move this check to a constraint in the account_move_reconcile object if not unrec_lines: - raise osv.except_osv(_('Error !'), _('Entry is already reconciled.')) + raise osv.except_osv(_('Error!'), _('Entry is already reconciled.')) account = account_obj.browse(cr, uid, account_id, context=context) if r[0][1] != None: - raise osv.except_osv(_('Error !'), _('Some entries are already reconciled.')) + raise osv.except_osv(_('Error!'), _('Some entries are already reconciled.')) if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \ (account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))): @@ -1186,7 +1186,7 @@ class account_move_line(osv.osv): result = cr.fetchall() for (state,) in result: if state == 'done': - raise osv.except_osv(_('Error !'), _('You cannot add/modify entries in a closed journal.')) + raise osv.except_osv(_('Error!'), _('You cannot add/modify entries in a closed journal.')) if not result: journal = journal_obj.browse(cr, uid, journal_id, context=context) period = period_obj.browse(cr, uid, period_id, context=context) @@ -1202,9 +1202,9 @@ class account_move_line(osv.osv): 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 cannot 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 cannot 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 cannot 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 cannot 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) diff --git a/addons/account/wizard/account_financial_report.py b/addons/account/wizard/account_financial_report.py index f96127f6375..4f9d6abf099 100644 --- a/addons/account/wizard/account_financial_report.py +++ b/addons/account/wizard/account_financial_report.py @@ -67,7 +67,7 @@ class accounting_report(osv.osv_memory): result['date_to'] = data['form']['date_to_cmp'] elif data['form']['filter_cmp'] == 'filter_period': if not data['form']['period_from_cmp'] or not data['form']['period_to_cmp']: - raise osv.except_osv(_('Error'),_('Select a starting and an ending period')) + raise osv.except_osv(_('Error!'),_('Select a starting and an ending period')) result['period_from'] = data['form']['period_from_cmp'] result['period_to'] = data['form']['period_to_cmp'] return result diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index f872607c763..b7d278b8849 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -106,9 +106,9 @@ class account_invoice_refund(osv.osv_memory): journal_id = form.journal_id.id for inv in inv_obj.browse(cr, uid, context.get('active_ids'), context=context): if inv.state in ['draft', 'proforma2', 'cancel']: - raise osv.except_osv(_('Error !'), _('Cannot %s draft/proforma/cancel invoice.') % (mode)) + raise osv.except_osv(_('Error!'), _('Cannot %s draft/proforma/cancel invoice.') % (mode)) if inv.reconciled and mode in ('cancel', 'modify'): - raise osv.except_osv(_('Error !'), _('Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only refund this invoice.') % (mode)) + raise osv.except_osv(_('Error!'), _('Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only refund this invoice.') % (mode)) if form.period.id: period = form.period.id else: diff --git a/addons/account/wizard/account_open_closed_fiscalyear.py b/addons/account/wizard/account_open_closed_fiscalyear.py index ac344a88eac..b8d64fac0b5 100644 --- a/addons/account/wizard/account_open_closed_fiscalyear.py +++ b/addons/account/wizard/account_open_closed_fiscalyear.py @@ -36,7 +36,7 @@ class account_open_closed_fiscalyear(osv.osv_memory): data = self.browse(cr, uid, ids, context=context)[0] period_journal = data.fyear_id.end_journal_period_id or False if not period_journal: - raise osv.except_osv(_('Error !'), _('You have to set the end of the fiscal year for this journal.')) + raise osv.except_osv(_('Error!'), _('You have to set the end of the fiscal year for this journal.')) ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)]) if ids_move: diff --git a/addons/account/wizard/account_use_model.py b/addons/account/wizard/account_use_model.py index 4fb77cb3397..7ce73caba55 100644 --- a/addons/account/wizard/account_use_model.py +++ b/addons/account/wizard/account_use_model.py @@ -41,7 +41,7 @@ class account_use_model(osv.osv_memory): for line in model.lines_id: if line.date_maturity == 'partner': if not line.partner_id: - raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' is based on partner payment term!"\ + raise osv.except_osv(_('Error!'), _("Maturity date of entry line generated by model line '%s' is based on partner payment term!"\ "\nPlease define partner on it!")%line.name) pass diff --git a/addons/account/wizard/pos_box.py b/addons/account/wizard/pos_box.py index 12a606833a1..b4254b5ba84 100644 --- a/addons/account/wizard/pos_box.py +++ b/addons/account/wizard/pos_box.py @@ -29,11 +29,11 @@ class CashBox(osv.osv_memory): for box in self.browse(cr, uid, ids, context=context): for record in records: if not record.journal_id: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _("Please check that the field 'Journal' is set on the Bank Statement")) if not record.journal_id.internal_account_id: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _("Please check that the field 'Internal Transfers Account' is set on the payment method '%s'.") % (record.journal_id.name,)) self._create_bank_statement_line(cr, uid, box, record, context=context) diff --git a/addons/account_payment/account_move_line.py b/addons/account_payment/account_move_line.py index b7bf0f852ef..cbbeb949b3c 100644 --- a/addons/account_payment/account_move_line.py +++ b/addons/account_payment/account_move_line.py @@ -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 !'), _('There is no partner defined on the entry line.')) + raise osv.except_osv(_('Error!'), _('There is no partner defined on the entry line.')) return line2bank _columns = { diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 2b2c0c5d200..ce0c64337b9 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -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' @@ -919,7 +919,7 @@ class account_voucher(osv.osv): elif voucher_brw.journal_id.sequence_id: name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=context) else: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('Please define a sequence on the journal.')) if not voucher_brw.reference: ref = name.replace('/','') diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 0e968981d42..165af37888d 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -140,7 +140,7 @@ class account_analytic_account(osv.osv): for account in self.browse(cr, uid, ids, context=context): if account.company_id: if account.company_id.currency_id.id != value: - raise osv.except_osv(_('Error !'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example.")) + raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example.")) return cr.execute("""update account_analytic_account set currency_id=%s where id=%s""", (value, account.id, )) def _currency(self, cr, uid, ids, field_name, arg, context=None): diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index cfb1aba10d1..9233845f7eb 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -92,7 +92,7 @@ class hr_analytic_timesheet(osv.osv): if not a: a = r.product_id.categ_id.property_account_expense_categ.id if not a: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no expense account define ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) @@ -127,7 +127,7 @@ class hr_analytic_timesheet(osv.osv): if not a: a = r.product_id.categ_id.property_account_expense_categ.id if not a: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no expense account define ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) diff --git a/addons/base_module_record/wizard/base_module_save.py b/addons/base_module_record/wizard/base_module_save.py index 1d54e212a28..5e557472f7e 100644 --- a/addons/base_module_record/wizard/base_module_save.py +++ b/addons/base_module_record/wizard/base_module_save.py @@ -33,7 +33,7 @@ def _create_yaml(self, cr, uid, data, context=None): try: res_xml = mod.generate_yaml(cr, uid) except Exception, e: - raise osv.except_osv(_('Error'),_(str(e))) + raise osv.except_osv(_('Error!'),_(str(e))) return { 'yaml_file': base64.encodestring(res_xml), } diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py index af9e2366373..44e9de89162 100644 --- a/addons/base_status/base_stage.py +++ b/addons/base_status/base_stage.py @@ -202,7 +202,7 @@ class base_stage(object): if case.section_id.parent_id.user_id: data['user_id'] = case.section_id.parent_id.user_id.id else: - raise osv.except_osv(_('Error !'), _("You are already at the top level of your sales-team category.\nTherefore you cannot escalate furthermore.")) + raise osv.except_osv(_('Error!'), _("You are already at the top level of your sales-team category.\nTherefore you cannot escalate furthermore.")) self.write(cr, uid, [case.id], data, context=context) case.case_escalate_send_note(case.section_id.parent_id, context=context) cases = self.browse(cr, uid, ids, context=context) diff --git a/addons/base_vat/base_vat.py b/addons/base_vat/base_vat.py index e76442b62fe..ed2004ced08 100644 --- a/addons/base_vat/base_vat.py +++ b/addons/base_vat/base_vat.py @@ -108,7 +108,7 @@ class res_partner(osv.osv): def button_check_vat(self, cr, uid, ids, context=None): if not self.check_vat(cr, uid, ids, context=context): msg = self._construct_constraint_msg(cr, uid, ids, context=context) - raise osv.except_osv(_('Error'), msg) + raise osv.except_osv(_('Error!'), msg) def check_vat(self, cr, uid, ids, context=None): user_company = self.pool.get('res.users').browse(cr, uid, uid).company_id diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index 73ae3b3b809..2380fe7d1e8 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -1290,7 +1290,7 @@ class Attendee(CalDAV, osv.osv_memory): attendee_add.params['CN'] = cn_val if not attendee['email']: attendee_add.value = 'MAILTO:' - #raise osv.except_osv(_('Error !'), _('Attendee must have an Email Id')) + #raise osv.except_osv(_('Error!'), _('Attendee must have an Email Id')) elif attendee['email']: attendee_add.value = 'MAILTO:' + attendee['email'] return vevent diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index e4a6b0980d7..3b54ddf2006 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -788,7 +788,7 @@ class crm_lead(base_stage, osv.osv): def unlink(self, cr, uid, ids, context=None): for lead in self.browse(cr, uid, ids, context): if (not lead.section_id.allow_unlink) and (lead.state != 'draft'): - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _("You cannot delete lead '%s' because it is not in 'Draft' state. " \ "You can still cancel it, instead of deleting it.") % lead.name) return super(crm_lead, self).unlink(cr, uid, ids, context) diff --git a/addons/google_base_account/wizard/google_login.py b/addons/google_base_account/wizard/google_login.py index 98fe17a4343..c502f101f07 100644 --- a/addons/google_base_account/wizard/google_login.py +++ b/addons/google_base_account/wizard/google_login.py @@ -74,7 +74,7 @@ class google_login(osv.osv_memory): } self.pool.get('res.users').write(cr, uid, uid, res, context=context) else: - raise osv.except_osv(_('Error'), _("Authentication failed. Check the user and password.")) + raise osv.except_osv(_('Error!'), _("Authentication failed. Check the user and password.")) return self._get_next_action(cr, uid, context=context) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 242794b4147..c690b91bb54 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -171,7 +171,7 @@ class hr_expense_expense(osv.osv): else: acc = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category', context={'force_company': company_id}) if not acc: - raise osv.except_osv(_('Error !'), _('Please configure Default Expense account for Product purchase: `property_account_expense_categ`.')) + raise osv.except_osv(_('Error!'), _('Please configure Default Expense account for Product purchase: `property_account_expense_categ`.')) lines.append((0, False, { 'name': l.name, 'account_id': acc.id, @@ -183,7 +183,7 @@ class hr_expense_expense(osv.osv): 'account_analytic_id': l.analytic_account.id, })) if not exp.employee_id.address_home_id: - raise osv.except_osv(_('Error !'), _('The employee must have a home address.')) + raise osv.except_osv(_('Error!'), _('The employee must have a home address.')) acc = exp.employee_id.address_home_id.property_account_payable.id payment_term_id = exp.employee_id.address_home_id.property_payment_term.id inv = { diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department.py b/addons/hr_holidays/wizard/hr_holidays_summary_department.py index beb233f55e8..efd64c88500 100644 --- a/addons/hr_holidays/wizard/hr_holidays_summary_department.py +++ b/addons/hr_holidays/wizard/hr_holidays_summary_department.py @@ -41,7 +41,7 @@ class hr_holidays_summary_dept(osv.osv_memory): def print_report(self, cr, uid, ids, context=None): data = self.read(cr, uid, ids, [], context=context)[0] if not data['depts']: - raise osv.except_osv(_('Error !'), _('You have to select at least one Department. And try again.')) + raise osv.except_osv(_('Error!'), _('You have to select at least one Department. And try again.')) datas = { 'ids': [], 'model': 'ir.ui.menu', diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 173593b60e4..c82c6db446b 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -859,18 +859,18 @@ result = rules.NET > categories.NET * 0.10''', try: return rule.amount_fix, eval(rule.quantity, localdict), 100.0 except: - raise osv.except_osv(_('Error !'), _('Wrong quantity defined for salary rule %s (%s).')% (rule.name, rule.code)) + raise osv.except_osv(_('Error!'), _('Wrong quantity defined for salary rule %s (%s).')% (rule.name, rule.code)) elif rule.amount_select == 'percentage': try: return eval(rule.amount_percentage_base, localdict), eval(rule.quantity, localdict), rule.amount_percentage except: - raise osv.except_osv(_('Error !'), _('Wrong percentage base or quantity defined for salary rule %s (%s).')% (rule.name, rule.code)) + raise osv.except_osv(_('Error!'), _('Wrong percentage base or quantity defined for salary rule %s (%s).')% (rule.name, rule.code)) else: try: eval(rule.amount_python_compute, localdict, mode='exec', nocopy=True) return localdict['result'], 'result_qty' in localdict and localdict['result_qty'] or 1.0, 'result_rate' in localdict and localdict['result_rate'] or 100.0 except: - raise osv.except_osv(_('Error !'), _('Wrong python code defined for salary rule %s (%s).')% (rule.name, rule.code)) + raise osv.except_osv(_('Error!'), _('Wrong python code defined for salary rule %s (%s).')% (rule.name, rule.code)) def satisfy_condition(self, cr, uid, rule_id, localdict, context=None): """ @@ -887,13 +887,13 @@ result = rules.NET > categories.NET * 0.10''', result = eval(rule.condition_range, localdict) return rule.condition_range_min <= result and result <= rule.condition_range_max or False except: - raise osv.except_osv(_('Error !'), _('Wrong range condition defined for salary rule %s (%s).')% (rule.name, rule.code)) + raise osv.except_osv(_('Error!'), _('Wrong range condition defined for salary rule %s (%s).')% (rule.name, rule.code)) else: #python code try: eval(rule.condition_python, localdict, mode='exec', nocopy=True) return 'result' in localdict and localdict['result'] or False except: - raise osv.except_osv(_('Error !'), _('Wrong python condition defined for salary rule %s (%s).')% (rule.name, rule.code)) + raise osv.except_osv(_('Error!'), _('Wrong python condition defined for salary rule %s (%s).')% (rule.name, rule.code)) hr_salary_rule() diff --git a/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py b/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py index ef44a4e253d..418a42bef93 100644 --- a/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py +++ b/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py @@ -35,7 +35,7 @@ class hr_recruitment_partner_create(osv.osv_memory): context = {} for case in case_obj.browse(cr, uid, context['active_ids'], context=context): if case.partner_id: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('A contact is already defined on this job request.')) pass @@ -53,7 +53,7 @@ class hr_recruitment_partner_create(osv.osv_memory): for case in case_obj.browse(cr, uid, context['active_ids'], context=context): partner_id = partner_obj.search(cr, uid, [('name', '=', case.partner_name or case.name)], context=context) if partner_id: - raise osv.except_osv(_('Error !'),_('A contact is already existing with the same name.')) + raise osv.except_osv(_('Error!'),_('A contact is already existing with the same name.')) partner_id = partner_obj.create(cr, uid, { 'name': case.partner_name or case.name, 'user_id': case.user_id.id, diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index a4f08a854ec..4cba4a18680 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -157,7 +157,7 @@ class account_analytic_line(osv.osv): if ( not vals.has_key('invoice_id')) or vals['invoice_id' ] == False: for line in self.browse(cr, uid, select): if line.invoice_id: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('You cannot modify an invoiced analytic line!')) return True diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py index 7a03b9bb8af..aa4a54c9216 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -101,7 +101,7 @@ class account_analytic_line(osv.osv): product_id = data['product'][0] product = product_obj.browse(cr, uid, product_id, context=context2) if not product: - raise osv.except_osv(_('Error'), _('There is no product defined for the line %s. Please select one or force the product through the wizard.') % (line_name)) + raise osv.except_osv(_('Error!'), _('There is no product defined for the line %s. Please select one or force the product through the wizard.') % (line_name)) factor = invoice_factor_obj.browse(cr, uid, factor_id, context=context2) factor_name = product_obj.name_get(cr, uid, [product_id], context=context2)[0][1] if factor.customer_name: diff --git a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py index ec0c70d1349..fdab774a250 100644 --- a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py +++ b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py @@ -35,7 +35,7 @@ class hr_timesheet_current_open(osv.osv_memory): user_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context) if not len(user_ids): - raise osv.except_osv(_('Error !'), _('Please define employee for your user!')) + raise osv.except_osv(_('Error!'), _('Please define employee for your user!')) ids = ts.search(cr, uid, [('user_id','=',uid),('state','=','draft'),('date_from','<=',time.strftime('%Y-%m-%d')), ('date_to','>=',time.strftime('%Y-%m-%d'))], context=context) if len(ids) > 1: diff --git a/addons/import_google/wizard/import_google_data.py b/addons/import_google/wizard/import_google_data.py index 324f11293f5..ae3f27d7142 100644 --- a/addons/import_google/wizard/import_google_data.py +++ b/addons/import_google/wizard/import_google_data.py @@ -127,13 +127,13 @@ class synchronize_google(osv.osv_memory): gmail_pwd = user_obj.gmail_password google = self.pool.get('google.login') if not gmail_user or not gmail_pwd: - raise osv.except_osv(_('Error'), _("Invalid login detail !\nPlease specify correct username and password.")) + raise osv.except_osv(_('Error!'), _("Invalid login detail !\nPlease specify correct username and password.")) if context.get('contact'): msg = " Your contacts are being imported in background, an email to %s will be sent when the process is over." % (user_obj.gmail_user) gd_client = google.google_login(gmail_user, gmail_pwd, type='contact') if not gd_client: - raise osv.except_osv(_('Error'), _("Please specify correct username and password!")) + raise osv.except_osv(_('Error!'), _("Please specify correct username and password!")) if obj.group_name not in ['all']: context.update({ 'group_name': obj.group_name}) tables.append('Contact') diff --git a/addons/import_sugarcrm/import_sugarcrm.py b/addons/import_sugarcrm/import_sugarcrm.py index 2cb0dfb29bc..25712c7ea59 100644 --- a/addons/import_sugarcrm/import_sugarcrm.py +++ b/addons/import_sugarcrm/import_sugarcrm.py @@ -76,7 +76,7 @@ class sugar_import(import_framework): #login PortType,sessionid = sugar.login(self.context.get('username',''), self.context.get('password',''), self.context.get('url','')) if sessionid == '-1': - raise osv.except_osv(_('Error !'), _('Authentication error!\nBad username or password or bad SugarSoap Api url!')) + raise osv.except_osv(_('Error!'), _('Authentication error!\nBad username or password or bad SugarSoap Api url!')) self.context['port'] = PortType self.context['session_id'] = sessionid diff --git a/addons/import_sugarcrm/sugar.py b/addons/import_sugarcrm/sugar.py index df10b13d376..658ddc9e76d 100644 --- a/addons/import_sugarcrm/sugar.py +++ b/addons/import_sugarcrm/sugar.py @@ -57,7 +57,7 @@ def login(username, password, url): try: response = portType.login(request) except: - raise osv.except_osv(_('Error !'), _('Authentication error!\nBad username or password or bad SugarSoap Api url!')) + raise osv.except_osv(_('Error!'), _('Authentication error!\nBad username or password or bad SugarSoap Api url!')) if -1 == response._return._id: raise LoginError(response._return._error._description) diff --git a/addons/l10n_ch/wizard/create_dta.py b/addons/l10n_ch/wizard/create_dta.py index ccf7412e6f3..695fe763aa9 100644 --- a/addons/l10n_ch/wizard/create_dta.py +++ b/addons/l10n_ch/wizard/create_dta.py @@ -372,17 +372,17 @@ def _create_dta(obj, cr, uid, data, context=None): # raise osv.except_osv(_('Order not confirmed'), # _('Please confirm it')) if not payment.mode: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('No payment mode.')) bank = payment.mode.bank_id if not bank: - raise osv.except_osv(_('Error'), _('No bank account for the company.')) + raise osv.except_osv(_('Error!'), _('No bank account for the company.')) v['comp_bank_name']= bank.bank and bank.bank.name or False v['comp_bank_clearing'] = bank.bank.clearing if not v['comp_bank_clearing']: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('You must provide a Clearing Number for your bank account.')) user = pool.get('res.users').browse(cr,uid,[uid])[0] @@ -404,7 +404,7 @@ def _create_dta(obj, cr, uid, data, context=None): #else: # v['comp_bank_iban'] = '' if not v['comp_bank_iban']: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('No IBAN for the company bank account.')) res_partner_bank_obj = pool.get('res.partner.bank') @@ -415,10 +415,10 @@ def _create_dta(obj, cr, uid, data, context=None): for pline in payment.line_ids: if not pline.bank_id: - raise osv.except_osv(_('Error'), _('No bank account defined\n' \ + raise osv.except_osv(_('Error!'), _('No bank account defined\n' \ 'on line: %s') % pline.name) if not pline.bank_id.bank: - raise osv.except_osv(_('Error'), _('No bank defined\n' \ + raise osv.except_osv(_('Error!'), _('No bank defined\n' \ 'for the bank account: %s\n' \ 'on the partner: %s\n' \ 'on line: %s') + (pline.bank_id.state, pline.partner_id.name, pline.name)) @@ -431,7 +431,7 @@ def _create_dta(obj, cr, uid, data, context=None): v['partner_bank_name'] = pline.bank_id.bank.name or False v['partner_bank_clearing'] = pline.bank_id.bank.clearing or False if not v['partner_bank_name'] : - raise osv.except_osv(_('Error'), _('No bank name defined\n' \ + raise osv.except_osv(_('Error!'), _('No bank name defined\n' \ 'for the bank account: %s\n' \ 'on the partner: %s\n' \ 'on line: %s') % (pline.bank_id.state, pline.partner_id.name, pline.name)) @@ -460,7 +460,7 @@ def _create_dta(obj, cr, uid, data, context=None): v['partner_bvr'] = v['partner_bvr'].rjust(9, '0') is_9_pos_adherent = False else: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('Wrong postal number format.\n' 'It must be 12-123456-9 or 12345 format')) @@ -519,7 +519,7 @@ def _create_dta(obj, cr, uid, data, context=None): v['comp_country'] = co_addr.country_id and co_addr.country_id.code+'-' or '' record_type = record_gt836 if not v['partner_bank_iban']: - raise osv.except_osv(_('Error'), _('No IBAN defined \n' \ + raise osv.except_osv(_('Error!'), _('No IBAN defined \n' \ 'for the bank account: %s\n' + \ 'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] , pline.name)) @@ -535,27 +535,27 @@ def _create_dta(obj, cr, uid, data, context=None): + ' ' + v['partner_bank_city'] \ + ' ' + v['partner_bank_country'] else: - raise osv.except_osv(_('Error'), _('You must provide the bank city ' + raise osv.except_osv(_('Error!'), _('You must provide the bank city ' 'or the bic code for the partner bank: \n %d\n' + \ 'on line: %s') %(res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1], pline.name)) elif elec_pay == 'bvrbank' or elec_pay == 'bvrpost': from tools import mod10r if not v['reference']: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('You must provide ' \ 'a BVR reference number \n' \ 'for the line: %s') % pline.name) v['reference'] = v['reference'].replace(' ', '') if is_9_pos_adherent: if len(v['reference']) > 27: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('BVR reference number is not valid \n' 'for the line: %s. \n' 'Reference is too long.') % pline.name) # do a mod10 check if mod10r(v['reference'][:-1]) != v['reference']: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('BVR reference number is not valid \n' 'for the line: %s. \n' 'Mod10 check failed.') % pline.name) @@ -565,7 +565,7 @@ def _create_dta(obj, cr, uid, data, context=None): # reference of BVR adherent with 5 positions number # have 15 positions references if len(v['reference']) > 15: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('BVR reference number is not valid \n' 'for the line: %s. \n' 'Reference is too long ' @@ -575,19 +575,19 @@ def _create_dta(obj, cr, uid, data, context=None): v['reference'] = v['reference'].rjust(15, '0').ljust(27, ' ') if not v['partner_bvr']: - raise osv.except_osv(_('Error'), _('You must provide a BVR number\n' + raise osv.except_osv(_('Error!'), _('You must provide a BVR number\n' 'for the bank account: %s' \ 'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id],context)[0][1] ,pline.name)) record_type = record_gt826 elif elec_pay == 'bvbank': if not v['partner_bank_number'] : - raise osv.except_osv(_('Error'), _('You must provide ' \ + raise osv.except_osv(_('Error!'), _('You must provide ' \ 'a bank number \n' \ 'for the partner bank: %s\n' \ 'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] , pline.name)) if not v['partner_bank_clearing']: - raise osv.except_osv(_('Error'), _('You must provide ' \ + raise osv.except_osv(_('Error!'), _('You must provide ' \ 'a Clearing Number\n' \ 'for the partner bank: %s\n' \ 'on line %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] , pline.name)) @@ -595,7 +595,7 @@ def _create_dta(obj, cr, uid, data, context=None): record_type = record_gt827 elif elec_pay == 'bvpost': if not v['partner_post_number']: - raise osv.except_osv(_('Error'), _('You must provide ' \ + raise osv.except_osv(_('Error!'), _('You must provide ' \ 'a post number \n' \ 'for the partner bank: %s\n' \ 'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] ,pline.name)) @@ -603,7 +603,7 @@ def _create_dta(obj, cr, uid, data, context=None): v['partner_bank_number'] = '/C/'+v['partner_post_number'] record_type = record_gt827 else: - raise osv.except_osv(_('Error'), _('The Bank type %s of the bank account: %s is not supported.') \ + raise osv.except_osv(_('Error!'), _('The Bank type %s of the bank account: %s is not supported.') \ % (elec_pay, res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1],)) dta_line = record_type(v).generate() diff --git a/addons/l10n_fr_rib/bank.py b/addons/l10n_fr_rib/bank.py index 992f6331adb..b5d284ac45d 100644 --- a/addons/l10n_fr_rib/bank.py +++ b/addons/l10n_fr_rib/bank.py @@ -50,12 +50,12 @@ class res_partner_bank(osv.osv): # compute the key key = 97 - (100 * int(rib)) % 97 if int(bank_acc.key) != key: - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _("The RIB key %s does not correspond to the other codes: %s %s %s.") % \ (bank_acc.key, bank_acc.bank_code, bank_acc.office, bank_acc.rib_acc_number) ) if bank_acc.acc_number: if not self.is_iban_valid(cr, uid, bank_acc.acc_number): - raise osv.except_osv(_('Error'), _("The IBAN %s is not valid.") % bank_acc.acc_number) + raise osv.except_osv(_('Error!'), _("The IBAN %s is not valid.") % bank_acc.acc_number) return True def onchange_bank_id(self, cr, uid, ids, bank_id, context=None): diff --git a/addons/membership/membership.py b/addons/membership/membership.py index b75a813f285..f6bcc5087e6 100644 --- a/addons/membership/membership.py +++ b/addons/membership/membership.py @@ -407,10 +407,10 @@ class Partner(osv.osv): fpos_id = partner.property_account_position and partner.property_account_position.id or False addr = self.address_get(cr, uid, [partner.id], ['invoice']) if partner.free_member: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _("Partner is a free Member.")) if not addr.get('invoice', False): - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _("Partner doesn't have an address to make the invoice.")) quantity = 1 line_value = { diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index fc898dbf419..786a8e34e13 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -330,7 +330,7 @@ class mrp_repair(osv.osv): else: self.write(cr, uid, [o.id], {'state': 'confirmed'}) if not o.operations: - raise osv.except_osv(_('Error !'),_('You cannot confirm a repair order which has no line.')) + raise osv.except_osv(_('Error!'),_('You cannot confirm a repair order which has no line.')) for line in o.operations: if line.product_id.track_production and not line.prodlot_id: raise osv.except_osv(_('Warning'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name)) @@ -380,7 +380,7 @@ class mrp_repair(osv.osv): inv_obj.write(cr, uid, [inv_id], invoice_vals, context=context) else: if not repair.partner_id.property_account_receivable: - raise osv.except_osv(_('Error !'), _('No account defined for partner "%s".') % repair.partner_id.name ) + raise osv.except_osv(_('Error!'), _('No account defined for partner "%s".') % repair.partner_id.name ) account_id = repair.partner_id.property_account_receivable.id inv = { 'name': repair.name, @@ -408,7 +408,7 @@ class mrp_repair(osv.osv): elif operation.product_id.categ_id.property_account_income_categ: account_id = operation.product_id.categ_id.property_account_income_categ.id else: - raise osv.except_osv(_('Error !'), _('No account defined for product "%s".') % operation.product_id.name ) + raise osv.except_osv(_('Error!'), _('No account defined for product "%s".') % operation.product_id.name ) invoice_line_id = inv_line_obj.create(cr, uid, { 'invoice_id': inv_id, @@ -437,7 +437,7 @@ class mrp_repair(osv.osv): elif fee.product_id.categ_id.property_account_income_categ: account_id = fee.product_id.categ_id.property_account_income_categ.id else: - raise osv.except_osv(_('Error !'), _('No account defined for product "%s".') % fee.product_id.name) + raise osv.except_osv(_('Error!'), _('No account defined for product "%s".') % fee.product_id.name) invoice_fee_id = inv_line_obj.create(cr, uid, { 'invoice_id': inv_id, diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 9a4962ba5ea..b6f97b52fb5 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -366,7 +366,7 @@ class pos_session(osv.osv): if abs(st.difference) > st.journal_id.amount_authorized_diff: # The pos manager can close statements with maximums. if not self.pool.get('ir.model.access').check_groups(cr, uid, "point_of_sale.group_pos_manager"): - raise osv.except_osv( _('Error !'), + raise osv.except_osv( _('Error!'), _("Your ending balance is too different from the theorical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff)) if st.difference: if st.difference > 0.0: @@ -376,7 +376,7 @@ class pos_session(osv.osv): account_id = st.journal_id.loss_account_id.id name= _('Point of Sale Loss') if not account_id: - raise osv.except_osv( _('Error !'), + raise osv.except_osv( _('Error!'), _("Please set your profit and loss accounts on your payment method '%s'.") % (st.journal_id.name,)) bsl.create(cr, uid, { 'statement_id': st.id, @@ -403,7 +403,7 @@ class pos_session(osv.osv): for order in session.order_ids: if order.state != 'paid': raise osv.except_osv( - _('Error !'), + _('Error!'), _("You cannot confirm all orders of this session, because they have not the 'paid' status")) else: wf_service.trg_validate(uid, 'pos.order', order.id, 'done', cr) @@ -693,7 +693,7 @@ class pos_order(osv.osv): break if not statement_id: - raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox.')) + raise osv.except_osv(_('Error!'), _('You have to open at least one cashbox.')) args.update({ 'statement_id' : statement_id, diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py index 0e1cd98fb47..0677ac0e8d9 100644 --- a/addons/point_of_sale/report/pos_invoice.py +++ b/addons/point_of_sale/report/pos_invoice.py @@ -43,7 +43,7 @@ class pos_invoice(report_sxw.rml_parse): if order.invoice_id and order.invoice_id not in iids: if not order.invoice_id: - raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.')) + raise osv.except_osv(_('Error!'), _('Please create an invoice for this sale.')) iids.append(order.invoice_id) nids.append(order.invoice_id.id) data['ids'] = nids diff --git a/addons/point_of_sale/wizard/pos_box.py b/addons/point_of_sale/wizard/pos_box.py index a79ab0fa779..8c3b0aa4607 100644 --- a/addons/point_of_sale/wizard/pos_box.py +++ b/addons/point_of_sale/wizard/pos_box.py @@ -20,7 +20,7 @@ class PosBox(CashBox): bank_statements = [record.cash_register_id for record in records if record.cash_register_id] if not bank_statements: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _("There is no cash register for this PoS Session")) return self._run(cr, uid, ids, bank_statements, context=context) diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py index d68e19dd736..2920be50130 100644 --- a/addons/point_of_sale/wizard/pos_box_entries.py +++ b/addons/point_of_sale/wizard/pos_box_entries.py @@ -43,7 +43,7 @@ def get_journal(self, cr, uid, context=None): res = statement_obj.read(cr, uid, obj_ids, ['journal_id'], context=context) res = [(r['journal_id']) for r in res] if not len(res) and context: - raise osv.except_osv(_('Error !'), _('You do not have any open cash register. You must create a payment method or open a cash register.')) + raise osv.except_osv(_('Error!'), _('You do not have any open cash register. You must create a payment method or open a cash register.')) return res class pos_box_entries(osv.osv_memory): @@ -115,12 +115,12 @@ class pos_box_entries(osv.osv_memory): curr_company = res_obj.browse(cr, uid, uid, context=context).company_id.id statement_id = statement_obj.search(cr, uid, [('journal_id', '=', int(data['journal_id'])), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context) if not statement_id: - raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox.')) + raise osv.except_osv(_('Error!'), _('You have to open at least one cashbox.')) product = product_obj.browse(cr, uid, int(data['product_id'])) acc_id = product.property_account_income or product.categ_id.property_account_income_categ if not acc_id: - raise osv.except_osv(_('Error !'), _('Please check that income account is set to %s.')%(product_obj.browse(cr, uid, data['product_id']).name)) + raise osv.except_osv(_('Error!'), _('Please check that income account is set to %s.')%(product_obj.browse(cr, uid, data['product_id']).name)) if statement_id: statement_id = statement_id[0] if not statement_id: diff --git a/addons/point_of_sale/wizard/pos_box_out.py b/addons/point_of_sale/wizard/pos_box_out.py index 6198f65f4b6..e8366b019a4 100644 --- a/addons/point_of_sale/wizard/pos_box_out.py +++ b/addons/point_of_sale/wizard/pos_box_out.py @@ -86,9 +86,9 @@ class pos_box_out(osv.osv_memory): product = product_obj.browse(cr, uid, data['product_id'], context=context) acc_id = product.property_account_expense or product.categ_id.property_account_expense_categ if not acc_id: - raise osv.except_osv(_('Error !'), _('please check that account is set to %s.')%(product.name)) + raise osv.except_osv(_('Error!'), _('please check that account is set to %s.')%(product.name)) if not statement_ids: - raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox.')) + raise osv.except_osv(_('Error!'), _('You have to open at least one cashbox.')) vals['statement_id'] = statement_ids[0] vals['journal_id'] = data['journal_id'] vals['account_id'] = acc_id.id diff --git a/addons/product/product.py b/addons/product/product.py index 7911929f898..6d8df1b62a1 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -140,7 +140,7 @@ class product_uom(osv.osv): context = {} if from_unit.category_id.id <> to_unit.category_id.id: if context.get('raise-exception', True): - raise osv.except_osv(_('Error !'), _('Conversion from Product UoM %s to Default UoM %s is not possible as they both belong to different Category!.') % (from_unit.name,to_unit.name,)) + raise osv.except_osv(_('Error!'), _('Conversion from Product UoM %s to Default UoM %s is not possible as they both belong to different Category!.') % (from_unit.name,to_unit.name,)) else: return qty amount = qty / from_unit.factor diff --git a/addons/project_gtd/wizard/project_gtd_empty.py b/addons/project_gtd/wizard/project_gtd_empty.py index 373c8425a8c..04c9689cc27 100644 --- a/addons/project_gtd/wizard/project_gtd_empty.py +++ b/addons/project_gtd/wizard/project_gtd_empty.py @@ -49,7 +49,7 @@ class project_timebox_empty(osv.osv_memory): ids = obj_tb.search(cr, uid, [], context=context) if not len(ids): - raise osv.except_osv(_('Error !'), _('No timebox child of this one !')) + raise osv.except_osv(_('Error!'), _('No timebox child of this one !')) tids = obj_task.search(cr, uid, [('timebox_id', '=', context['active_id'])]) for task in obj_task.browse(cr, uid, tids, context): if (task.state in ('cancel','done')) or (task.user_id.id <> uid): diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 44027fca610..356ca7304c1 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -367,7 +367,7 @@ class purchase_order(osv.osv): todo = [] for po in self.browse(cr, uid, ids, context=context): if not po.order_line: - raise osv.except_osv(_('Error !'),_('You cannot confirm a purchase order without any purchase order line.')) + raise osv.except_osv(_('Error!'),_('You cannot confirm a purchase order without any purchase order line.')) for line in po.order_line: if line.state=='draft': todo.append(line.id) @@ -427,7 +427,7 @@ class purchase_order(osv.osv): pay_acc_id = order.partner_id.property_account_payable.id journal_ids = journal_obj.search(cr, uid, [('type', '=','purchase'),('company_id', '=', order.company_id.id)], limit=1) if not journal_ids: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('Define purchase journal for this company: "%s" (id:%d).') % (order.company_id.name, order.company_id.id)) # generate invoice line correspond to PO line and link that to created invoice (inv_id) and PO line @@ -438,7 +438,7 @@ class purchase_order(osv.osv): if not acc_id: acc_id = po_line.product_id.categ_id.property_account_expense_categ.id if not acc_id: - raise osv.except_osv(_('Error !'), _('Define expense account for this company: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,)) + raise osv.except_osv(_('Error!'), _('Define expense account for this company: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,)) else: acc_id = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category').id fpos = order.fiscal_position or False diff --git a/addons/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py index be0dc97ce45..edce941ab7b 100644 --- a/addons/purchase/wizard/purchase_line_invoice.py +++ b/addons/purchase/wizard/purchase_line_invoice.py @@ -106,7 +106,7 @@ class purchase_line_invoice(osv.osv_memory): if not a: a = line.product_id.categ_id.property_account_expense_categ.id if not a: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('Define expense account for this product: "%s" (id:%d).') % \ (line.product_id.name, line.product_id.id,)) else: diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 83b725302e3..d77b157ddd5 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -418,7 +418,7 @@ class sale_order(osv.osv): [('type', '=', 'sale'), ('company_id', '=', order.company_id.id)], limit=1) if not journal_ids: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('Please define sales journal for this company: "%s" (id:%d).') % (order.company_id.name, order.company_id.id)) invoice_vals = { @@ -600,7 +600,7 @@ class sale_order(osv.osv): currency_id = o.pricelist_id.currency_id.id if (o.partner_id.id in partner_currency) and (partner_currency[o.partner_id.id] <> currency_id): raise osv.except_osv( - _('Error !'), + _('Error!'), _('You cannot group sales having different currencies for the same partner.')) partner_currency[o.partner_id.id] = currency_id @@ -750,7 +750,7 @@ class sale_order(osv.osv): def action_wait(self, cr, uid, ids, context=None): for o in self.browse(cr, uid, ids): if not o.order_line: - raise osv.except_osv(_('Error !'),_('You cannot confirm a sale order which has no line.')) + raise osv.except_osv(_('Error!'),_('You cannot confirm a sale order which has no line.')) if (o.order_policy == 'manual'): self.write(cr, uid, [o.id], {'state': 'manual', 'date_confirm': fields.date.context_today(self, cr, uid, context=context)}) else: @@ -1192,7 +1192,7 @@ class sale_order_line(osv.osv): if not account_id: account_id = line.product_id.categ_id.property_account_income_categ.id if not account_id: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('Please define income account for this product: "%s" (id:%d).') % \ (line.product_id.name, line.product_id.id,)) else: @@ -1209,7 +1209,7 @@ class sale_order_line(osv.osv): fpos = line.order_id.fiscal_position or False account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id) if not account_id: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no Fiscal Position defined or Income category account defined for default properties of Product categories.')) return { 'name': line.name, diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 85fbcd17fe8..0952d820ebe 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -99,7 +99,7 @@ class sale_advance_payment_inv(osv.osv_memory): for sale in sale_obj.browse(cr, uid, sale_ids, context=context): if sale.order_policy == 'postpaid': raise osv.except_osv( - _('Error'), + _('Error!'), _("You cannot make an advance on a sales order \ that is defined as 'Automatic Invoice after delivery'.")) diff --git a/addons/stock/report/report_stock.py b/addons/stock/report/report_stock.py index e16b7ca6e6d..a711cdf23ee 100644 --- a/addons/stock/report/report_stock.py +++ b/addons/stock/report/report_stock.py @@ -75,7 +75,7 @@ class stock_report_prodlots(osv.osv): )""") def unlink(self, cr, uid, ids, context={}): - raise osv.except_osv(_('Error !'), _('You cannot delete any record!')) + raise osv.except_osv(_('Error!'), _('You cannot delete any record!')) stock_report_prodlots() @@ -132,7 +132,7 @@ class stock_report_tracklots(osv.osv): )""") def unlink(self, cr, uid, ids, context={}): - raise osv.except_osv(_('Error !'), _('You cannot delete any record!')) + raise osv.except_osv(_('Error!'), _('You cannot delete any record!')) stock_report_tracklots() diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 96d9418dbed..415f56e52a8 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -516,7 +516,7 @@ class stock_tracking(osv.osv): return res def unlink(self, cr, uid, ids, context=None): - raise osv.except_osv(_('Error'), _('You cannot remove a lot line.')) + raise osv.except_osv(_('Error!'), _('You cannot remove a lot line.')) def action_traceability(self, cr, uid, ids, context={}): """ It traces the information of a product @@ -762,7 +762,7 @@ class stock_picking(osv.osv): wf_service = netsvc.LocalService("workflow") for pick in self.browse(cr, uid, ids): if not pick.move_lines: - raise osv.except_osv(_('Error !'),_('You cannot process picking without stock moves.')) + raise osv.except_osv(_('Error!'),_('You cannot process picking without stock moves.')) wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_confirm', cr) return True @@ -1154,7 +1154,7 @@ class stock_picking(osv.osv): return True for move in pick.move_lines: if move.state == 'done': - raise osv.except_osv(_('Error'), _('You cannot cancel picking because stock move is in done state!')) + raise osv.except_osv(_('Error!'), _('You cannot cancel picking because stock move is in done state!')) return True def unlink(self, cr, uid, ids, context=None): move_obj = self.pool.get('stock.move') @@ -1162,7 +1162,7 @@ class stock_picking(osv.osv): context = {} for pick in self.browse(cr, uid, ids, context=context): if pick.state in ['done','cancel']: - raise osv.except_osv(_('Error'), _('You cannot remove the picking which is in %s state!')%(pick.state,)) + raise osv.except_osv(_('Error!'), _('You cannot remove the picking which is in %s state!')%(pick.state,)) else: ids2 = [move.id for move in pick.move_lines] ctx = context.copy() diff --git a/addons/stock_planning/wizard/stock_planning_createlines.py b/addons/stock_planning/wizard/stock_planning_createlines.py index 77c66819138..394606ebb4d 100644 --- a/addons/stock_planning/wizard/stock_planning_createlines.py +++ b/addons/stock_planning/wizard/stock_planning_createlines.py @@ -68,7 +68,7 @@ class stock_planning_createlines(osv.osv_memory): prod_categ_ids = prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)]) products_id1 = product_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)]) if len(products_id1)==0: - raise osv.except_osv(_('Error !'), _('No forecasts for selected period or no products available in selected category !')) + raise osv.except_osv(_('Error!'), _('No forecasts for selected period or no products available in selected category !')) for p in product_obj.browse(cr, uid, products_id1,context=context): if len(planning_obj.search(cr, uid, [('product_id','=',p.id), diff --git a/addons/stock_planning/wizard/stock_planning_forecast.py b/addons/stock_planning/wizard/stock_planning_forecast.py index 2560d7b3a92..3dad3624aa4 100644 --- a/addons/stock_planning/wizard/stock_planning_forecast.py +++ b/addons/stock_planning/wizard/stock_planning_forecast.py @@ -55,7 +55,7 @@ class stock_sale_forecast_createlines(osv.osv_memory): prod_categ_ids = prod_categ_obj.search(cr, uid, [('parent_id','child_of', categ_ids)]) products_ids = product_obj.search(cr, uid, [('categ_id','in',prod_categ_ids)]) if len(products_ids) == 0: - raise osv.except_osv(_('Error !'), _('No products available in selected category !')) + raise osv.except_osv(_('Error!'), _('No products available in selected category !')) copy = f.copy_forecast for p in product_obj.browse(cr, uid, products_ids,{}): if len(forecast_obj.search(cr, uid, [('product_id','=',p.id) , \ diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py index 271a87f7bb9..45916e04aee 100644 --- a/addons/subscription/subscription.py +++ b/addons/subscription/subscription.py @@ -133,7 +133,7 @@ class subscription_subscription(osv.osv): def unlink(self, cr, uid, ids, context=None): for record in self.browse(cr, uid, ids, context or {}): if record.state=="running": - raise osv.except_osv(_('Error !'),_('You cannot delete an active subscription !')) + raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription !')) return super(subscription_subscription, self).unlink(cr, uid, ids, context) def set_done(self, cr, uid, ids, context=None):