18
18
# You should have received a copy of the GNU General Public License
19
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
24
24
from report import report_sxw
28
29
class candidate_summary(report_sxw.rml_parse):
30
31
def __init__(self, cr, uid, name, context):
31
32
super(candidate_summary, self).__init__(cr, uid, name, context)
32
self.localcontext.update( {
33
self.localcontext.update({
34
35
'get_education': self._get_education,
35
'get_scheduled_date':self._get_schedule_date,
36
'get_scheduled_date': self._get_schedule_date,
38
39
def _get_education(self, edu_type):
39
edu_list = [("be_ce","BE Computers"),("be_it","BE IT"),("bsc_it","BSc IT"),("bca","BCA"),("btech_ce","BTech Computers"),("btech_it","BTech IT"),("mca","MCA"),("msc_it","MSc IT"),("mtech_ce","MTech Computers"),("other","Other")]
40
edu = [x[1] for x in edu_list if x[0]==str(edu_type) ]
41
"be_ce", "BE Computers"), ("be_it", "BE IT"), ("bsc_it", "BSc IT"), ("bca", "BCA"), ("btech_ce", "BTech Computers"),
42
("btech_it", "BTech IT"), ("mca", "MCA"), ("msc_it", "MSc IT"), ("mtech_ce", "MTech Computers"), ("other", "Other")]
43
edu = [x[1] for x in edu_list if x[0] == str(edu_type)]
43
46
def _get_schedule_date(self, sch_time):
44
47
if len(sch_time) > 5:
45
dt = mx.DateTime.strptime(str(sch_time),"%m/%d/%Y %H:%M:%S")
48
dt = mx.DateTime.strptime(str(sch_time), "%m/%d/%Y %H:%M:%S")
46
49
sch_dt = dt.strftime('%B %d,%Y at %H:%M %p')
51
report_sxw.report_sxw('report.candidate.summary', 'hr.interview', 'addons/hr_interview/report/candidate_summary.rml',parser=candidate_summary,header=False)
54
report_sxw.report_sxw('report.candidate.summary', 'hr.interview',
55
'addons/hr_interview/report/candidate_summary.rml', parser=candidate_summary, header=False)
54
58
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: