[MOD] board_hr : Remaining leaves by user changed, leave type added
bzr revid: vir@tinyerp.com-20100407131758-ckkdouqczlzb0ztw
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
</child1>
|
||||
<child2>
|
||||
<action colspan="4" height="220" name="%(action_timesheet_report_all)d" string="Timesheets by Month" />
|
||||
<action colspan="4" height="220" name="%(action_hr_holidays_remaining_leaves_user_all)d" string="Leaves by Type" />
|
||||
<action colspan="4" height="220" name="%(action_hr_holidays_remaining_leaves_user_all)d" string="Reamining Leaves by Type and User" />
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
|
||||
@@ -77,8 +77,9 @@ class hr_holidays_remaining_leaves_user(osv.osv):
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Employee',size=64),
|
||||
'no_of_leaves' : fields.integer('Remaining leaves'),
|
||||
'user_id':fields.many2one('res.users','User'),
|
||||
'no_of_leaves': fields.integer('Remaining leaves'),
|
||||
'user_id': fields.many2one('res.users','User'),
|
||||
'leave_type': fields.char('Leave Type',size=64),
|
||||
|
||||
}
|
||||
def init(self, cr):
|
||||
@@ -89,13 +90,17 @@ class hr_holidays_remaining_leaves_user(osv.osv):
|
||||
min(hrs.id) as id,
|
||||
rr.name as name,
|
||||
sum(hrs.number_of_days) as no_of_leaves,
|
||||
hrs.user_id
|
||||
hrs.user_id,
|
||||
hhs.name as leave_type
|
||||
from
|
||||
hr_holidays as hrs, hr_employee as hre, resource_resource as rr
|
||||
hr_holidays as hrs, hr_employee as hre,
|
||||
resource_resource as rr,hr_holidays_status as hhs
|
||||
where
|
||||
hrs.employee_id = hre.id and hre.resource_id = rr.id
|
||||
hrs.employee_id = hre.id and
|
||||
hre.resource_id = rr.id and
|
||||
hhs.id = hrs.holiday_status_id
|
||||
group by
|
||||
rr.name,hrs.user_id
|
||||
rr.name,hrs.user_id,hhs.name
|
||||
)
|
||||
""")
|
||||
hr_holidays_remaining_leaves_user()
|
||||
|
||||
@@ -96,7 +96,8 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Leaves by Type">
|
||||
<field name="user_id"/>
|
||||
<field name="name"/>
|
||||
<field name="leave_type"/>
|
||||
<field name="no_of_leaves"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -108,9 +109,9 @@
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Leaves by Type" orientation = "horizontal" type="bar">
|
||||
<field name="user_id"/>
|
||||
<field name="name"/>
|
||||
<field name="leave_type" group="True"/>
|
||||
<field name="no_of_leaves" operator="+"/>
|
||||
<field group = "True" name="name"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user