[MERGE] trunk

bzr revid: qdp-launchpad@openerp.com-20120615103015-fnwuprhnc47ujq4d
This commit is contained in:
Quentin (OpenERP) 2012-06-15 12:30:15 +02:00
commit 32a02b3565
44 changed files with 348 additions and 283 deletions

View File

@ -40,8 +40,8 @@ class crm_meeting(base_state, osv.Model):
_columns = {
# base_state required fields
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
'section_id': fields.many2one('crm.case.section', 'Sales Team', states={'done': [('readonly', True)]}, \
select=True, help='Sales team to which Case belongs to.'),
'section_id': fields.many2one('crm.case.section', 'Sales Team', states={'done': [('readonly', True)]},
select=True, groups='base.group_sale_salesman', help='Sales team to which Case belongs to.'),
'email_from': fields.char('Email', size=128, states={'done': [('readonly', True)]}, help="These people will receive email."),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Write Date' , readonly=True),

View File

@ -93,24 +93,27 @@ class hr_job(osv.osv):
_description = "Job Description"
_columns = {
'name': fields.char('Job Name', size=128, required=True, select=True),
'expected_employees': fields.function(_no_of_employee, string='Expected Employees', help='Required number of employees in total for that job.',
'expected_employees': fields.function(_no_of_employee, string='Total Employees',
help='Expected number of employees for this job position after new recruitment.',
store = {
'hr.job': (lambda self,cr,uid,ids,c=None: ids, ['no_of_recruitment'], 10),
'hr.employee': (_get_job_position, ['job_id'], 10),
},
multi='no_of_employee'),
'no_of_employee': fields.function(_no_of_employee, string="Number of Employees", help='Number of employees with that job.',
'no_of_employee': fields.function(_no_of_employee, string="Number of Employees",
help='Number of employees currently occupying this job position.',
store = {
'hr.employee': (_get_job_position, ['job_id'], 10),
},
multi='no_of_employee'),
'no_of_recruitment': fields.float('Expected in Recruitment'),
'no_of_recruitment': fields.float('Expected in Recruitment', help='Number of new employees you expect to recruit.'),
'employee_ids': fields.one2many('hr.employee', 'job_id', 'Employees'),
'description': fields.text('Job Description'),
'requirements': fields.text('Requirements'),
'department_id': fields.many2one('hr.department', 'Department'),
'company_id': fields.many2one('res.company', 'Company'),
'state': fields.selection([('open', 'In Position'),('recruit', 'In Recruitement'),('old', 'Old')], 'Status', readonly=True, required=True),
'state': fields.selection([('open', 'In Position'), ('recruit', 'In Recruitement')], 'Status', readonly=True, required=True,
help="By default 'In position', set it to 'In Recruitment' if recruitment process is going on for this job position."),
}
_defaults = {
'expected_employees': 1,
@ -128,10 +131,6 @@ class hr_job(osv.osv):
context = {}
return {'value': {'expected_employees': no_of_recruitment + no_of_employee}}
def job_old(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'old', 'no_of_recruitment': 0})
return True
def job_recruitement(self, cr, uid, ids, *args):
for job in self.browse(cr, uid, ids):
no_of_recruitment = job.no_of_recruitment == 0 and 1 or job.no_of_recruitment

View File

@ -8,9 +8,7 @@
groups="base.group_hr_manager,base.group_hr_user,base.group_user"/>
<menuitem id="menu_hr_main" parent="menu_hr_root" name="Human Resources" sequence="0"/>
<menuitem id="menu_hr_configuration" name="Configuration" parent="hr.menu_hr_root" groups="base.group_hr_manager" sequence="50"/>
<menuitem id="menu_hr_management" name="Human Resources" parent="hr.menu_hr_configuration" sequence="25" groups="base.group_no_one"/>
<menuitem id="menu_view_employee_category_configuration_form" parent="hr.menu_hr_management" name="Employees" sequence="1" />
<menuitem id="base.menu_hr_reports" parent="hr.menu_hr_root" sequence="40" name="Reporting"/>
<menuitem id="menu_hr_management" name="Human Resources" parent="hr.menu_hr_configuration" sequence="25"/>
<!--
==========
@ -320,7 +318,7 @@
</record>
<menuitem action="open_view_categ_form" id="menu_view_employee_category_form"
parent="hr.menu_hr_configuration" sequence="1"/>
parent="hr.menu_hr_configuration" sequence="1" groups="base.group_no_one"/>
<record id="open_view_categ_tree" model="ir.actions.act_window">
<field name="name">Categories Structure</field>
@ -357,24 +355,27 @@
<form string="Job" version="7.0">
<header>
<button name="job_recruitement" string="In Recruitement" states="open" type="object"/>
<button name="job_open" string="In Position" states="old,recruit" type="object"/>
<button name="job_old" string="Mark as Old" states="open,recruit" type="object"/>
<button name="job_open" string="Recruitment Done" states="recruit" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
</header>
<sheet>
<group col="4">
<field name="name" />
<field name="department_id" />
<field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
<field name="no_of_employee"/>
<field name="expected_employees"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<group>
<group>
<field name="name" />
<field name="department_id" />
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<group>
<field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
<field name="no_of_employee"/>
<field name="expected_employees"/>
</group>
</group>
<notebook>
<page string="Description">
<separator string="Job Description"/>
<label for="description"/>
<field name="description"/>
<separator string="Requirements"/>
<label for="requirements"/>
<field name="requirements"/>
</page>
<page string="Employees">
@ -457,7 +458,7 @@
</record>
<menuitem name="Recruitment" id="base.menu_crm_case_job_req_main" parent="menu_hr_root" groups="base.group_hr_user"/>
<menuitem parent="hr.menu_hr_management" id="menu_hr_job" action="action_hr_job" sequence="6"/>
<menuitem parent="hr.menu_hr_configuration" id="menu_hr_job" action="action_hr_job" sequence="6"/>
</data>
</openerp>

View File

@ -197,7 +197,7 @@ msgstr ""
#. module: hr
#: help:hr.job,expected_employees:0
msgid "Required number of employees in total for that job."
msgid "Expected number of employees for this job position after new recruitment."
msgstr ""
#. module: hr
@ -290,7 +290,7 @@ msgstr ""
#. module: hr
#: field:hr.job,expected_employees:0
msgid "Expected Employees"
msgid "Total Employees"
msgstr ""
#. module: hr
@ -702,5 +702,10 @@ msgstr ""
#. module: hr
#: field:hr.job,no_of_employee:0
msgid "Number of Employees"
msgid "Number of employees currently occupying this job position."
msgstr ""
#. module: hr
#: field:hr.job,no_of_recruitment:0
msgid "Number of new employees you expect to recruit."
msgstr ""

View File

@ -3,12 +3,12 @@
<data noupdate="1">
<record id="base.group_hr_user" model="res.groups">
<field name="name">HR Officer</field>
<field name="name">Officer</field>
<field name="category_id" ref="base.module_category_human_resources"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="base.group_hr_manager" model="res.groups">
<field name="name">HR Manager</field>
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_human_resources"/>
<field name="implied_ids" eval="[(4, ref('base.group_hr_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>

View File

@ -26,13 +26,13 @@
!python {model: hr.employee}: |
self.write(cr, uid, [ref('employee_niv')], {'job_id':ref('job_developer')})
-
Now I dont want to recruit new employee for this position. so I mark it as Old.
Now I dont want to recruit new employee for this position. so I mark it as Open.
-
!python {model: hr.job}: |
self.job_old(cr, uid, [ref('job_developer')])
self.job_open(cr, uid, [ref('job_developer')])
-
I check 'state' and number of 'Expected in Recruitment' after closing the Job position.
-
!assert {model: hr.job, id: job_developer, string: Job position is in 'old' state and no_of_recruitment = 0}:
- state == 'old'
!assert {model: hr.job, id: job_developer, string: Job position is in 'open' state and no_of_recruitment = 0}:
- state == 'open'
- no_of_recruitment == 0

View File

@ -123,7 +123,7 @@
<menuitem
sequence="35" id="hr.menu_open_view_attendance_reason_new_config" parent="hr.menu_hr_configuration" name="Attendance"
groups="base.group_no_one"/>
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config" />
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config" groups="base.group_no_one"/>
<record id="hr_attendance_employee" model="ir.ui.view">
<field name="name">hr.employee.form1</field>

View File

@ -72,7 +72,7 @@
<field name="employee_id" />
<field name="job_id"/>
<field name="wage"/>
<field name="type_id" widget="selection"/>
<field name="type_id"/>
</group>
<notebook>
<page string="Information" name="information">
@ -176,7 +176,7 @@
<field name="search_view_id" ref="hr_contract_type_view_search"/>
</record>
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56" sequence="6"/>
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56" sequence="6" groups="base.group_no_one"/>
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4" groups="base.group_hr_manager"/>
<!-- Contracts Button on Employee Form -->

View File

@ -265,7 +265,7 @@
<field name="help">Each employee may be assigned an Appraisal Plan. Such a plan defines the frequency and the way you manage your periodic personnel evaluation. You will be able to define steps and attach interviews to each step. OpenERP manages all kind of evaluations: bottom-up, top-down, self-evaluation and final evaluation by the manager.</field>
</record>
<menuitem name="Appraisal" parent="menu_eval_hr" id="menu_open_view_hr_evaluation_tree"
<menuitem name="Appraisals" parent="menu_eval_hr" id="menu_open_view_hr_evaluation_tree"
action="open_view_hr_evaluation_tree" groups="base.group_hr_user"/>
<record model="ir.ui.view" id="view_hr_evaluation_interview_form">

View File

@ -100,7 +100,6 @@
<field name="search_view_id" ref="view_evaluation_report_search"/>
</record>
<menuitem id="hr.menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10"/>
<menuitem action="action_evaluation_report_all" id="menu_evaluation_report_all" parent="hr.menu_hr_reporting" sequence="3" groups="base.group_hr_manager"/>
</data>

View File

@ -118,7 +118,6 @@
<field name="search_view_id" ref="view_hr_expense_report_search"/>
</record>
<menuitem id="hr.menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10"/>
<menuitem action="action_hr_expense_report_all" id="menu_hr_expense_report_all" parent="hr.menu_hr_reporting" sequence="2"/>
</data>

View File

@ -3,7 +3,7 @@
<data>
<record id="action_view_holiday_status_manager_board" model="ir.actions.act_window">
<field name="name">Leaves To Validate</field>
<field name="name">Leaves to Approve</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>

View File

@ -76,12 +76,12 @@ class hr_holidays_status(osv.osv):
'name': fields.char('Leave Type', size=64, required=True, translate=True),
'categ_id': fields.many2one('crm.case.categ', 'Meeting', domain="[('object_id.model', '=', 'crm.meeting')]", help='If you set a meeting type, OpenERP will create a meeting in the calendar once a leave is validated.'),
'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'),
'limit': fields.boolean('Allow to Override Limit', help='If you tick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
'limit': fields.boolean('Allow to Override Limit', help='If you select this checkbox, the system allows the employees to take more leaves than the available ones for this type.'),
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves': fields.function(_user_left_days, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken': fields.function(_user_left_days, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
'remaining_leaves': fields.function(_user_left_days, string='Remaining Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'),
'double_validation': fields.boolean('Apply Double Validation', help="If its True then its Allocation/Request have to be validated by second validator")
'double_validation': fields.boolean('Apply Double Validation', help="When selected, the Allocation/Leave Requests for this type require a second validation to be approved."),
}
_defaults = {
'color_name': 'red',
@ -280,6 +280,7 @@ class hr_holidays(osv.osv):
'date': record.date_from,
'end_date': record.date_to,
'date_deadline': record.date_to,
'leave_id': record.id,
}
case_id = meeting_obj.create(cr, uid, vals)
self._create_resource_leave(cr, uid, [record], context=context)
@ -396,11 +397,11 @@ class hr_holidays(osv.osv):
for obj in self.browse(cr, uid, ids):
if obj.holiday_status_id.double_validation:
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The %s request has been <b>validated</b>. A second validation is necessary and is now pending.")
_("The %s request has been <b>approved</b>. A second validation is necessary and is now pending.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
else:
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The %s request has been <b>validated</b>. The validation process is now over.")
_("The %s request has been <b>approved</b>. The validation process is now over.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
def holidays_valid2_notificate(self, cr, uid, ids, context=None):
@ -516,4 +517,10 @@ class hr_employee(osv.osv):
hr_employee()
class crm_meeting(osv.osv):
_inherit = 'crm.meeting'
_columns = {
'leave_id': fields.many2one('hr.holidays','Leave'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -20,7 +20,7 @@
<record model="hr.holidays.status" id="holiday_status_comp">
<field name="name">Compensatory Days</field>
<field name="limit">True</field>
<field name="color_name">brown</field>
<field name="color_name">lavender</field>
</record>
<!--Unpaid Leave -->

View File

@ -3,7 +3,7 @@
<data>
<report id="report_holidays_summary"
string="Summary Of Leaves"
string="Leaves Summary"
model="hr.holidays"
name="holidays.summary"
xsl="hr_holidays/report/holidays_summary.xsl"

View File

@ -16,7 +16,7 @@
<filter icon="terp-go-month" name="This Month" string="Month" domain="[('date_from','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"/>
<filter icon="terp-go-month" name="This Month-1" string=" Month-1"
domain="[('date_from','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date_from','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Holidays during last month"/>
help="Leaves during last month"/>
<separator orientation="vertical"/>
<field name="employee_id">
<filter icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leaves"/>
@ -518,5 +518,14 @@
</field>
</record>
<act_window
id="act_hr_leave_request_to_meeting"
name="Leave Meetings"
src_model="hr.holidays"
res_model="crm.meeting"
domain="[('leave_id', '=', active_id)]"
view_mode="tree,form,calendar,gantt"
view_type="form"/>
</data>
</openerp>

View File

@ -401,8 +401,8 @@ msgstr ""
#. module: hr_holidays
#: help:hr.holidays.status,double_validation:0
msgid ""
"If its True then its Allocation/Request have to be validated by second "
"validator"
"When selected, the Allocation/Leave Requests for this type require a second "
"validation to be approved."
msgstr ""
#. module: hr_holidays
@ -767,8 +767,8 @@ msgstr ""
#. module: hr_holidays
#: help:hr.holidays.status,limit:0
msgid ""
"If you tick this checkbox, the system will allow, for this section, the "
"employees to take more leaves than the available ones."
"If you select this checkbox, the system allows the employees to take more "
"leaves than the available ones for this type."
msgstr ""
#. module: hr_holidays

View File

@ -149,9 +149,9 @@
</tr>
</blockTable>
<spacer length="1.0cm" />
<para style="title" t="1">Off-Days' Summary</para>
<para style="title" t="1">Leaves Summary <xsl:value-of select="report/name" /></para>
<spacer length="0.5cm" />
<para style="normal-title" t="1">Analyze from <u><xsl:value-of select="report/from" /></u> to <u> <xsl:value-of select="report/to" /> </u> of the <u><xsl:value-of select="report/type" /></u> holidays. </para>
<para style="normal-title" t="1">Analyze from <u><xsl:value-of select="report/from" /></u> to <u> <xsl:value-of select="report/to" /> </u> of the <u><xsl:value-of select="report/type" /></u> leaves. </para>
<spacer length="1.0cm" />
<xsl:variable name="cols_legend">
<xsl:text>0.7cm,5.0cm</xsl:text>
@ -236,7 +236,7 @@
<xsl:attribute name="colWidths"><xsl:value-of select="$cols_legend"/></xsl:attribute>
<tr>
<td>Color</td>
<td>Holiday Type</td>
<td>Leave Type</td>
</tr>
<xsl:for-each select="report/legend">

View File

@ -106,6 +106,10 @@ class report_custom(report_rml):
eom = som+datetime.timedelta(59)
day_diff=eom-som
name = ''
if len(data['form'].get('emp', ())) == 1:
name = obj_emp.read(cr, uid, data['form']['emp'][0], ['name'])['name']
if data['form']['holiday_type']!='both':
type=data['form']['holiday_type']
if data['form']['holiday_type']=='Confirmed':
@ -113,11 +117,12 @@ class report_custom(report_rml):
else:
holiday_type=('validate')
else:
type="Confirmed and Validated"
type="Confirmed and Approved"
holiday_type=('confirm','validate')
date_xml.append('<from>%s</from>\n'% (str(rml_obj.formatLang(som.strftime("%Y-%m-%d"),date=True))))
date_xml.append('<to>%s</to>\n' %(str(rml_obj.formatLang(eom.strftime("%Y-%m-%d"),date=True))))
date_xml.append('<type>%s</type>'%(type))
date_xml.append('<name>%s</name>'%(name))
# date_xml=[]
for l in range(0,len(legend)):

View File

@ -5,7 +5,7 @@
import time
ctx={}
ctx.update({'model': 'hr.department','active_ids': [ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')]})
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'depts' : [(6,0,[ref('hr.dep_sales')])],'holiday_type' : 'Validated'}
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'depts' : [(6,0,[ref('hr.dep_sales')])],'holiday_type' : 'Approved'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_dept',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
@ -16,7 +16,7 @@
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')]})
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'emp' : [(6,0,[ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')])],'holiday_type' : 'Validated'}
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'emp' : [(6,0,[ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')])],'holiday_type' : 'Approved'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_employee',wiz_data=data_dict, context=ctx, our_module='hr_holidays')

View File

@ -26,16 +26,16 @@ from tools.translate import _
class hr_holidays_summary_dept(osv.osv_memory):
_name = 'hr.holidays.summary.dept'
_description = 'HR Holidays Summary Report By Department'
_description = 'HR Leaves Summary Report By Department'
_columns = {
'date_from': fields.date('From', required=True),
'depts': fields.many2many('hr.department', 'summary_dept_rel', 'sum_id', 'dept_id', 'Department(s)'),
'holiday_type': fields.selection([('Validated','Validated'),('Confirmed','Confirmed'),('both','Both Validated and Confirmed')], 'Leave Type', required=True)
'holiday_type': fields.selection([('Approved','Approved'),('Confirmed','Confirmed'),('both','Both Approved and Confirmed')], 'Leave Type', required=True)
}
_defaults = {
'date_from': lambda *a: time.strftime('%Y-%m-01'),
'holiday_type': 'Validated'
'holiday_type': 'Approved'
}
def print_report(self, cr, uid, ids, context=None):

View File

@ -7,7 +7,7 @@
<field name="model">hr.holidays.summary.dept</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Holidays by Department" version="7.0">
<form string="Leaves by Department" version="7.0">
<header>
<button icon="gtk-print" name="print_report" string="Print" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
@ -22,7 +22,7 @@
</record>
<record id="action_hr_holidays_summary_dept" model="ir.actions.act_window">
<field name="name">Holidays by Department</field>
<field name="name">Leaves by Department</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays.summary.dept</field>
<field name="view_type">form</field>
@ -30,11 +30,9 @@
<field name="target">new</field>
</record>
<menuitem id="menu_hr_leaves_reports" parent="base.menu_hr_reports" sequence="10" name="Leaves"/>
<menuitem
name="Leaves by Department"
parent="menu_hr_leaves_reports"
parent="menu_hr_reporting_holidays"
action="action_hr_holidays_summary_dept"
id="menu_account_central_journal"
icon="STOCK_PRINT"/>

View File

@ -24,16 +24,16 @@ from osv import osv, fields
class hr_holidays_summary_employee(osv.osv_memory):
_name = 'hr.holidays.summary.employee'
_description = 'HR Holidays Summary Report By Employee'
_description = 'HR Leaves Summary Report By Employee'
_columns = {
'date_from': fields.date('From', required=True),
'emp': fields.many2many('hr.employee', 'summary_emp_rel', 'sum_id', 'emp_id', 'Employee(s)'),
'holiday_type': fields.selection([('Validated','Validated'),('Confirmed','Confirmed'),('both','Both Validated and Confirmed')], 'Select Holiday Type', required=True)
'holiday_type': fields.selection([('Approved','Approved'),('Confirmed','Confirmed'),('both','Both Approved and Confirmed')], 'Select Leave Type', required=True)
}
_defaults = {
'date_from': lambda *a: time.strftime('%Y-%m-01'),
'holiday_type': 'Validated',
'holiday_type': 'Approved',
}
def print_report(self, cr, uid, ids, context=None):

View File

@ -7,25 +7,25 @@
<field name="model">hr.holidays.summary.employee</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Employee's Holidays">
<group col="4" colspan="6">
<field name="date_from"/>
<newline/>
<field name="holiday_type"/>
<newline/>
<field name="emp" invisible="True"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<form string="Leaves Summary">
<group col="4" colspan="6">
<field name="date_from"/>
<newline/>
<field name="holiday_type"/>
<newline/>
<field name="emp" invisible="True"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="print_report" string="Print" colspan="1" type="object" icon="gtk-print"/>
</group>
</form>
</group>
</form>
</field>
</record>
<record id="action_hr_holidays_summary_employee" model="ir.actions.act_window">
<field name="name">Employee's Holidays</field>
<field name="name">Leaves Summary</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays.summary.employee</field>
<field name="view_type">form</field>
@ -35,7 +35,7 @@
<record model="ir.values" id="hr_holidays_summary_employee_value">
<field name="model_id" ref="hr.model_hr_employee" />
<field name="name">Employee's Holidays</field>
<field name="name">Leaves Summary</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_holidays_summary_employee'))" />
<field name="key">action</field>

View File

@ -3,7 +3,7 @@
<data>
<!-- Root Menus -->
<menuitem id="payroll_configure" parent="hr.menu_hr_configuration" name="Payroll" groups="base.group_no_one" sequence="45"/>
<menuitem id="payroll_configure" parent="hr.menu_hr_configuration" name="Payroll" groups="base.group_hr_manager" sequence="45"/>
<menuitem id="menu_hr_root_payroll" parent="hr.menu_hr_root" name="Payroll" sequence="30"/>
<menuitem id="menu_hr_payroll_reporting" parent="hr.menu_hr_reporting" name="Payroll" groups="base.group_hr_manager"/>
@ -482,6 +482,7 @@
action="action_hr_salary_rule_category"
parent="payroll_configure"
sequence="11"
groups="base.group_no_one"
/>
<record id="action_hr_salary_rule_category_tree_view" model="ir.actions.act_window">
<field name="name">Salary Rule Categories Hierarchy</field>
@ -496,6 +497,7 @@
parent="payroll_configure"
sequence="12"
icon="STOCK_INDENT"
groups="base.group_no_one"
/>
<!--
@ -670,7 +672,7 @@
<field name="search_view_id" ref="view_hr_rule_filter"/>
</record>
<menuitem id="menu_action_hr_salary_rule_form" action="action_salary_rule_form" parent="payroll_configure" sequence="12" groups="base.group_no_one"/>
<menuitem id="menu_action_hr_salary_rule_form" action="action_salary_rule_form" parent="payroll_configure" sequence="12"/>
<act_window name="All Children Rules"

View File

@ -187,7 +187,7 @@ class hr_applicant(base_stage, osv.Model):
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_cc': fields.text('Watchers Emails', size=252, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'probability': fields.float('Probability'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'partner_id': fields.many2one('res.partner', 'Contact'),
'create_date': fields.datetime('Creation Date', readonly=True, select=True),
'write_date': fields.datetime('Update Date', readonly=True),
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage',
@ -221,7 +221,7 @@ class hr_applicant(base_stage, osv.Model):
'department_id': fields.many2one('hr.department', 'Department'),
'survey': fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
'response': fields.integer("Response"),
'reference': fields.char('Refered By', size=128),
'reference': fields.char('Referred By', size=128),
'source_id': fields.many2one('hr.recruitment.source', 'Source'),
'day_open': fields.function(_compute_day, string='Days to Open', \
multi='day_open', type="float", store=True),
@ -309,24 +309,19 @@ class hr_applicant(base_stage, osv.Model):
value = {}
for opp in self.browse(cr, uid, ids, context=context):
# Get meeting views
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
res = data_obj.read(cr, uid, result, ['res_id'], context=context)
id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
if id1:
id1 = data_obj.browse(cr, uid, id1, context=context).res_id
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
context = {
search_view = data_obj.get_object(cr, uid, 'crm', 'view_crm_case_meetings_filter', context)
calendar_view = data_obj.get_object(cr, uid, 'crm', 'crm_case_calendar_view_meet', context)
form_view = data_obj.get_object(cr, uid, 'crm', 'crm_case_form_view_meet', context)
tree_view = data_obj.get_object(cr, uid, 'crm', 'crm_case_tree_view_meet', context)
category = data_obj.get_object(cr, uid, 'hr_recruitment', 'categ_meet_interview', context)
context.update({
'default_applicant_id': opp.id,
'default_partner_id': opp.partner_id and opp.partner_id.id or False,
'default_email_from': opp.email_from,
'default_state': 'open',
'default_name': opp.name
}
'default_categ_id': category.id,
'default_name': opp.name,
})
value = {
'name': ('Meetings'),
'domain': "[('user_id','=',%s)]" % (uid),
@ -335,10 +330,10 @@ class hr_applicant(base_stage, osv.Model):
'view_mode': 'calendar,form,tree',
'res_model': 'crm.meeting',
'view_id': False,
'views': [(id1, 'calendar'), (id2, 'form'), (id3, 'tree')],
'views': [(calendar_view.id, 'calendar'), (form_view.id, 'form'), (tree_view.id, 'tree')],
'type': 'ir.actions.act_window',
'search_view_id': res['res_id'],
'nodestroy': True
'search_view_id': search_view.id,
'nodestroy': True,
}
return value
@ -557,6 +552,29 @@ class hr_job(osv.osv):
_columns = {
'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"),
}
def action_print_survey(self, cr, uid, ids, context=None):
if context is None:
context = {}
datas = {}
record = self.browse(cr, uid, ids, context=context)[0]
if record.survey_id:
datas['ids'] = [record.survey_id.id]
datas['model'] = 'survey.print'
context.update({'response_id': [0], 'response_no': 0,})
return {
'type': 'ir.actions.report.xml',
'report_name': 'survey.form',
'datas': datas,
'context' : context,
'nodestroy':True,
}
class crm_meeting(osv.osv):
_inherit = 'crm.meeting'
_columns = {
'applicant_id': fields.many2one('hr.applicant','Applicant'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -5,6 +5,13 @@
-->
<data>
<!-- Case category (for interview meetings) -->
<record model="crm.case.categ" id="categ_meet_interview">
<field name="name">Interview</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
</record>
<!-- HR Recruitment Source -->
<record model="hr.recruitment.source" id="source_linkedin">

View File

@ -54,7 +54,7 @@
parent="base.menu_crm_case_job_req_main"
id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/>
<menuitem parent="base.menu_crm_case_job_req_main" id="menu_hr_job" action="hr.action_hr_job" sequence="2"/>
<menuitem parent="hr.menu_hr_configuration" id="hr.menu_hr_job" action="hr.action_hr_job" sequence="2"/>
</data>

View File

@ -7,6 +7,15 @@
parent="hr.menu_hr_configuration"
sequence="40" />
<act_window
domain="[('applicant_id', '=', active_id)]"
id="act_hr_applicant_to_meeting"
name="Meetings"
res_model="crm.meeting"
src_model="hr.applicant"
view_mode="tree,form,calendar,graph"
view_type="form"/>
# ------------------------------------------------------
# Job Categories
# ------------------------------------------------------
@ -70,7 +79,7 @@
<field name="model">hr.applicant</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Jobs - Recruitment Form" version="7.0">
<form string="Jobs - Recruitment Form" version="7.0">
<header>
<button name="%(action_hr_recruitment_hired_employee)d" string="Hire" type="action"
states="open,pending"/>
@ -89,76 +98,81 @@
<field name="stage_id" widget="statusbar"/>
</header>
<sheet>
<group col="4">
<field name="name" string="Subject"/>
<group colspan="2" col="4">
<field name="partner_name"/>
<button name="action_makeMeeting" type="object" string="Meeting" icon="gtk-index"/>
<button string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
</group>
<field name="user_id"/>
<field name="job_id" on_change="onchange_job(job_id)"/>
<field name="department_id" widget="selection" on_change="onchange_department_id(department_id)"/>
<field name="state" groups="base.group_no_one"/>
<field name="date_action"/>
<group colspan="2" col="8">
<div class="oe_right oe_form_button_box">
<button name="action_makeMeeting" type="object"
string="Schedule Interview" icon="gtk-index" help="Schedule interview with this applicant"/>
<button name="%(survey.action_view_survey_question_message)d" type="action"
string="Start Interview" icon="gtk-execute" help="Answer related job question"
context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant'}"
attrs="{'invisible':[('survey','=',False)]}"/>
<button name="action_print_survey" type="object"
string="Print Interview" icon="gtk-print" help="Print interview report"
attrs="{'invisible':[('survey','=',False)]}"/>
</div>
<div class="oe_form_title">
<label for="name" class="oe_form_readonly_hidden"/>
<h1><field name="name"/></h1>
<label for="partner_name" class="oe_form_readonly_hidden"/>
<h2><field name="partner_name"/></h2>
<field name="type_id" placeholder="Degree"/>
</div>
<group>
<group>
<field name="user_id"/>
<field name="title_action"/>
<field name="survey" invisible="1"/>
<button name="action_print_survey" string="Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant'}" attrs="{'readonly':[('survey','=',False)]}"/>
<field name="response" invisible="1"/>
<field name="date_action"/>
</group>
<group>
<field name="job_id" on_change="onchange_job(job_id)"/>
<field name="priority" string="Appreciation"/>
<field name="survey" invisible="1"/>
<field name="response" invisible="1"/>
<field name="department_id" widget="selection" on_change="onchange_department_id(department_id)"/>
<field name="state" groups="base.group_no_one"/>
</group>
<newline/>
</group>
<notebook colspan="4">
<page string="Job Info">
<notebook>
<page string="Application">
<group>
<group string="Contact">
<label for="partner_id"/>
<div>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<button string="Create Partner"
name="%(action_hr_recruitment_partner_create)d"
icon="gtk-index" type="action" attrs="{'readonly':[('partner_id','!=',False)]}" groups="base.group_partner_manager"/>
<field name="partner_id" class="oe_form_inline"
on_change="onchange_partner_id(partner_id, email_from)"/>
<button class="oe_form_inline"
string="Create" help="Create a new contact for this applicant" icon="gtk-index"
name="%(action_hr_recruitment_partner_create)d" type="action"
attrs="{'invisible':[('partner_id','!=',False)]}"/>
</div>
<field name="email_from"/>
<field name="email_from" widget="email"/>
<field name="partner_phone"/>
<field name="partner_mobile"/>
</group>
<group string="Contract Data">
<field name="availability"/>
<field name="salary_expected"/>
<field name="salary_expected_extra" nolabel="1"/>
<field name="salary_proposed"/>
<field name="salary_proposed_extra" nolabel="1"/>
</group>
<group string="Qualification">
<field name="type_id"/>
<field name="priority" string="Appreciation"/>
<group string="Reference">
<field name="source_id"/>
<field name="reference"/>
</group>
<group string="Dates">
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
<field name="date_open"/>
<group string="Contract">
<field name="salary_expected"/>
<field name="salary_expected_extra"/>
<field name="salary_proposed"/>
<field name="salary_proposed_extra"/>
<field name="availability"/>
</group>
</group>
<separator string="Details"/>
<field name="description"/>
</page>
<page string="Notes">
<field name="description"/>
</page>
</notebook>
</sheet>
<div class="oe_form_bottom">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>
<record model="ir.ui.view" id="crm_case_graph_view_job">
<field name="name">Jobs - Recruitment Graph</field>
<field name="model">hr.applicant</field>
@ -233,7 +247,7 @@
date_start="date_action" color="user_id">
<field name="name" />
<field name="partner_name" />
<field name="stage_id" />
<field name="title_action"/>
</calendar>
</field>
</record>
@ -252,93 +266,70 @@
<field name="survey"/>
<field name="user_id"/>
<field name="user_email"/>
<templates>
<t t-name="partner-infos">
<div t-if="record.partner_phone.raw_value">
Phone: <field name="partner_phone"/>
</div>
<div t-if="record.partner_mobile.raw_value">
Mobile: <field name="partner_mobile"/>
</div>
</t>
<t t-name="kanban-box">
<t t-if="record.priority.raw_value == 1" t-set="border">oe_kanban_color_red</t>
<div t-attf-class="#{kanban_color(record.color.raw_value)} #{border || ''}">
<div class="oe_kanban_box oe_kanban_color_border">
<table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
<tr>
<td align="left" valign="middle" class="oe_kanban_title" tooltip="partner-infos">
<field name="partner_name"/>
<field name="type_id"/>
<field name="job_id"/>
<field name="title_action"/>
<templates>
<t t-name="kanban-box">
<t t-if="record.priority.raw_value == '1'" t-set="border">oe_kanban_color_green</t>
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_auto_height">
<a class="oe_kanban_menuaction oe_i">B</a>
<ul class="oe_kanban_menu">
<li><a type="edit">Edit...</a></li>
<li><a type="delete">Delete</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
<div class="oe_kanban_content" >
<h3 class="oe_kanban_ellipsis"><field name="name"/>
</h3>
<div style="margin-bottom:2;padding-top:5px;white-space: nowrap;" >
<field name="partner_name"/>
<t t-if="!record.partner_name.raw_value">
<field name="email_from"/>
</t>
</td>
<td valign="top" width="22"><img t-att-src="kanban_gravatar(record.user_email.value, 22)" class="oe_kanban_gravatar" t-att-title="record.user_id.value"/></td>
</tr>
</table>
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
<div class="oe_kanban_right">
<span class="oe_kanban_highlight">
<div class="oe_kanban_right">
<span class="oe_kanban_highlight">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3">
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['2']">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['1']">
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
</span>
</span>
</div>
</div>
<div style="white-space: nowrap;" >
<div t-if="record.type_id.raw_value">
(<field name="type_id"/>)
</div>
</div>
<div style="padding-top:5px;white-space: nowrap;" >
<t t-if="record.job_id.raw_value">Applied for <field name="job_id" /></t>
</div>
<div style="padding-top:5px;white-space: nowrap;" >
<t t-if="record.title_action.raw_value">
<field name="title_action" /> on
<field name="date_action" />
</t>
</div>
<field name="job_id"/>
<t t-if="!record.job_id.raw_value">
<field name="name"/>
</t>
<div class="oe_kanban_clear" style="padding-top: 4px"/>
<div t-if="record.type_id.raw_value or record.source_id.raw_value">
<span t-if="record.type_id.raw_value" class="oe_kanban_highlight oe_kanban_button" style="font-size: 100%%">
<field name="type_id"/>
</span>
<span t-if="record.source_id.raw_value" class="oe_kanban_highlight oe_kanban_button" style="font-size: 100%%">
<field name="source_id"/>
</span>
<div align="left" width="22" style="padding-top:5px;white-space: nowrap;" >
<div align="right">
<img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
</div>
<div t-if="record.date_action.raw_value or record.title_action.raw_value">
<i t-if="record.date_action.raw_value"><field name="date_action"/> :</i> <field name="title_action"/>
</div>
</div>
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
<div class="oe_kanban_left">
<a string="Edit" icon="gtk-edit" type="edit"/>
<a string="Delete" icon="gtk-close" type="delete"/>
<a string="Change Color" icon="color-picker" type="color" name="color"/>
<a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
<a string="Add Internal Note" name="%(crm.action_crm_add_note)d" context="{'model': 'crm.lead' }" icon="terp-document-new" type="action"/>
<a string="Schedule Meeting" name="action_makeMeeting" type="object" icon="stock_calendar"/>
<a t-if="record.survey.raw_value" name="action_print_survey" type="object" string="Print Interview" icon="gtk-print" />
</div>
<div class="oe_kanban_right">
<a name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<a name="case_open" string="In Progress" states="draft,pending" type="object" icon="kanban-apply"/>
<a name="case_pending" string="Pending" states="open" type="object" icon="kanban-pause"/>
<a name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/>
</div>
<br class="oe_kanban_clear"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
</t>
</templates>
</kanban>
</field>
</record>
# ------------------------------------------------------
# HR Job
# ------------------------------------------------------
@ -349,8 +340,15 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml">
<field name="department_id" position="after">
<field name="survey_id"/>
<field name="expected_employees" version="7.0" position="after">
<label for="survey_id" />
<div>
<field name="survey_id" class="oe_form_inline"/>
<button class="oe_form_inline"
string="Interview" icon="gtk-print"
name="action_print_survey" type="object"
attrs="{'invisible':[('survey_id','=',False)]}"/>
</div>
</field>
</field>
</record>
@ -379,7 +377,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Stage" version="7.0">
<group col="4" string="Stage Definition">
<group string="Stage Definition">
<field name="name"/>
<field name="department_id"/>
<field name="sequence"/>
@ -406,7 +404,7 @@
name="Stages"
parent="menu_hr_recruitment_recruitment"
action="hr_recruitment_stage_act"
sequence="1"/>
sequence="1" groups="base.group_no_one"/>
<!-- Degree Tree View -->
@ -471,10 +469,8 @@
<field name="model">hr.recruitment.source</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sources of Applicants" version="7.0">
<group>
<field name="name"/>
</group>
<form string="Sources of Applicants">
<field name="name"/>
</form>
</field>
</record>
@ -490,6 +486,23 @@
action="hr_recruitment_source_action"
sequence="10" groups="base.group_no_one"/>
<record model="ir.ui.view" id="crm_meeting_form_view">
<field name="name">CRM - Meetings Form</field>
<field name="model">crm.meeting</field>
<field name="type">form</field>
<field name="inherit_id" ref="crm.crm_case_form_view_meet"/>
<field name="arch" type="xml">
<field name="partner_id" position="before">
<field name="applicant_id" attrs="{'invisible': [('categ_id','!=',%(hr_recruitment.categ_meet_interview)d)]}"/>
</field>
<field name="partner_id" position="attributes">
<attribute name="attrs">{'invisible': [('categ_id','=',%(hr_recruitment.categ_meet_interview)d)]}</attribute>
</field>
<field name="section_id" position="attributes">
<attribute name="attrs">{'invisible': [('categ_id','=',%(hr_recruitment.categ_meet_interview)d)]}</attribute>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -54,14 +54,9 @@ msgstr ""
msgid "Sources of Applicants"
msgstr ""
#. module: hr_recruitment
#: field:hr.recruitment.report,delay_open:0
msgid "Avg. Delay to Open"
msgstr ""
#. module: hr_recruitment
#: field:hr.recruitment.report,nbr:0
msgid "# of Cases"
msgid "# of Applications"
msgstr ""
#. module: hr_recruitment
@ -150,7 +145,7 @@ msgstr ""
#. module: hr_recruitment
#: view:hr.applicant:0 view:hr.recruitment.partner.create:0
#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_partner_create
msgid "Create Partner"
msgid "Create Contact"
msgstr ""
#. module: hr_recruitment
@ -160,7 +155,7 @@ msgstr ""
#. module: hr_recruitment
#: field:hr.applicant,reference:0
msgid "Refered By"
msgid "Referred By"
msgstr ""
#. module: hr_recruitment
@ -239,6 +234,11 @@ msgstr ""
msgid "Interview Form"
msgstr ""
#. module: hr_recruitment
#: view:hr.job:0
msgid "Interview"
msgstr ""
#. module: hr_recruitment
#: help:hr.job,survey_id:0
msgid ""
@ -349,7 +349,7 @@ msgstr ""
#. module: hr_recruitment
#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:39
#, python-format
msgid "A partner is already defined on this job request."
msgid "A contact is already defined on this job request."
msgstr ""
#. module: hr_recruitment
@ -516,6 +516,7 @@ msgstr ""
#. module: hr_recruitment
#: view:hr.applicant:0
#: field:hr.applicant,partner_id:0 view:hr.recruitment.report:0
msgid "Contact"
msgstr ""
@ -530,7 +531,6 @@ msgid "Qualification"
msgstr ""
#. module: hr_recruitment
#: field:hr.applicant,partner_id:0 view:hr.recruitment.report:0
#: field:hr.recruitment.report,partner_id:0
msgid "Partner"
msgstr ""
@ -828,7 +828,12 @@ msgstr ""
#. module: hr_recruitment
#: field:hr.recruitment.report,salary_prop_avg:0
msgid "Avg Salary Proposed"
msgid "Avg. Proposed Salary"
msgstr ""
#. module: hr_recruitment
#: field:hr.recruitment.report,salary_exp_avg:0
msgid "Avg. Expected Salary"
msgstr ""
#. module: hr_recruitment
@ -871,7 +876,7 @@ msgstr ""
#. module: hr_recruitment
#: view:hr.recruitment.partner.create:0
msgid "Are you sure you want to create a partner based on this job request ?"
msgid "Are you sure you want to create a contact based on this job request ?"
msgstr ""
#. module: hr_recruitment
@ -959,7 +964,7 @@ msgstr ""
#. module: hr_recruitment
#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:57
#, python-format
msgid "A partner is already existing with the same name."
msgid "A contact is already existing with the same name."
msgstr ""
#. module: hr_recruitment

View File

@ -40,8 +40,8 @@ class hr_recruitment_report(osv.osv):
_columns = {
'user_id': fields.many2one('res.users', 'User', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
'nbr': fields.integer('# of Applications', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'month':fields.selection([('01', 'January'), ('02', 'February'), \
('03', 'March'), ('04', 'April'),\
('05', 'May'), ('06', 'June'), \
@ -59,12 +59,11 @@ class hr_recruitment_report(osv.osv):
'department_id': fields.many2one('hr.department','Department',readonly=True),
'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),
'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Account')),
'salary_prop_avg' : fields.float("Avg Salary Proposed", group_operator="avg", digits_compute=dp.get_precision('Account')),
'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Account')),
'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
'available': fields.float("Availability"),
'delay_open': fields.float('Avg. Delay to Open', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the project issue"),
'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the project issue"),
}
@ -93,7 +92,7 @@ class hr_recruitment_report(osv.osv):
sum(salary_proposed) as salary_prop,
(sum(salary_proposed)/count(*)) as salary_prop_avg,
sum(salary_expected) as salary_exp,
extract('epoch' from (s.date_open-s.create_date))/(3600*24) as delay_open,
(sum(salary_expected)/count(*)) as salary_exp_avg,
extract('epoch' from (s.date_closed-s.create_date))/(3600*24) as delay_close,
count(*) as nbr
from hr_applicant s

View File

@ -9,23 +9,24 @@
<tree string="Recruitment Analysis">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="job_id" invisible="1"/>
<field name="job_id"/>
<field name="stage_id" invisible="1" />
<field name="department_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_id" groups="base.group_multi_company" invisible="1"/>
<field name="state" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="nbr" sum="# Cases"/>
<field name="nbr" sum="# of Applications"/>
<field name="available" sum="Available"/>
<field name="salary_exp" sum="Expected Salary"/>
<field name="salary_exp_avg" sum="Avg Expected Salary" />
<field name="salary_prop" sum="Proposed Salary" />
<field name="salary_prop_avg" sum="Avg Proposed Salary" />
<field name="delay_open" avg='Avg Delay to Open'/>
<field name="delay_close" avg='Avg Delay to Close'/>
<field name="priority"/>
</tree>
</field>
</record>
@ -129,7 +130,6 @@
<field name="context">{'search_default_year':1,'search_default_month':1,'search_default_department':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_hr_recruitment_report_search"/>
</record>
<menuitem id="hr.menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10" groups="base.group_hr_manager,base.group_hr_user"/>
<menuitem action="action_hr_recruitment_report_all" id="menu_hr_recruitment_report_all" parent="hr.menu_hr_reporting" sequence="1"/>
</data>

View File

@ -36,7 +36,7 @@ class hr_recruitment_partner_create(osv.osv_memory):
for case in case_obj.browse(cr, uid, context['active_ids'], context=context):
if case.partner_id:
raise osv.except_osv(_('Error !'),
_('A partner is already defined on this job request.'))
_('A contact is already defined on this job request.'))
pass
def make_order(self, cr, uid, ids, context=None):
@ -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 partner 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,

View File

@ -9,19 +9,19 @@
<field name="arch" type="xml">
<form string="Convert To Partner">
<group col="4" colspan="6">
<label string="Are you sure you want to create a partner based on this job request ?"/>
<label string="Are you sure you want to create a contact based on this job request ?"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="make_order" string="Create Partner" colspan="1" type="object" icon="gtk-execute" groups="base.group_partner_manager"/>
<button name="make_order" string="Create Contact" colspan="1" type="object" icon="gtk-execute" groups="base.group_partner_manager"/>
</group>
</form>
</field>
</record>
<record id="action_hr_recruitment_partner_create" model="ir.actions.act_window">
<field name="name">Create Partner</field>
<field name="name">Create Contact</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.recruitment.partner.create</field>
<field name="view_type">form</field>

View File

@ -122,7 +122,7 @@
</field>
</record>
<menuitem id="menu_hr_timesheet_reports" parent="base.menu_hr_reports" sequence="5" name="Timesheet"/>
<menuitem id="menu_hr_timesheet_reports" parent="hr.menu_hr_reporting" sequence="5" name="Timesheet"/>
</data>

View File

@ -446,7 +446,7 @@ msgstr ""
#. module: hr_timesheet
#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_my
msgid "My Timesheet"
msgid "My Current Timesheet"
msgstr ""
#. module: hr_timesheet

View File

@ -34,7 +34,7 @@
<menuitem action="action_hr_timesheet_employee"
id="menu_hr_timesheet_employee"
parent="menu_hr_timesheet_reports"
parent="menu_hr_reporting_timesheet"
sequence="2" icon="STOCK_PRINT"/>

View File

@ -37,7 +37,7 @@
<menuitem action="action_hr_timesheet_users"
id="menu_hr_timesheet_users"
parent="menu_hr_timesheet_reports"
parent="menu_hr_reporting_timesheet"
groups="base.group_hr_manager" sequence="3" icon="STOCK_PRINT"/>

View File

@ -38,7 +38,7 @@
<menuitem action="action_hr_timesheet_analytic_profit"
id="menu_hr_timesheet_analytic_profit"
parent="hr_timesheet.menu_hr_timesheet_reports" icon="STOCK_PRINT"/>
parent="hr_timesheet.menu_hr_reporting_timesheet" icon="STOCK_PRINT"/>
</data>
</openerp>

View File

@ -14,7 +14,7 @@
</record>
<record id="menu_act_hr_timesheet_sheet_form_my_current" model="ir.ui.menu">
<field name="name">My Timesheet</field>
<field name="name">My Current Timesheet</field>
<field eval="1" name="sequence"/>
<field name="parent_id" ref="hr_attendance.menu_hr_time_tracking"/>
<field name="icon">STOCK_JUSTIFY_FILL</field>

View File

@ -761,7 +761,7 @@ msgstr ""
#: model:ir.actions.act_window,name:hr_timesheet_sheet.action_hr_timesheet_current_open
#: model:ir.actions.server,name:hr_timesheet_sheet.ir_actions_server_timsheet_sheet
#: model:ir.ui.menu,name:hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current
msgid "My Timesheet"
msgid "My Current Timesheet"
msgstr ""
#. module: hr_timesheet_sheet

View File

@ -6,7 +6,7 @@
<field name="model">hr.timesheet.current.open</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="My Timesheet" version="7.0">
<form string="My Current Timesheet" version="7.0">
<header>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-camera_test" name="open_timesheet" string="Open" type="object"/>
@ -17,7 +17,7 @@
</record>
<record id="action_hr_timesheet_current_open" model="ir.actions.act_window">
<field name="name">My Timesheet</field>
<field name="name">My Current Timesheet</field>
<field name="res_model">hr.timesheet.current.open</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -26,7 +26,7 @@
<field name="help">My Timesheet opens your timesheet so that you can book your activities into the system. From the same form, you can register your attendances (Sign In/Out) and describe the working hours made on the different projects. At the end of the period defined in the company, the timesheet is confirmed by the user and can be validated by his manager. If required, as defined on the project, you can generate the invoices based on the timesheet.</field>
</record>
<menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="My Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
<menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="My Current Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
</data>
</openerp>

View File

@ -358,7 +358,7 @@ class survey_question_wiz(osv.osv_memory):
fields['progress_bar_' + tools.ustr(page_number)] = {'type':'float', 'string':"Progress", 'views':{}}
etree.SubElement(xml_group, 'label', {'string': tools.ustr(page_number+ 1) + "/" + tools.ustr(total_pages)})
etree.SubElement(xml_group, 'button', {'icon': "gtk-cancel", 'special': "cancel",'string':"Cancel"})
if pre_button:
etree.SubElement(xml_group, 'button', {'colspan':"1",'icon':"gtk-go-back",'name':"action_previous",'string':"Previous",'type':"object"})
but_string = "Next"
@ -450,6 +450,7 @@ class survey_question_wiz(osv.osv_memory):
# hr.applicant: if survey answered directly in system: attach report to applicant
if context.get('active_model') == 'hr.applicant':
self.pool.get('hr.applicant').write(cr,uid,[context.get('active_ids')[0]],{'response':context.get('response_id')})
result = base64.b64encode(result)
file_name = file_name + '.pdf'
ir_attachment = self.pool.get('ir.attachment').create(cr, uid,

View File

@ -5,13 +5,12 @@
<!--
Survey Question Wizard
-->
<record id="view_survey_question_message" model="ir.ui.view">
<field name="name">Survey Question</field>
<field name="name">Answer Survey</field>
<field name="model">survey.question.wiz</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Your Messages" version="7.0">
<form string="Your Messages" version="7.0">
<field name="name" nolabel="1" colspan="4" />
</form>
</field>
@ -29,7 +28,7 @@
</record>
<record id="action_view_survey_question_message" model="ir.actions.act_window">
<field name="name">Survey Question</field>
<field name="name">Answer Survey</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">survey.question.wiz</field>
<field name="view_type">form</field>
@ -37,6 +36,5 @@
<field name="target">new</field>
</record>
</data>
</openerp>