From c2fc180bb713e0b174eefe12a88fa2008349db10 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Fri, 12 Mar 2010 12:34:43 +0530 Subject: [PATCH] [IMP]:renamed the Evaluation report name. bzr revid: apa@tinyerp.com-20100312070443-ggnl6zmxbl5c5olu --- addons/hr_evaluation/__terp__.py | 2 +- addons/hr_evaluation/report/__init__.py | 2 +- addons/hr_evaluation/report/evaluation_report.py | 74 -------------------- .../report/evaluation_report_view.xml | 70 ------------------ .../hr_evaluation/report/hr_evaluation_report.py | 74 ++++++++++++++++++++ .../report/hr_evaluation_report_view.xml | 70 ++++++++++++++++++ 6 files changed, 146 insertions(+), 146 deletions(-) delete mode 100644 addons/hr_evaluation/report/evaluation_report.py delete mode 100644 addons/hr_evaluation/report/evaluation_report_view.xml create mode 100644 addons/hr_evaluation/report/hr_evaluation_report.py create mode 100644 addons/hr_evaluation/report/hr_evaluation_report_view.xml diff --git a/addons/hr_evaluation/__terp__.py b/addons/hr_evaluation/__terp__.py index 75fd1a1..26b71c7 100644 --- a/addons/hr_evaluation/__terp__.py +++ b/addons/hr_evaluation/__terp__.py @@ -33,7 +33,7 @@ "security/ir.model.access.csv", "hr_evaluation_view.xml", "hr_evaluation_data.xml", - "report/evaluation_report_view.xml"], + "report/hr_evaluation_report_view.xml"], "active": False, "installable": True } diff --git a/addons/hr_evaluation/report/__init__.py b/addons/hr_evaluation/report/__init__.py index 3fee228..193a389 100644 --- a/addons/hr_evaluation/report/__init__.py +++ b/addons/hr_evaluation/report/__init__.py @@ -18,4 +18,4 @@ # along with this program. If not, see . # ############################################################################## -import evaluation_report \ No newline at end of file +import hr_evaluation_report \ No newline at end of file diff --git a/addons/hr_evaluation/report/evaluation_report.py b/addons/hr_evaluation/report/evaluation_report.py deleted file mode 100644 index 76c6a25..0000000 --- a/addons/hr_evaluation/report/evaluation_report.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import tools -from osv import fields,osv - - -class evaluation_report(osv.osv): - _name = "evaluation.report" - _description = "Evaluations Statistics" - _auto = False - _rec_name = 'date' - _columns = { - 'create_date': fields.datetime('Create Date', readonly=True), - 'deadline': fields.date("Deadline", readonly=True), - 'closed': fields.date("closed", readonly=True), - 'year': fields.char('Year', size=4, readonly=True), - 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), - ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), - ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), - 'employee_id': fields.many2one('hr.employee', "Employee", readonly=True), - 'nbr':fields.integer('# of Requests', readonly=True), - 'state': fields.selection([ - ('draft','Draft'), - ('wait','Plan In Progress'), - ('progress','Final Validation'), - ('done','Done'), - ('cancel','Cancelled'), - ], 'State',readonly=True), - } - _order = 'create_date desc' - def init(self, cr): - tools.drop_view_if_exists(cr, 'evaluation_report') - cr.execute(""" - create or replace view evaluation_report as ( - select - min(l.id) as id, - s.create_date as create_date, - s.employee_id, - s.date as deadline, - s.date_close as closed, - to_char(s.create_date, 'YYYY') as year, - to_char(s.create_date, 'MM') as month, - count(*) as nbr, - s.state - from - hr_evaluation_interview l - left join - hr_evaluation_evaluation s on (s.id=l.evaluation_id) - group by - s.create_date,s.state,s.employee_id, - s.date,s.date_close - ) - """) -evaluation_report() - diff --git a/addons/hr_evaluation/report/evaluation_report_view.xml b/addons/hr_evaluation/report/evaluation_report_view.xml deleted file mode 100644 index b9bcfcc..0000000 --- a/addons/hr_evaluation/report/evaluation_report_view.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - evaluation.report.tree - evaluation.report - tree - - - - - - - - - - - - - - - - evaluation.report.search - evaluation.report - search - - - - - - - - - - - - - - - - - - - - - - - - Evaluations - evaluation.report - form - tree,graph - - - - - - - - diff --git a/addons/hr_evaluation/report/hr_evaluation_report.py b/addons/hr_evaluation/report/hr_evaluation_report.py new file mode 100644 index 0000000..76c6a25 --- /dev/null +++ b/addons/hr_evaluation/report/hr_evaluation_report.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import tools +from osv import fields,osv + + +class evaluation_report(osv.osv): + _name = "evaluation.report" + _description = "Evaluations Statistics" + _auto = False + _rec_name = 'date' + _columns = { + 'create_date': fields.datetime('Create Date', readonly=True), + 'deadline': fields.date("Deadline", readonly=True), + 'closed': fields.date("closed", readonly=True), + 'year': fields.char('Year', size=4, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), + ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), + 'employee_id': fields.many2one('hr.employee', "Employee", readonly=True), + 'nbr':fields.integer('# of Requests', readonly=True), + 'state': fields.selection([ + ('draft','Draft'), + ('wait','Plan In Progress'), + ('progress','Final Validation'), + ('done','Done'), + ('cancel','Cancelled'), + ], 'State',readonly=True), + } + _order = 'create_date desc' + def init(self, cr): + tools.drop_view_if_exists(cr, 'evaluation_report') + cr.execute(""" + create or replace view evaluation_report as ( + select + min(l.id) as id, + s.create_date as create_date, + s.employee_id, + s.date as deadline, + s.date_close as closed, + to_char(s.create_date, 'YYYY') as year, + to_char(s.create_date, 'MM') as month, + count(*) as nbr, + s.state + from + hr_evaluation_interview l + left join + hr_evaluation_evaluation s on (s.id=l.evaluation_id) + group by + s.create_date,s.state,s.employee_id, + s.date,s.date_close + ) + """) +evaluation_report() + diff --git a/addons/hr_evaluation/report/hr_evaluation_report_view.xml b/addons/hr_evaluation/report/hr_evaluation_report_view.xml new file mode 100644 index 0000000..b9bcfcc --- /dev/null +++ b/addons/hr_evaluation/report/hr_evaluation_report_view.xml @@ -0,0 +1,70 @@ + + + + + evaluation.report.tree + evaluation.report + tree + + + + + + + + + + + + + + + + evaluation.report.search + evaluation.report + search + + + + + + + + + + + + + + + + + + + + + + + + Evaluations + evaluation.report + form + tree,graph + + + + + + + + -- 1.7.10.4