[FIX]leaves replaced by Time off

bzr revid: kbh@tinyerp.com-20121219092710-i9x9j0c6iykix4d6
This commit is contained in:
Khushboo Bhatt (Open ERP) 2012-12-19 14:57:10 +05:30
parent 0b12f3f529
commit a19915e805
22 changed files with 65 additions and 65 deletions

View File

@ -5,7 +5,7 @@
<field name="name" model="res.company" use="name" search="[]"/>
</record>
<record id="analytic_absences" model="account.analytic.account">
<field name="name">Leaves</field>
<field name="name">Time off</field>
<field name="type">view</field>
<field name="parent_id" ref="analytic_root"/>
</record>

View File

@ -10,7 +10,7 @@
<field name="subject">Employee Directory application installed!</field>
<field name="body"><![CDATA[<p>Manage your human resources with OpenERP: employees and their hierarchy, HR departments and job positions.</p>
<p>More HR features are available via extra applications: Recruitment Process (manage job positions and recruitment), Timesheet Validation (record timesheets and attendance),
Leave Management (keep track of employee leaves), Expense Management (manage employee expenses), Employee Appraisals (organize employee surveys, where employees evaluate their subordinates or their manager).</p>]]></field>
Leave Management (keep track of employee Time off), Expense Management (manage employee expenses), Employee Appraisals (organize employee surveys, where employees evaluate their subordinates or their manager).</p>]]></field>
</record>
<record id="employee" model="hr.employee">

View File

@ -53,7 +53,7 @@
</p><p>
OpenERP's department structure is used to manage all documents
related to employees by departments: expenses, timesheets,
leaves and holidays, recruitments, etc.
Time off and holidays, recruitments, etc.
</p>
</field>
</record>

View File

@ -14,7 +14,7 @@
</p><p>
Your departments structure is used to manage all documents
related to employees by departments: expenses and timesheets,
leaves and holidays, recruitments, etc.
Time off and holidays, recruitments, etc.
</p>
</field>
</record>

View File

@ -32,7 +32,7 @@ class hr_config_settings(osv.osv_memory):
help ="""This installs the module hr_attendance."""),
'module_hr_timesheet': fields.boolean('Manage timesheets',
help ="""This installs the module hr_timesheet."""),
'module_hr_holidays': fields.boolean('Manage holidays, leaves and allocation requests',
'module_hr_holidays': fields.boolean('Manage holidays, Time off and allocation requests',
help ="""This installs the module hr_holidays."""),
'module_hr_expense': fields.boolean('Manage employees expenses',
help ="""This installs the module hr_expense."""),

View File

@ -29,18 +29,18 @@
'summary': 'Holidays, Allocation and Leave Requests',
'website': 'http://www.openerp.com',
'description': """
Manage leaves and allocation requests
Manage Time off and allocation requests
=====================================
This application controls the holiday schedule of your company. It allows employees to request holidays. Then, managers can review requests for holidays and approve or reject them. This way you can control the overall holiday planning for the company or department.
You can configure several kinds of leaves (sickness, holidays, paid days, ...) and allocate leaves to an employee or department quickly using allocation requests. An employee can also make a request for more days off by making a new Allocation. It will increase the total of available days for that leave type (if the request is accepted).
You can configure several kinds of Time off (sickness, holidays, paid days, ...) and allocate Time off to an employee or department quickly using allocation requests. An employee can also make a request for more days off by making a new Allocation. It will increase the total of available days for that leave type (if the request is accepted).
You can keep track of leaves in different ways by following reports:
You can keep track of Time off in different ways by following reports:
* Leaves Summary
* Leaves by Department
* Leaves Analysis
* Time off Summary
* Time off by Department
* Time off Analysis
A synchronization with an internal agenda (Meetings of the CRM module) is also possible in order to automatically create a meeting when a holiday request is accepted by setting up a type of meeting in Leave Type.
""",

View File

@ -3,7 +3,7 @@
<data>
<record model="ir.actions.act_window" id="action_hr_holidays_leaves_by_month">
<field name="name">My Leaves</field>
<field name="name">My Time off</field>
<field name="res_model">hr.holidays.status</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -18,7 +18,7 @@
<field name="inherit_id" ref="hr.board_hr_form"/>
<field name="arch" type="xml">
<xpath expr="/form/board/column[1]" position="inside">
<action name="%(action_hr_holidays_leaves_by_month)d" string="My Leaves"/>
<action name="%(action_hr_holidays_leaves_by_month)d" string="My Time off"/>
</xpath>
</field>
</record>

View File

@ -79,11 +79,11 @@ class hr_holidays_status(osv.osv):
'categ_id': fields.many2one('crm.meeting.type', 'Meeting Type',
help='Once a leave is validated, OpenERP will create a corresponding meeting of this type in the calendar.'),
'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 Department.'),
'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and take them into account for the "Remaining Legal Leaves" defined on the employee form.'),
'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more Time off than the available ones for this type and take them into account for the "Remaining Legal Time off" defined on the employee form.'),
'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'),
'leaves_taken': fields.function(_user_left_days, string='Time off 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 Time off', help='Maximum Time off Allowed - Time off Already Taken', multi='user_left_days'),
'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 = {
@ -149,7 +149,7 @@ class hr_holidays(osv.osv):
'number_of_days_temp': fields.float('Allocation', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True),
'meeting_id': fields.many2one('crm.meeting', 'Meeting'),
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of Time off available for someone", select=True),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
@ -166,7 +166,7 @@ class hr_holidays(osv.osv):
'holiday_type': 'employee'
}
_constraints = [
(_check_date, 'You can not have 2 leaves that overlaps on same day!', ['date_from','date_to']),
(_check_date, 'You can not have 2 Time off that overlaps on same day!', ['date_from','date_to']),
]
_sql_constraints = [
@ -482,7 +482,7 @@ class hr_employee(osv.osv):
# Find for holidays status
status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
if len(status_ids) != 1 :
raise osv.except_osv(_('Warning!'),_("The feature behind the field 'Remaining Legal Leaves' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
raise osv.except_osv(_('Warning!'),_("The feature behind the field 'Remaining Legal Time off' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
status_id = status_ids and status_ids[0] or False
if not status_id:
return False
@ -541,7 +541,7 @@ class hr_employee(osv.osv):
return result
_columns = {
'remaining_leaves': fields.function(_get_remaining_days, string='Remaining Legal Leaves', fnct_inv=_set_remaining_days, type="float", help='Total number of legal leaves allocated to this employee, change this value to create allocation/leave request. Total based on all the leave types without overriding limit.'),
'remaining_leaves': fields.function(_get_remaining_days, string='Remaining Legal Time off', fnct_inv=_set_remaining_days, type="float", help='Total number of legal leaves allocated to this employee, change this value to create allocation/leave request. Total based on all the leave types without overriding limit.'),
'current_leave_state': fields.function(_get_leave_status, multi="leave_status", string="Current Leave Status", type="selection",
selection=[('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')]),

View File

@ -13,20 +13,20 @@
<field name="type">notification</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="subject">Leave Management application installed!</field>
<field name="body"><![CDATA[<p>Manage employee leaves from the top menu "Human Resources". Employees can create leave requests that are validated by their manager and/or HR officers.</p>
<p>Once validated, they are visible in the employee's calendar. HR officers can define leave types and allocate leaves to employees and employee categories.</p>]]></field>
<field name="body"><![CDATA[<p>Manage employee Time off from the top menu "Human Resources". Employees can create leave requests that are validated by their manager and/or HR officers.</p>
<p>Once validated, they are visible in the employee's calendar. HR officers can define leave types and allocate Time off to employees and employee categories.</p>]]></field>
</record>
<!-- Casual leave -->
<record model="hr.holidays.status" id="holiday_status_cl">
<field name="name" eval="'Legal Leaves '+time.strftime('%Y')"/>
<field name="name" eval="'Legal Time off '+time.strftime('%Y')"/>
<field name="color_name">black</field>
</record>
<!-- Sick leave -->
<record model="hr.holidays.status" id="holiday_status_sl">
<field name="name">Sick Leaves</field>
<field name="name">Sick Time off</field>
<field name="limit">True</field>
<field name="color_name">red</field>
</record>

View File

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

View File

@ -14,9 +14,9 @@
<separator/>
<filter icon="terp-go-year" name="year" string="Year" domain="[('holiday_status_id.active','=',True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>
<separator/>
<filter string="My Leaves" icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leaves"/>
<filter string="My Time off" icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Time off"/>
<separator/>
<filter string="My Department Leaves" icon="terp-personal+" help="My Department Leaves" domain="[('department_id.manager_id','=',uid)]"/>
<filter string="My Department Time off" icon="terp-personal+" help="My Department Time off" domain="[('department_id.manager_id','=',uid)]"/>
<field name="employee_id"/>
<field name="department_id"/>
<field name="holiday_status_id"/>
@ -154,10 +154,10 @@
<!-- Holidays: Leaves Management -->
<record model="ir.ui.view" id="allocation_company_new">
<field name="name">Leaves Management</field>
<field name="name">Time off Management</field>
<field name="model">hr.holidays</field>
<field name="arch" type="xml">
<form string="Leaves Management" version="7.0">
<form string="Time off Management" version="7.0">
<header>
<button string="Submit to Manager" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
@ -183,7 +183,7 @@
<field name="model">hr.holidays</field>
<field name="priority">20</field>
<field name="arch" type="xml">
<tree colors="red:state == 'refuse';blue:state == ' draft';black:state in ('confirm','validate','validate1')" string="Leaves Summary">
<tree colors="red:state == 'refuse';blue:state == ' draft';black:state in ('confirm','validate','validate1')" string="Time off Summary">
<field name="employee_id"/>
<field name="category_id" invisible="1"/>
<field name="department_id" invisible="1"/>
@ -221,7 +221,7 @@
</field>
</record>
<menuitem name="Leaves" parent="hr.menu_hr_root" id="menu_open_ask_holidays" sequence="20"/>
<menuitem name="Time off" parent="hr.menu_hr_root" id="menu_open_ask_holidays" sequence="20"/>
<record model="ir.actions.act_window" id="open_ask_holidays">
<field name="name">Leave Requests</field>
@ -345,7 +345,7 @@
<menuitem parent="menu_open_ask_holidays" id="menu_request_approve_allocation" action="request_approve_allocation" groups="base.group_hr_manager"/>
<record model="ir.actions.act_window" id="open_company_allocation">
<field name="name">Leaves Summary</field>
<field name="name">Time off Summary</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -355,7 +355,7 @@
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
<menuitem name="Leaves Summary" parent="menu_open_ask_holidays" id="menu_open_company_allocation" action="open_company_allocation" sequence="40"/>
<menuitem name="Time off Summary" parent="menu_open_ask_holidays" id="menu_open_company_allocation" action="open_company_allocation" sequence="40"/>
<!-- Holidays status -->
<record id="view_holidays_status_filter" model="ir.ui.view">
@ -442,8 +442,8 @@
<field name="search_view_id" ref="view_hr_holidays_status_search"/>
</record>
<menuitem sequence="3" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Leaves"/>
<menuitem name="Leaves Types" action="open_view_holiday_status" id="menu_open_view_holiday_status" parent="hr.menu_hr_configuration" sequence="10"/>
<menuitem sequence="3" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Time off"/>
<menuitem name="Time off Types" action="open_view_holiday_status" id="menu_open_view_holiday_status" parent="hr.menu_hr_configuration" sequence="10"/>
<!-- Holiday on resource leave -->
<record id="resource_calendar_leave_form_inherit" model="ir.ui.view">
@ -459,7 +459,7 @@
<!-- Shortcuts -->
<record id="act_hr_employee_holiday_request" model="ir.actions.act_window">
<field name="name">Leaves</field>
<field name="name">Time off</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays</field>
<field name="src_model">hr.employee</field>
@ -476,15 +476,15 @@
<field name="model">hr.employee</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<tree string="Assign Leaves" editable="bottom">
<tree string="Assign Time off" editable="bottom">
<field name="name" string="Employee"/>
<field name="remaining_leaves" string="Remaining Legal Leaves"/>
<field name="remaining_leaves" string="Remaining Legal Time off"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="hr_holidays_leaves_assign_legal">
<field name="name">Allocate Leaves for Employees</field>
<field name="name">Allocate Time off for Employees</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
@ -492,7 +492,7 @@
<field name="view_id" ref="hr_holidays_leaves_assign_tree_view"/>
<field name="help" type="html">
<p>
You can assign remaining Legal Leaves for each employee, OpenERP
You can assign remaining Legal Time off for each employee, OpenERP
will automatically create and validate allocation requests.
</p>
</field>
@ -505,7 +505,7 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='active_group']" position="before">
<group string="Leaves">
<group string="Time off">
<label for="remaining_leaves"/>
<div>
<field name="remaining_leaves" class="oe_inline"/> days
@ -513,7 +513,7 @@
</group>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action" groups="base.group_hr_user"/>
<button name="%(act_hr_employee_holiday_request)d" string="Time off" type="action" groups="base.group_hr_user"/>
</xpath>
</field>
</record>

View File

@ -3,7 +3,7 @@
<data>
<record model="ir.actions.act_window" id="action_hr_available_holidays_report">
<field name="name">Leaves Analysis</field>
<field name="name">Time off Analysis</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -14,7 +14,7 @@
</record>
<menuitem
name="Leaves Analysis"
name="Time off Analysis"
id="menu_hr_available_holidays_report_tree"
action="action_hr_available_holidays_report"
parent="hr.menu_hr_reporting" sequence="5" />

View File

@ -149,9 +149,9 @@
</tr>
</blockTable>
<spacer length="1.0cm" />
<para style="title" t="1">Leaves Summary <xsl:value-of select="report/name" /></para>
<para style="title" t="1">Time off 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> leaves. </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> Time off. </para>
<spacer length="1.0cm" />
<xsl:variable name="cols_legend">
<xsl:text>0.7cm,5.0cm</xsl:text>

View File

@ -6,7 +6,7 @@
<field name="name">hr.holidays.remaining.leaves.user.tree</field>
<field name="model">hr.holidays.remaining.leaves.user</field>
<field name="arch" type="xml">
<tree string="Leaves by Type">
<tree string="Time off by Type">
<field name="name"/>
<field name="leave_type"/>
<field name="no_of_leaves"/>
@ -18,7 +18,7 @@
<field name="name">hr.holidays.remaining.leaves.user.graph</field>
<field name="model">hr.holidays.remaining.leaves.user</field>
<field name="arch" type="xml">
<graph string="Leaves by Type" orientation = "horizontal" type="bar">
<graph string="Time off by Type" orientation = "horizontal" type="bar">
<field name="name" />
<field name="no_of_leaves" operator = "+"/>
<field name="leave_type" group = "True"/>

View File

@ -1,5 +1,5 @@
-
In order to test the hr_holiday module in OpenERP, I will Allocate leaves for Employee and manage leaves and leaves requests.
In order to test the hr_holiday module in OpenERP, I will Allocate Time off for Employee and manage Time off and Time off requests.
-
I assign the dates in the holiday request.
-

View File

@ -26,7 +26,7 @@ from openerp.tools.translate import _
class hr_holidays_summary_dept(osv.osv_memory):
_name = 'hr.holidays.summary.dept'
_description = 'HR Leaves Summary Report By Department'
_description = 'HR Time off 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)'),

View File

@ -6,7 +6,7 @@
<field name="name">hr.holidays.summary.dept.form</field>
<field name="model">hr.holidays.summary.dept</field>
<field name="arch" type="xml">
<form string="Leaves by Department" version="7.0">
<form string="Time off by Department" version="7.0">
<group>
<field name="date_from" />
<field name="holiday_type"/>
@ -21,7 +21,7 @@
</record>
<record id="action_hr_holidays_summary_dept" model="ir.actions.act_window">
<field name="name">Leaves by Department</field>
<field name="name">Time off 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,7 +30,7 @@
</record>
<menuitem
name="Leaves by Department"
name="Time off by Department"
parent="hr.menu_hr_reporting_timesheet"
action="action_hr_holidays_summary_dept"
id="menu_account_central_journal"

View File

@ -24,7 +24,7 @@ from openerp.osv import fields, osv
class hr_holidays_summary_employee(osv.osv_memory):
_name = 'hr.holidays.summary.employee'
_description = 'HR Leaves Summary Report By Employee'
_description = 'HR Time off 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)'),

View File

@ -6,7 +6,7 @@
<field name="name">hr.holidays.summary.employee.form</field>
<field name="model">hr.holidays.summary.employee</field>
<field name="arch" type="xml">
<form string="Leaves Summary" version="7.0">
<form string="Time off Summary" version="7.0">
<group col="4" colspan="6">
<field name="date_from"/>
<newline/>
@ -24,7 +24,7 @@
</record>
<record id="action_hr_holidays_summary_employee" model="ir.actions.act_window">
<field name="name">Leaves Summary</field>
<field name="name">Time off 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>
@ -34,7 +34,7 @@
<record model="ir.values" id="hr_holidays_summary_employee_value">
<field name="model_id" ref="hr.model_hr_employee" />
<field name="name">Leaves Summary</field>
<field name="name">Time off 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

@ -31,7 +31,7 @@ Module for resource management.
A resource represent something that can be scheduled (a developer on a task or a
work center on manufacturing orders). This module manages a resource calendar
associated to every resource. It also manages the leaves of every resource.
associated to every resource. It also manages the Time off of every resource.
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',

View File

@ -58,10 +58,10 @@ class resource_calendar(osv.osv):
return res
def _get_leaves(self, cr, uid, id, resource):
"""Private Method to Calculate resource Leaves days
"""Private Method to Calculate resource Time off days
@param id: resource calendar id
@param resource: resource id for which leaves will ew calculated
@param resource: resource id for which Time off will ew calculated
@return : returns the list of dates, where resource on leave in
resource.calendar.leaves object (e.g.['%Y-%m-%d', '%Y-%m-%d'])
@ -91,7 +91,7 @@ class resource_calendar(osv.osv):
@param dt_from: datetime object, start of working scheduled
@param hours: float, total number working hours needed scheduled from
start date
@param resource : Optional Resource id, if supplied than resource leaves
@param resource : Optional Resource id, if supplied than resource Time off
will also taken into consideration for calculating working
schedule.
@return : List datetime object of working schedule based on supplies
@ -202,7 +202,7 @@ class resource_calendar(osv.osv):
def interval_hours_get(self, cr, uid, id, dt_from, dt_to, resource=False):
""" Calculates the Total Working hours based on given start_date to
end_date, If resource id is supplied that it will consider the source
leaves also in calculating the hours.
Time off also in calculating the hours.
@param dt_from : date start to calculate hours
@param dt_end : date end to calculate hours

View File

@ -40,7 +40,7 @@
<field name="name">resource.calendar.leaves.search</field>
<field name="model">resource.calendar.leaves</field>
<field name="arch" type="xml">
<search string="Search Working Period Leaves">
<search string="Search Working Period Time off">
<field name="name" string="Reason"/>
<field name="resource_id" string="Resource"/>
<field name="company_id" string="Company" groups="base.group_multi_company"/>
@ -146,7 +146,7 @@
<act_window
id="resource_calendar_resources_leaves"
name="Resources Leaves"
name="Resources Time off"
res_model="resource.calendar.leaves"
src_model="resource.calendar"
view_mode="calendar,tree,form"
@ -242,7 +242,7 @@
</field>
</record>
<record id="action_resource_calendar_leave_tree" model="ir.actions.act_window">
<field name="name">Resource Leaves</field>
<field name="name">Resource Time off</field>
<field name="res_model">resource.calendar.leaves</field>
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="view_resource_calendar_leaves_search"/>