[IMP] Improved warning messages for hr* modules
bzr revid: pso@tinyerp.com-20120725121354-hypwxo74c43jm5gp
This commit is contained in:
parent
e03af5e54c
commit
25d650e96e
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue