diff options
| author | Saurang Suthar(OpenERP) <> | 2012-07-25 17:43:54 +0530 |
|---|---|---|
| committer | pso (OpenERP) <pso@tinyerp.com> | 2012-07-25 17:43:54 +0530 |
| commit | 25d650e96e6d1a2d77c0112b62b78c6c84ebfeaf (patch) | |
| tree | ba8fc012c865eaa7ed0f2bfdf6beae8651408ba5 /addons | |
| parent | e03af5e54c771344d0ceee7b00707a7198c8ebf0 (diff) | |
[IMP] Improved warning messages for hr* modules
bzr revid: pso@tinyerp.com-20120725121354-hypwxo74c43jm5gp
Diffstat (limited to 'addons')
21 files changed, 58 insertions, 58 deletions
diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 02742f273fe..ad866e4955a 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -315,7 +315,7 @@ class res_users(osv.osv): 'user_id': user_id}, context=context) except: # Tolerate a missing shortcut. See product/product.py for similar code. - _logger.debug('Skipped meetings shortcut for user "%s"', data.get('name','<new')) + _logger.debug('Skipped meetings shortcut for user "%s".', data.get('name','<new')) return user_id diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index 93cdc707b4d..ab370f63397 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -83,7 +83,7 @@ class hr_attendance(osv.osv): return False return True - _constraints = [(_altern_si_so, 'Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)', ['action'])] + _constraints = [(_altern_si_so, 'Error ! Sign in (resp. Sign out) must follow Sign out (resp. Sign in)', ['action'])] _order = 'name desc' hr_attendance() @@ -137,7 +137,7 @@ class hr_employee(osv.osv): warning_sign = "Sign Out" for emp in self.read(cr, uid, ids, ['id'], context=context): if not self._action_check(cr, uid, emp['id'], dt, context): - raise osv.except_osv(_('Warning'), _('You try to %s with a date before to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,)) + raise osv.except_osv(_('Warning !'), _('You try to %s with a date before to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,)) res = {'action': type, 'employee_id': emp['id']} if dt: diff --git a/addons/hr_attendance/i18n/hr_attendance.pot b/addons/hr_attendance/i18n/hr_attendance.pot index 990f2aba606..9af2bb9af9c 100644 --- a/addons/hr_attendance/i18n/hr_attendance.pot +++ b/addons/hr_attendance/i18n/hr_attendance.pot @@ -133,7 +133,7 @@ msgstr "" #: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:174 #: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:179 #, python-format -msgid "UserError" +msgid "UserError !" msgstr "" #. module: hr_attendance @@ -145,7 +145,7 @@ msgstr "" #. module: hr_attendance #: code:addons/hr_attendance/hr_attendance.py:140 #, python-format -msgid "Warning" +msgid "Warning !" msgstr "" #. module: hr_attendance @@ -190,7 +190,7 @@ msgstr "" #. module: hr_attendance #: constraint:hr.attendance:0 -msgid "Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)" +msgid "Error ! Sign in (resp. Sign out) must follow Sign out (resp. Sign in)" msgstr "" #. module: hr_attendance @@ -229,7 +229,7 @@ msgstr "" #. module: hr_attendance #: code:addons/hr_attendance/wizard/hr_attendance_error.py:49 #, python-format -msgid "No Data Available" +msgid "No Data Available !" msgstr "" #. module: hr_attendance @@ -514,7 +514,7 @@ msgstr "" #. module: hr_attendance #: code:addons/hr_attendance/wizard/hr_attendance_error.py:49 #, python-format -msgid "No records found for your selection!" +msgid "No records are found for your selection!" msgstr "" #. module: hr_attendance diff --git a/addons/hr_attendance/wizard/hr_attendance_error.py b/addons/hr_attendance/wizard/hr_attendance_error.py index bb181268195..e2f9dc94b3f 100644 --- a/addons/hr_attendance/wizard/hr_attendance_error.py +++ b/addons/hr_attendance/wizard/hr_attendance_error.py @@ -46,7 +46,7 @@ class hr_attendance_error(osv.osv_memory): cr.execute("SELECT id FROM hr_attendance WHERE employee_id IN %s AND to_char(name,'YYYY-mm-dd')<=%s AND to_char(name,'YYYY-mm-dd')>=%s AND action IN %s ORDER BY name" ,(tuple(context['active_ids']), date_to, date_from, tuple(['sign_in','sign_out']))) attendance_ids = [x[0] for x in cr.fetchall()] if not attendance_ids: - raise osv.except_osv(_('No Data Available'), _('No records found for your selection!')) + raise osv.except_osv(_('No Data Available !'), _('No records are found for your selection!')) attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids, context=context) for rec in attendance_records: diff --git a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py index 0583d478c19..c5af93ef49c 100644 --- a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py +++ b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py @@ -158,25 +158,25 @@ class hr_sign_in_out(osv.osv_memory): emp_id = data['emp_id'] if 'last_time' in data: if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'): - raise osv.except_osv(_('UserError'), _('The sign-out date must be in the past.')) + raise osv.except_osv(_('UserError !'), _('The sign-out date must be in the past.')) self.pool.get('hr.attendance').create(cr, uid, {'name': data['last_time'], 'action': 'sign_out', 'employee_id': emp_id}, context=context) try: self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in') except: - raise osv.except_osv(_('UserError'), _('A sign-in must be right after a sign-out!')) + raise osv.except_osv(_('UserError !'), _('A sign-in must be right after a sign-out!')) return {'type': 'ir.actions.act_window_close'} # To do: Return Success message def sign_out(self, cr, uid, data, context=None): emp_id = data['emp_id'] if 'last_time' in data: if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'): - raise osv.except_osv(_('UserError'), _('The sign-in date must be in the past.')) + raise osv.except_osv(_('UserError !'), _('The sign-in date must be in the past.')) self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id}, context=context) try: self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out') except: - raise osv.except_osv(_('UserError'), _('A sign-out must be right after a sign-in!')) + raise osv.except_osv(_('UserError !'), _('A sign-out must be right after a sign-in!')) return {'type': 'ir.actions.act_window_close'} # To do: Return Success message hr_sign_in_out() diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 844b1ac0de0..242794b4147 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, diff --git a/addons/hr_expense/i18n/hr_expense.pot b/addons/hr_expense/i18n/hr_expense.pot index 572515f03c7..1e79501e478 100644 --- a/addons/hr_expense/i18n/hr_expense.pot +++ b/addons/hr_expense/i18n/hr_expense.pot @@ -266,8 +266,8 @@ msgstr "" #: code:addons/hr_expense/hr_expense.py:173 #, python-format msgid "" -"Please configure Default Expense account for Product purchase., " -"`property_account_expense_categ`" +"Please configure Default Expense account for Product purchase: " +"`property_account_expense_categ`." msgstr "" #. module: hr_expense diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 0074a8c20e6..25970542809 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -147,7 +147,7 @@ class hr_holidays(osv.osv): 'holiday_type': 'employee' } _sql_constraints = [ - ('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "You have to select an employee or a category"), + ('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "You have to select an employee or a category."), ('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be before the end date !"), ('date_check', "CHECK ( number_of_days_temp >= 0 )", "The number of days must be greater than 0 !"), ] @@ -202,7 +202,7 @@ class hr_holidays(osv.osv): def unlink(self, cr, uid, ids, context=None): for rec in self.browse(cr, uid, ids, context=context): if rec.state<>'draft': - raise osv.except_osv(_('Warning!'),_('You cannot delete a leave, because it\'s not in draft state!')) + raise osv.except_osv(_('Warning!'),_('You cannot delete a leave which is not in draft state !')) return super(hr_holidays, self).unlink(cr, uid, ids, context) def onchange_date_from(self, cr, uid, ids, date_to, date_from): @@ -379,7 +379,7 @@ class hr_holidays(osv.osv): def create_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, ids, _('System notification'), - _("The %s request has been <b>created</b> and is waiting confirmation") + _("The %s request has been <b>created</b> and is waiting confirmation.") % ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context) return True diff --git a/addons/hr_holidays/i18n/hr_holidays.pot b/addons/hr_holidays/i18n/hr_holidays.pot index 56dd8fe758c..661a9f9cc60 100644 --- a/addons/hr_holidays/i18n/hr_holidays.pot +++ b/addons/hr_holidays/i18n/hr_holidays.pot @@ -395,7 +395,7 @@ msgstr "" #. module: hr_holidays #: sql_constraint:hr.holidays:0 -msgid "You have to select an employee or a category" +msgid "You have to select an employee or a category." msgstr "" #. module: hr_holidays @@ -575,7 +575,7 @@ msgstr "" #. module: hr_holidays #: code:addons/hr_holidays/wizard/hr_holidays_summary_department.py:44 #, python-format -msgid "Error" +msgid "Error !" msgstr "" #. module: hr_holidays diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department.py b/addons/hr_holidays/wizard/hr_holidays_summary_department.py index 5f4a26b2a07..beb233f55e8 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 fb7c128df8d..d80e4df88dd 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_payroll/i18n/hr_payroll.pot b/addons/hr_payroll/i18n/hr_payroll.pot index 94c204db542..3f70f4b68cb 100644 --- a/addons/hr_payroll/i18n/hr_payroll.pot +++ b/addons/hr_payroll/i18n/hr_payroll.pot @@ -755,7 +755,7 @@ msgstr "" #: code:addons/hr_payroll/hr_payroll.py:889 #: code:addons/hr_payroll/hr_payroll.py:895 #, python-format -msgid "Error" +msgid "Error !" msgstr "" #. module: hr_payroll diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 91057a2b38e..68def938191 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -172,9 +172,9 @@ class hr_analytic_timesheet(osv.osv): if emp_id: ename = emp_obj.browse(cr, uid, emp_id[0], context=context).name if not vals.get('journal_id',False): - raise osv.except_osv(_('Warning !'), _('No \'Analytic Journal\' defined for employee %s \nDefine an employee for the selected user and assign an \'Analytic Journal\'!')%(ename,)) + raise osv.except_osv(_('Warning !'), _('No \'Analytic Journal\' is defined for employee %s \nDefine an employee for the selected user and assign an \'Analytic Journal\'!')%(ename,)) if not vals.get('account_id',False): - raise osv.except_osv(_('Warning !'), _('No analytic account defined on the project.\nPlease set one or we cannot automatically fill the timesheet.')) + raise osv.except_osv(_('Warning !'), _('No analytic account is defined on the project.\nPlease set one or we cannot automatically fill the timesheet.')) return super(hr_analytic_timesheet, self).create(cr, uid, vals, context=context) def on_change_user_id(self, cr, uid, ids, user_id): diff --git a/addons/hr_timesheet/i18n/hr_timesheet.pot b/addons/hr_timesheet/i18n/hr_timesheet.pot index ee1e9fbc8d6..bbd23784493 100644 --- a/addons/hr_timesheet/i18n/hr_timesheet.pot +++ b/addons/hr_timesheet/i18n/hr_timesheet.pot @@ -30,7 +30,7 @@ msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:132 #, python-format -msgid "No employee defined for your user!" +msgid "Please define employee for your user!" msgstr "" #. module: hr_timesheet @@ -152,13 +152,13 @@ msgstr "" #: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77 #: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:132 #, python-format -msgid "UserError" +msgid "UserError !" msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77 #, python-format -msgid "No cost unit defined for this employee!" +msgid "Please define cost unit for this employee!" msgstr "" #. module: hr_timesheet @@ -171,7 +171,7 @@ msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/wizard/hr_timesheet_print_employee.py:42 #, python-format -msgid "Warning" +msgid "Warning!" msgstr "" #. module: hr_timesheet @@ -322,7 +322,7 @@ msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/hr_timesheet.py:175 #, python-format -msgid "No 'Analytic Journal' defined for employee %s \n" +msgid "No 'Analytic Journal' is defined for employee %s \n" "Define an employee for the selected user and assign an 'Analytic Journal'!" msgstr "" @@ -576,7 +576,7 @@ msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/hr_timesheet.py:177 #, python-format -msgid "No analytic account defined on the project.\n" +msgid "No analytic account is defined on the project.\n" "Please set one or we cannot automatically fill the timesheet." msgstr "" @@ -599,7 +599,7 @@ msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/wizard/hr_timesheet_print_employee.py:42 #, python-format -msgid "No employee defined for this user!" +msgid "Please define employee for this user!" msgstr "" #. module: hr_timesheet diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py index 7ef99aa88e6..75bb089bbc7 100644 --- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py +++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py @@ -39,7 +39,7 @@ class analytical_timesheet_employee(osv.osv_memory): emp_obj = self.pool.get('hr.employee') emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context) if not emp_id: - raise osv.except_osv(_("Warning"), _("No employee defined for this user!")) + raise osv.except_osv(_("Warning!"), _("Please define employee for this user!")) return emp_id and emp_id[0] or False _defaults = { diff --git a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py index d3b0d27e351..30708c43e97 100644 --- a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py +++ b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py @@ -74,7 +74,7 @@ class hr_so_project(osv.osv_memory): res = timesheet_obj.default_get(cr, uid, ['product_id','product_uom_id'], context=context) if not res['product_uom_id']: - raise osv.except_osv(_('UserError'), _('No cost unit defined for this employee!')) + raise osv.except_osv(_('UserError !'), _('Please define cost unit for this employee!')) up = timesheet_obj.on_change_unit_amount(cr, uid, False, res['product_id'], hour,False, res['product_uom_id'])['value'] res['name'] = data['info'] @@ -129,7 +129,7 @@ class hr_si_project(osv.osv_memory): emp_obj = self.pool.get('hr.employee') emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context) if not emp_id: - raise osv.except_osv(_('UserError'), _('No employee defined for your user!')) + raise osv.except_osv(_('UserError !'), _('Please define employee for your user!')) return False def check_state(self, cr, uid, ids, context=None): diff --git a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot index 21df6be61e4..058c1bdc371 100644 --- a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot +++ b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot @@ -227,7 +227,7 @@ msgstr "" #. module: hr_timesheet_invoice #: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:64 #, python-format -msgid "Analytic Account incomplete" +msgid "Analytic Account incomplete !" msgstr "" #. module: hr_timesheet_invoice @@ -411,7 +411,7 @@ msgstr "" #. module: hr_timesheet_invoice #: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:132 #, python-format -msgid "Configuration Error" +msgid "Configuration Error !" msgstr "" #. module: hr_timesheet_invoice @@ -530,7 +530,7 @@ msgstr "" #. module: hr_timesheet_invoice #: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:132 #, python-format -msgid "No income account defined for product '%s'." +msgid "Please define income account for product '%s'." msgstr "" #. module: hr_timesheet_invoice @@ -698,7 +698,7 @@ msgstr "" #. module: hr_timesheet_invoice #: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:108 #, python-format -msgid "Error" +msgid "Error !" msgstr "" #. module: hr_timesheet_invoice @@ -835,7 +835,7 @@ msgstr "" #: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:65 #, python-format msgid "Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n" -"%s" +"%s." msgstr "" #. module: hr_timesheet_invoice 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 8678480763c..7e0df07bdb9 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -61,8 +61,8 @@ class account_analytic_line(osv.osv): for account in analytic_account_obj.browse(cr, uid, account_ids, context=context): partner = account.partner_id if (not partner) or not (account.pricelist_id): - raise osv.except_osv(_('Analytic Account incomplete'), - _('Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n%s') % (account.name,)) + raise osv.except_osv(_('Analytic Account incomplete !'), + _('Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n%s.') % (account.name,)) @@ -99,7 +99,7 @@ class account_analytic_line(osv.osv): for product_id, factor_id, qty, uom in cr.fetchall(): product = product_obj.browse(cr, uid, product_id, context2) if not product: - raise osv.except_osv(_('Error'), _('At least one line has no product!')) + raise osv.except_osv(_('Error !'), _('At least one line has no product!')) factor_name = '' factor = invoice_factor_obj.browse(cr, uid, factor_id, context2) if not data.get('product', False): @@ -123,7 +123,7 @@ class account_analytic_line(osv.osv): tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes) account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id if not account_id: - raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'.") % product.name) + raise osv.except_osv(_("Configuration Error !"), _("Please define income account for product '%s'.") % product.name) curr_line = { 'price_unit': price, 'quantity': qty, diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 26254271ca7..6a0c24b553e 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -533,7 +533,7 @@ class hr_timesheet_line(osv.osv): return True _constraints = [ - (_check_sheet_state, 'You cannot modify an entry in a Confirmed/Done timesheet !.', ['state']), + (_check_sheet_state, 'You cannot modify an entry in a Confirmed/Done timesheet !', ['state']), ] def unlink(self, cr, uid, ids, *args, **kwargs): @@ -545,7 +545,7 @@ class hr_timesheet_line(osv.osv): def _check(self, cr, uid, ids): for att in self.browse(cr, uid, ids): if att.sheet_id and att.sheet_id.state not in ('draft', 'new'): - raise osv.except_osv(_('Error !'), _('You can not modify an entry in a confirmed timesheet !')) + raise osv.except_osv(_('Error !'), _('You cannot modify an entry in a confirmed timesheet !')) return True hr_timesheet_line() @@ -616,7 +616,7 @@ class hr_attendance(osv.osv): res = super(hr_attendance,self).create(cr, uid, vals, context=context) if 'sheet_id' in context: if context['sheet_id'] != self.browse(cr, uid, res, context=context).sheet_id.id: - raise osv.except_osv(_('UserError'), _('You cannot enter an attendance ' \ + raise osv.except_osv(_('UserError !'), _('You cannot enter an attendance ' \ 'date outside the current timesheet dates!')) return res @@ -636,7 +636,7 @@ class hr_attendance(osv.osv): if 'sheet_id' in context: for attendance in self.browse(cr, uid, ids, context=context): if context['sheet_id'] != attendance.sheet_id.id: - raise osv.except_osv(_('UserError'), _('You cannot enter an attendance ' \ + raise osv.except_osv(_('UserError !'), _('You cannot enter an attendance ' \ 'date outside the current timesheet dates!')) return res diff --git a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot index 7e2f698f203..8149ce4ec92 100644 --- a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot +++ b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot @@ -50,7 +50,7 @@ msgstr "" #. module: hr_timesheet_sheet #: code:addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py:38 #, python-format -msgid "No employee defined for your user!" +msgid "Please define employee for your user!" msgstr "" #. module: hr_timesheet_sheet @@ -633,7 +633,7 @@ msgstr "" #. module: hr_timesheet_sheet #: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:548 #, python-format -msgid "You can not modify an entry in a confirmed timesheet !" +msgid "You cannot modify an entry in a confirmed timesheet !" msgstr "" #. module: hr_timesheet_sheet @@ -775,7 +775,7 @@ msgstr "" #. module: hr_timesheet_sheet #: constraint:hr.analytic.timesheet:0 -msgid "You cannot modify an entry in a Confirmed/Done timesheet !." +msgid "You cannot modify an entry in a Confirmed/Done timesheet !" msgstr "" #. module: hr_timesheet_sheet @@ -957,7 +957,7 @@ msgstr "" #: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:619 #: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:639 #, python-format -msgid "UserError" +msgid "UserError !" msgstr "" #. module: hr_timesheet_sheet diff --git a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py index 4d19e7657d4..ec0c70d1349 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 !'), _('No employee defined 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: |
