[MERGE] better HR messages
bzr revid: fp@openerp.com-20120916152319-z1trkemgvcqelfk2
This commit is contained in:
commit
f8a32421d9
|
@ -137,11 +137,13 @@ class hr_analytic_timesheet(osv.osv):
|
|||
if context is None:
|
||||
context = {}
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
|
||||
if emp_id:
|
||||
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
|
||||
if emp.journal_id:
|
||||
return emp.journal_id.id
|
||||
return False
|
||||
if not emp_id :
|
||||
raise osv.except_osv(_('Warning!'), _('Please create an employee for this user, using the menu: Human Resources > Employees.'))
|
||||
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
|
||||
if emp.journal_id:
|
||||
return emp.journal_id.id
|
||||
else :
|
||||
raise osv.except_osv(_('Warning!'), _('No analytic journal defined for \'%s\'.\nYou should assign an analytic journal on the employee form.')%(emp.name))
|
||||
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Timesheet" version="7.0">
|
||||
<header>
|
||||
<button name="button_confirm" states="draft" string="Submited to Manager" type="object" class="oe_highlight"/>
|
||||
<button name="button_confirm" states="draft" string="Submit to Manager" type="object" class="oe_highlight"/>
|
||||
<button name="done" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
|
||||
<button name="action_set_to_draft" states="done" string="Set to Draft" type="object" />
|
||||
<button name="cancel" states="confirm" string="Refuse" type="workflow" groups="base.group_hr_user" />
|
||||
|
|
|
@ -976,7 +976,7 @@ msgstr ""
|
|||
|
||||
#. module: hr_timesheet_sheet
|
||||
#: view:hr_timesheet_sheet.sheet:0
|
||||
msgid "Submited to Manager"
|
||||
msgid "Submit to Manager"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_timesheet_sheet
|
||||
|
|
Loading…
Reference in New Issue