[IMP]hr:change report name and Leave instead of Holiday
bzr revid: kjo@tinyerp.com-20120607132146-gs9m2famzymlsq1f
This commit is contained in:
parent
46e8b36e14
commit
6fc261d231
|
@ -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"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<filter icon="terp-go-month" name="This Month" string="Month" domain="[('date_from','<=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','>=',(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','<=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date_from','>=',(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"/>
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
</tr>
|
||||
</blockTable>
|
||||
<spacer length="1.0cm" />
|
||||
<para style="title" t="1">Leaves/Holidays Summary <xsl:value-of select="report/name" /></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>
|
||||
<spacer length="1.0cm" />
|
||||
|
@ -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>Leaves Type</td>
|
||||
|
||||
</tr>
|
||||
<xsl:for-each select="report/legend">
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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">
|
||||
<form string="Leaves by Department">
|
||||
<group col="4" colspan="6">
|
||||
<field name="date_from" />
|
||||
<newline/>
|
||||
|
@ -24,7 +24,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>
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<field name="model">hr.holidays.summary.employee</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Employee's Holidays">
|
||||
<form string="Employee's Leaves">
|
||||
<group col="4" colspan="6">
|
||||
<field name="date_from"/>
|
||||
<newline/>
|
||||
|
@ -25,7 +25,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_hr_holidays_summary_employee" model="ir.actions.act_window">
|
||||
<field name="name">Employee's Holidays</field>
|
||||
<field name="name">Employee's Leaves</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">Employee's Leaves</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>
|
||||
|
|
Loading…
Reference in New Issue