[IMP]:Improved code and set access rights for evaluation report.
bzr revid: apa@tinyerp.com-20100312072101-j2pwfuosgws41t45
This commit is contained in:
parent
c2fc180bb7
commit
71053a2fa9
|
@ -23,8 +23,8 @@ import tools
|
|||
from osv import fields,osv
|
||||
|
||||
|
||||
class evaluation_report(osv.osv):
|
||||
_name = "evaluation.report"
|
||||
class hr_evaluation_report(osv.osv):
|
||||
_name = "hr.evaluation.report"
|
||||
_description = "Evaluations Statistics"
|
||||
_auto = False
|
||||
_rec_name = 'date'
|
||||
|
@ -48,9 +48,9 @@ class evaluation_report(osv.osv):
|
|||
}
|
||||
_order = 'create_date desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'evaluation_report')
|
||||
tools.drop_view_if_exists(cr, 'hr_evaluation_report')
|
||||
cr.execute("""
|
||||
create or replace view evaluation_report as (
|
||||
create or replace view hr_evaluation_report as (
|
||||
select
|
||||
min(l.id) as id,
|
||||
s.create_date as create_date,
|
||||
|
@ -70,5 +70,5 @@ class evaluation_report(osv.osv):
|
|||
s.date,s.date_close
|
||||
)
|
||||
""")
|
||||
evaluation_report()
|
||||
hr_evaluation_report()
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<record id="view_evaluation_report_tree" model="ir.ui.view">
|
||||
<field name="name">evaluation.report.tree</field>
|
||||
<field name="model">evaluation.report</field>
|
||||
<field name="name">hr.evaluation.report.tree</field>
|
||||
<field name="model">hr.evaluation.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Evaluations Statistics">
|
||||
|
@ -20,8 +20,8 @@
|
|||
</record>
|
||||
|
||||
<record id="view_evaluation_report_search" model="ir.ui.view">
|
||||
<field name="name">evaluation.report.search</field>
|
||||
<field name="model">evaluation.report</field>
|
||||
<field name="name">hr.evaluation.report.search</field>
|
||||
<field name="model">hr.evaluation.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Evaluations">
|
||||
|
@ -57,14 +57,14 @@
|
|||
|
||||
<record id="action_evaluation_report_all" model="ir.actions.act_window">
|
||||
<field name="name">Evaluations</field>
|
||||
<field name="res_model">evaluation.report</field>
|
||||
<field name="res_model">hr.evaluation.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<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="8"/>
|
||||
<menuitem action="action_evaluation_report_all" id="menu_evaluation_report_all" parent="hr.menu_hr_reporting" sequence="3"/>
|
||||
<menuitem action="action_evaluation_report_all" id="menu_evaluation_report_all" parent="hr.menu_hr_reporting" sequence="0"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation","model_hr_evaluation_evaluation",hr.group_hr_manager,1,1,1,1
|
||||
"access_hr_evaluation_plan","hr_evaluation.plan","model_hr_evaluation_evaluation",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_plan_manager","hr_evaluation.plan","model_hr_evaluation_plan",hr.group_hr_manager,1,1,1,1
|
||||
"access_hr_evaluation_plan_phase","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase",hr.group_hr_manager,1,1,1,1
|
||||
"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_interview_manager","hr.evaluation.interview","model_hr_evaluation_interview",hr.group_hr_manager,1,1,1,1
|
||||
"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_plan","hr_evaluation.plan","model_hr_evaluation_evaluation","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_plan_manager","hr_evaluation.plan","model_hr_evaluation_plan","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_plan_phase","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_interview_manager","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_report","hr.evaluation.report","model_hr_evaluation_report",,1,0,0,0
|
||||
|
|
|
Loading…
Reference in New Issue