summaryrefslogtreecommitdiff
path: root/addons/hr_payroll
diff options
context:
space:
mode:
authoratp (Open ERP) <atp@tinyerp.co.in>2010-06-22 10:45:44 +0530
committeratp (Open ERP) <atp@tinyerp.co.in>2010-06-22 10:45:44 +0530
commitb0efd26edd9f4e2aa75424b787ea46d2be15cd04 (patch)
treee78cdb693e62a5c9a17f77a395eec51fb34becbf /addons/hr_payroll
parent46bb1ea51be702758d68a5f69db32c82dbccf9bd (diff)
parent2319190c5a20cb8095f85cacca89a33164ba93d7 (diff)
[MERGE]: merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: atp@tinyerp.co.in-20100622051544-c7hig73zk2at66cy
Diffstat (limited to 'addons/hr_payroll')
-rw-r--r--addons/hr_payroll/__init__.py26
-rw-r--r--addons/hr_payroll/__openerp__.py59
-rwxr-xr-xaddons/hr_payroll/hr_paroll_report.xml57
-rw-r--r--addons/hr_payroll/hr_payroll.py1878
-rw-r--r--addons/hr_payroll/hr_payroll_data.xml112
-rw-r--r--addons/hr_payroll/hr_payroll_sequence.xml37
-rw-r--r--addons/hr_payroll/hr_payroll_view.xml943
-rw-r--r--addons/hr_payroll/hr_payroll_wizard.xml40
-rw-r--r--addons/hr_payroll/hr_payroll_workflow.xml134
-rw-r--r--addons/hr_payroll/i18n/fr_BE.po1435
-rw-r--r--addons/hr_payroll/i18n/hr_payroll.pot1435
-rwxr-xr-xaddons/hr_payroll/report/__init__.py30
-rw-r--r--addons/hr_payroll/report/payroll_register.rml261
-rwxr-xr-xaddons/hr_payroll/report/payslip.rml671
-rw-r--r--addons/hr_payroll/report/report_emp_salary_structure.py102
-rw-r--r--addons/hr_payroll/report/report_emp_salary_structure.rml552
-rw-r--r--addons/hr_payroll/report/report_employees_detail.py235
-rw-r--r--addons/hr_payroll/report/report_employees_detail.rml582
-rw-r--r--addons/hr_payroll/report/report_payroll_advice.py54
-rw-r--r--addons/hr_payroll/report/report_payroll_advice.rml337
-rw-r--r--addons/hr_payroll/report/report_payroll_register.py72
-rwxr-xr-xaddons/hr_payroll/report/report_payslip.py116
-rwxr-xr-xaddons/hr_payroll/report/report_year_report.rml298
-rwxr-xr-xaddons/hr_payroll/report/report_year_salary.py113
-rwxr-xr-xaddons/hr_payroll/report/rml_parse.py162
-rwxr-xr-xaddons/hr_payroll/wizard/__init__.py3
-rw-r--r--addons/hr_payroll/wizard/wizard_create_analytic.py124
-rwxr-xr-xaddons/hr_payroll/wizard/wizard_employees_detail.py60
-rwxr-xr-xaddons/hr_payroll/wizard/wizard_year_salary.py69
29 files changed, 9997 insertions, 0 deletions
diff --git a/addons/hr_payroll/__init__.py b/addons/hr_payroll/__init__.py
new file mode 100644
index 00000000000..9ea0d7eb8c4
--- /dev/null
+++ b/addons/hr_payroll/__init__.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# d$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import hr_payroll
+import report
+import wizard \ No newline at end of file
diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py
new file mode 100644
index 00000000000..9f1c59abc4f
--- /dev/null
+++ b/addons/hr_payroll/__openerp__.py
@@ -0,0 +1,59 @@
+#-*- coding:utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# d$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+ 'name': 'Human Resource Payroll',
+ 'version': '1.0',
+ 'category': 'Generic Modules/Human Resources',
+ 'description': """Generic Payroll system
+ * Employee Details
+ * Employee Contracts
+ * Passport based Contract
+ * Allowances / Deductions
+ * Allow to configure Basic / Grows / Net Salary
+ * Employee Payslip
+ * Monthly Payroll Register
+ * Integrated with Holiday Management
+ """,
+ 'author':'Tiny/Axelor',
+ 'website':'http://www.openerp.com',
+ 'depends': [
+ 'hr',
+ 'account',
+ 'hr_contract',
+ 'hr_holidays',
+ 'hr_expense'
+ ],
+ 'init_xml': [
+ ],
+ 'update_xml': [
+ 'hr_payroll_view.xml',
+ 'hr_payroll_workflow.xml',
+ 'hr_payroll_sequence.xml',
+ 'hr_paroll_report.xml',
+ 'hr_payroll_data.xml',
+ 'hr_payroll_wizard.xml'
+ ],
+ 'demo_xml': [
+ ],
+ 'installable': True,
+ 'active': False,
+}
diff --git a/addons/hr_payroll/hr_paroll_report.xml b/addons/hr_payroll/hr_paroll_report.xml
new file mode 100755
index 00000000000..1355a42ff5b
--- /dev/null
+++ b/addons/hr_payroll/hr_paroll_report.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+ <report
+ auto="False"
+ id="salary_payslip"
+ model="hr.payslip"
+ name="payslip.pdf"
+ rml="hr_payroll/report/payslip.rml"
+ string="Employee PaySlip" />
+
+ <report
+ auto="False"
+ id="payroll_advice"
+ model="hr.payroll.advice"
+ name="payroll.advice"
+ rml="hr_payroll/report/report_payroll_advice.rml"
+ string="Bank Payment Advice" />
+
+ <report
+ auto="False"
+ id="year_salary_report"
+ model="hr.payslip"
+ name="year.salary"
+ rml="hr_payroll/report/report_year_report.rml"
+ menu = "False"
+ string="Year Salary Report" />
+
+ <report
+ auto="False"
+ id="year_payroll_register"
+ model="hr.payroll.register"
+ name="hr.payroll.register.sheet"
+ rml="hr_payroll/report/payroll_register.rml"
+ menu = "True"
+ string="Print Statement" />
+
+ <report
+ auto="False"
+ id="year_employees_detail"
+ model="hr.payslip"
+ name="employees.salary"
+ rml="hr_payroll/report/report_employees_detail.rml"
+ menu = "False"
+ string="Employees Salary Detail" />
+
+ <report
+ auto="False"
+ id="salary_structure_register"
+ model="hr.employee"
+ name="salary.structure"
+ rml="hr_payroll/report/report_emp_salary_structure.rml"
+ menu = "True"
+ string="Print Salary Structure" />
+
+ </data>
+</openerp>
diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py
new file mode 100644
index 00000000000..93146b565b9
--- /dev/null
+++ b/addons/hr_payroll/hr_payroll.py
@@ -0,0 +1,1878 @@
+#-*- coding:utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# d$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+import netsvc
+from osv import osv
+from osv import fields
+from tools import config
+from tools.translate import _
+
+from datetime import date
+from datetime import datetime
+from datetime import timedelta
+
+def prev_bounds(cdate=False):
+ when = date.fromtimestamp(time.mktime(time.strptime(cdate,"%Y-%m-%d")))
+ this_first = date(when.year, when.month, 1)
+ month = when.month + 1
+ year = when.year
+ if month > 12:
+ month = 1
+ year += 1
+ next_month = date(year, month, 1)
+ prev_end = next_month - timedelta(days=1)
+ return this_first, prev_end
+
+class hr_contract_wage_type(osv.osv):
+ """
+ Wage types
+ Basic = Basic Salary
+ Grows = Basic + Allowances
+ New = Grows - Deductions
+ """
+
+ _inherit = 'hr.contract.wage.type'
+ _columns = {
+ 'type' : fields.selection([('basic','Basic'), ('gross','Gross'), ('net','Net')], 'Type', required=True),
+ }
+hr_contract_wage_type()
+
+class hr_passport(osv.osv):
+ """
+ Employee Passport
+ Passport based Contratacts for Employees
+ """
+
+ _name = 'hr.passport'
+ _description = 'Passport Detail'
+
+ _columns = {
+ 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
+ 'name':fields.char('Passport No', size=64, required=True, readonly=False),
+ 'country_id':fields.many2one('res.country', 'Country of Issue', required=True),
+ 'address_id':fields.many2one('res.partner.address', 'Address', required=False),
+ 'date_issue': fields.date('Passport Issue Date', required=True),
+ 'date_expire': fields.date('Passport Expire Date', required=True),
+ 'contracts_ids':fields.one2many('hr.contract', 'passport_id', 'Contracts', required=False, readonly=True),
+ 'note': fields.text('Description'),
+ }
+hr_passport()
+
+class hr_payroll_structure(osv.osv):
+ """
+ Salary structure used to defined
+ - Basic
+ - Allowlance
+ - Deductions
+ """
+
+ _name = 'hr.payroll.structure'
+ _description = 'Salary Structure'
+
+ _columns = {
+ 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'code':fields.char('Code', size=64, required=True, readonly=False),
+ 'line_ids':fields.one2many('hr.payslip.line', 'function_id', 'Salary Structure', required=False),
+ 'account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=False),
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ 'note': fields.text('Description'),
+ }
+ _defaults = {
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ """
+ Create a new record in hr_payroll_structure model from existing one
+ @param cr: cursor to database
+ @param user: id of current user
+ @param id: list of record ids on which copy method executes
+ @param default: dict type contains the values to be override during copy of object
+ @param context: context arguments, like lang, time zone
+
+ @return: returns a id of newly created record
+ """
+ code = self.browse(cr, uid, id).code
+ default = {
+ 'code':code+"(copy)",
+ 'company_id':self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
+ }
+ res_id = super(hr_payroll_structure, self).copy(cr, uid, id, default, context)
+ return res_id
+
+hr_payroll_structure()
+
+class hr_contract(osv.osv):
+ """
+ Employee contract based on the visa, work permits
+ allowas to configure different Salary structure
+ """
+
+ _inherit = 'hr.contract'
+ _description = 'Employee Contract'
+
+ _columns = {
+ 'permit_no':fields.char('Work Permit No', size=256, required=False, readonly=False),
+ 'passport_id':fields.many2one('hr.passport', 'Passport', required=False),
+ 'visa_no':fields.char('Visa No', size=64, required=False, readonly=False),
+ 'visa_expire': fields.date('Visa Expire Date'),
+ 'struct_id' : fields.many2one('hr.payroll.structure', 'Salary Structure'),
+ 'working_days_per_week': fields.integer('Working Days', help="No of Working days / week for an employee")
+ }
+ _defaults = {
+ 'working_days_per_week': lambda *a: 5,
+ }
+hr_contract()
+
+class payroll_register(osv.osv):
+ """
+ Payroll Register
+ """
+ _name = 'hr.payroll.register'
+ _description = 'Payroll Register'
+
+ def _calculate(self, cr, uid, ids, field_names, arg, context):
+ res = {}
+ allounce = 0.0
+ deduction = 0.0
+ net = 0.0
+ grows = 0.0
+ for register in self.browse(cr, uid, ids, context):
+ for slip in register.line_ids:
+ allounce += slip.allounce
+ deduction += slip.deduction
+ net += slip.net
+ grows += slip.grows
+
+ res[register.id] = {
+ 'allounce':allounce,
+ 'deduction':deduction,
+ 'net':net,
+ 'grows':grows
+ }
+ return res
+
+ _columns = {
+ 'name':fields.char('Name', size=64, required=True, readonly=False),
+ 'date': fields.date('Date', required=True),
+ 'number':fields.char('Number', size=64, required=False, readonly=True),
+ 'line_ids':fields.one2many('hr.payslip', 'register_id', 'Payslips', required=False),
+ 'state':fields.selection([
+ ('new','New Slip'),
+ ('draft','Wating for Verification'),
+ ('hr_check','Wating for HR Verification'),
+ ('accont_check','Wating for Account Verification'),
+ ('confirm','Confirm Sheet'),
+ ('done','Paid Salary'),
+ ('cancel','Reject'),
+ ],'State', select=True, readonly=True),
+ 'journal_id': fields.many2one('account.journal', 'Expanse Journal', required=True),
+ 'bank_journal_id': fields.many2one('account.journal', 'Bank Journal', required=True),
+ 'active':fields.boolean('Active', required=False),
+# 'advice_ids':fields.one2many('hr.payroll.advice', 'register_id', 'Bank Advice'),
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ 'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')], help="Keep empty to use the period of the validation(Payslip) date."),
+ 'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, int(config['price_accuracy']))),
+ 'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, int(config['price_accuracy']))),
+ 'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits=(16, int(config['price_accuracy']))),
+ 'deduction': fields.function(_calculate, method=True, store=True, multi='dc', string='Deduction', digits=(16, int(config['price_accuracy']))),
+ 'note': fields.text('Description'),
+ }
+
+ _defaults = {
+ 'date': lambda *a: time.strftime('%Y-%m-%d'),
+ 'state': lambda *a: 'new',
+ 'active': lambda *a: True,
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+
+ def compute_sheet(self, cr, uid, ids, context={}):
+ emp_pool = self.pool.get('hr.employee')
+ slip_pool = self.pool.get('hr.payslip')
+ func_pool = self.pool.get('hr.payroll.structure')
+ slip_line_pool = self.pool.get('hr.payslip.line')
+ wf_service = netsvc.LocalService("workflow")
+
+ vals = self.read(cr, uid, ids)[0]
+
+ emp_ids = emp_pool.search(cr, uid, [])
+
+ for emp in emp_pool.browse(cr, uid, emp_ids):
+ old_slips = slip_pool.search(cr, uid, [('employee_id','=',emp.id), ('date','=',vals['date'])])
+ if old_slips:
+ slip_pool.write(cr, uid, old_slips, {'register_id':ids[0]})
+ for sid in old_slips:
+ wf_service.trg_validate(uid, 'hr.payslip', sid, 'compute_sheet', cr)
+ continue
+
+ sql_req= '''
+ SELECT c.wage as wage, struct_id as function
+ FROM hr_contract c
+ LEFT JOIN hr_employee emp on (c.employee_id=emp.id)
+ LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id)
+ LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id)
+ WHERE
+ (emp.id=%s) AND
+ (date_start <= %s) AND
+ (date_end IS NULL OR date_end >= %s)
+ LIMIT 1
+ '''
+ cr.execute(sql_req, (emp.id, vals['date'], vals['date']))
+ contract_info = cr.dictfetchone()
+
+ if not contract_info:
+ continue
+
+ function = contract_info['struct_id']
+ lines = []
+ if function:
+ func = func_pool.read(cr, uid, function, ['line_ids'])
+ lines = slip_line_pool.browse(cr, uid, func['line_ids'])
+
+ res = {
+ 'employee_id':emp.id,
+ 'basic':contract_info['wage'],
+ 'register_id':ids[0],
+ 'name':vals['name'],
+ 'date':vals['date'],
+ 'journal_id':vals['journal_id'][0],
+ 'bank_journal_id':vals['bank_journal_id'][0]
+ }
+ slip_id = slip_pool.create(cr, uid, res)
+
+ old_slip_id = slip_line_pool.search(cr, uid, [('slip_id','=',slip_id)])
+ slip_line_pool.unlink(cr, uid, old_slip_id)
+
+ for line in lines:
+ slip_line_pool.copy(cr, uid, line.id, {'slip_id':slip_id, 'employee_id':False, 'function_id':False}, {})
+
+ for line in emp.line_ids:
+ slip_line_pool.copy(cr, uid, line.id, {'slip_id':slip_id, 'employee_id':False, 'function_id':False}, {})
+
+ wf_service.trg_validate(uid, 'hr.payslip', slip_id, 'compute_sheet', cr)
+
+ number = self.pool.get('ir.sequence').get(cr, uid, 'salary.register')
+ self.write(cr, uid, ids, {'state':'draft', 'number':number})
+ return True
+
+ def verify_sheet(self, cr, uid, ids, context={}):
+ slip_pool = self.pool.get('hr.payslip')
+
+ for id in ids:
+ sids = slip_pool.search(cr, uid, [('register_id','=',id)])
+ wf_service = netsvc.LocalService("workflow")
+ for sid in sids:
+ wf_service.trg_validate(uid, 'hr.payslip', sid, 'verify_sheet', cr)
+
+ self.write(cr, uid, ids, {'state':'hr_check'})
+ return True
+
+ def verify_twice_sheet(self, cr, uid, ids, context={}):
+ slip_pool = self.pool.get('hr.payslip')
+
+ for id in ids:
+ sids = slip_pool.search(cr, uid, [('register_id','=',id), ('state','=','hr_check')])
+ wf_service = netsvc.LocalService("workflow")
+ for sid in sids:
+ wf_service.trg_validate(uid, 'hr.payslip', sid, 'verify_twice_sheet', cr)
+
+ self.write(cr, uid, ids, {'state':'accont_check'})
+ return True
+
+ def final_verify_sheet(self, cr, uid, ids, context={}):
+ slip_pool = self.pool.get('hr.payslip')
+ advice_pool = self.pool.get('hr.payroll.advice')
+ advice_line_pool = self.pool.get('hr.payroll.advice.line')
+
+ for id in ids:
+ sids = slip_pool.search(cr, uid, [('register_id','=',id), ('state','=','accont_check')])
+ wf_service = netsvc.LocalService("workflow")
+ for sid in sids:
+ wf_service.trg_validate(uid, 'hr.payslip', sid, 'final_verify_sheet', cr)
+
+
+ for reg in self.browse(cr, uid, ids):
+ accs = {}
+ for slip in reg.line_ids:
+ pid = False
+ if accs.get(slip.employee_id.property_bank_account.code, False) == False:
+ advice = {
+ 'name': 'Payment Advice from %s / Bank Account %s' % (self.pool.get('res.users').browse(cr, uid, uid).company_id.name, slip.employee_id.property_bank_account.name),
+ 'number': self.pool.get('ir.sequence').get(cr, uid, 'payment.advice'),
+ 'register_id':reg.id,
+ 'account_id':slip.employee_id.property_bank_account.id
+ }
+ pid = advice_pool.create(cr, uid, advice)
+ accs[slip.employee_id.property_bank_account.code] = pid
+ else:
+ pid = accs[slip.employee_id.property_bank_account.code]
+
+ pline = {
+ 'advice_id':pid,
+ 'name':slip.employee_id.otherid,
+ 'employee_id':slip.employee_id.id,
+ 'amount':slip.other_pay + slip.net,
+ 'bysal':slip.net
+ }
+ id = advice_line_pool.create(cr, uid, pline)
+
+ #, 'advice_ids':[(6, 0, [pid])]
+ self.write(cr, uid, ids, {'state':'confirm'})
+ return True
+
+ def process_sheet(self, cr, uid, ids, context={}):
+ slip_pool = self.pool.get('hr.payslip')
+ for id in ids:
+ sids = slip_pool.search(cr, uid, [('register_id','=',id), ('state','=','confirm')])
+ wf_service = netsvc.LocalService("workflow")
+ for sid in sids:
+ wf_service.trg_validate(uid, 'hr.payslip', sid, 'process_sheet', cr)
+
+ self.write(cr, uid, ids, {'state':'done'})
+ return True
+
+payroll_register()
+
+class payroll_advice(osv.osv):
+ '''
+ Bank Advice Note
+ '''
+ _name = 'hr.payroll.advice'
+ _description = 'Bank Advice Note'
+
+ _columns = {
+ 'register_id':fields.many2one('hr.payroll.register', 'Payroll Register', required=False),
+ 'name':fields.char('Name', size=2048, required=True, readonly=False),
+ 'note': fields.text('Description'),
+ 'date': fields.date('Date'),
+ 'state':fields.selection([
+ ('draft','Draft Sheet'),
+ ('confirm','Confirm Sheet'),
+ ('cancel','Reject'),
+ ],'State', select=True, readonly=True),
+ 'number':fields.char('Number', size=64, required=False, readonly=True),
+ 'line_ids':fields.one2many('hr.payroll.advice.line', 'advice_id', 'Employee Salary', required=False),
+ 'chaque_nos':fields.char('Chaque Nos', size=256, required=False, readonly=False),
+ 'account_id': fields.many2one('account.account', 'Account', required=True),
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ }
+
+ _defaults = {
+ 'date': lambda *a: time.strftime('%Y-%m-%d'),
+ 'state': lambda *a: 'draft',
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+
+ def confirm_sheet(self, cr, uid, ids, context={}):
+ self.write(cr, uid, ids, {'state':'confirm'})
+ return True
+
+ def set_to_draft(self, cr, uid, ids, context={}):
+ self.write(cr, uid, ids, {'state':'draft'})
+ return True
+
+ def cancel_sheet(self, cr, uid, ids, context={}):
+ self.write(cr, uid, ids, {'state':'cancel'})
+ return True
+
+payroll_advice()
+
+class payroll_advice_line(osv.osv):
+ '''
+ Bank Advice Lines
+ '''
+ _name = 'hr.payroll.advice.line'
+ _description = 'Bank Advice Lines'
+
+ _columns = {
+ 'advice_id':fields.many2one('hr.payroll.advice', 'Bank Advice', required=False),
+ 'name':fields.char('Bank Account A/C', size=64, required=True, readonly=False),
+ 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
+ 'amount': fields.float('Amount', digits=(16, int(config['price_accuracy']))),
+ 'bysal': fields.float('By Salary', digits=(16, int(config['price_accuracy']))),
+ 'flag':fields.char('D/C', size=8, required=True, readonly=False),
+ }
+ _defaults = {
+ 'flag': lambda *a: 'C',
+ }
+
+ def onchange_employee_id(self, cr, uid, ids, ddate, employee_id, context={}):
+ vals = {}
+ slip_pool = self.pool.get('hr.payslip')
+ if employee_id:
+ dates = prev_bounds(ddate)
+ sids = False
+ sids = slip_pool.search(cr, uid, [('paid','=',False),('state','=','confirm'),('date','>=',dates[0]), ('employee_id','=',employee_id), ('date','<=',dates[1])])
+ if sids:
+ slip = slip_pool.browse(cr, uid, sids[0])
+ vals['name'] = slip.employee_id.otherid
+ vals['amount'] = slip.net + slip.other_pay
+ vals['bysal'] = slip.net
+ return {
+ 'value':vals
+ }
+payroll_advice_line()
+
+class contrib_register(osv.osv):
+ '''
+ Contribution Register
+ '''
+ _name = 'hr.contibution.register'
+ _description = 'Contribution Register'
+
+ def _total_contrib(self, cr, uid, ids, field_names, arg, context={}):
+ line_pool = self.pool.get('hr.contibution.register.line')
+ period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d')),('date_stop','>=',time.strftime('%Y-%m-%d'))])[0]
+ fiscalyear_id = self.pool.get('account.period').browse(cr, uid, period_id).fiscalyear_id
+ res = {}
+ for cur in self.browse(cr, uid, ids):
+ current = line_pool.search(cr, uid, [('period_id','=',period_id),('register_id','=',cur.id)])
+ years = line_pool.search(cr, uid, [('period_id.fiscalyear_id','=',fiscalyear_id.id), ('register_id','=',cur.id)])
+
+ e_month = 0.0
+ c_month = 0.0
+ for i in line_pool.browse(cr, uid, current):
+ e_month += i.emp_deduction
+ c_month += i.comp_deduction
+
+ e_year = 0.0
+ c_year = 0.0
+ for j in line_pool.browse(cr, uid, years):
+ e_year += i.emp_deduction
+ c_year += i.comp_deduction
+
+ res[cur.id]={
+ 'monthly_total_by_emp':e_month,
+ 'monthly_total_by_comp':c_month,
+ 'yearly_total_by_emp':e_year,
+ 'yearly_total_by_comp':c_year
+ }
+
+ return res
+
+ _columns = {
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ 'account_id': fields.many2one('account.account', 'Account', required=True),
+ 'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=False),
+ 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'register_line_ids':fields.one2many('hr.contibution.register.line', 'register_id', 'Register Line', readonly=True),
+ 'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, int(config['price_accuracy']))),
+ 'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, int(config['price_accuracy']))),
+ 'monthly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, int(config['price_accuracy']))),
+ 'monthly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, int(config['price_accuracy']))),
+ 'note': fields.text('Description'),
+ }
+ _defaults = {
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+contrib_register()
+
+class contrib_register_line(osv.osv):
+ '''
+ Contribution Register Line
+ '''
+ _name = 'hr.contibution.register.line'
+ _description = 'Contribution Register Line'
+
+ def _total(self, cr, uid, ids, field_names, arg, context):
+ res={}
+ for line in self.browse(cr, uid, ids, context):
+ res[line.id] = line.emp_deduction + line.comp_deduction
+ return res
+
+ _columns = {
+ 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'register_id':fields.many2one('hr.contibution.register', 'Register', required=False),
+ 'code':fields.char('Code', size=64, required=False, readonly=False),
+ 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
+ 'period_id': fields.many2one('account.period', 'Period'),
+ 'emp_deduction': fields.float('Employee Deduction', digits=(16, int(config['price_accuracy']))),
+ 'comp_deduction': fields.float('Company Deduction', digits=(16, int(config['price_accuracy']))),
+ 'total': fields.function(_total, method=True, store=True, string='Total', digits=(16, int(config['price_accuracy']))),
+ }
+contrib_register_line()
+
+class payment_category(osv.osv):
+ """
+ Allowance, Deduction Heads
+ House Rent Allowance, Medical Allowance, Food Allowance
+ Professional Tax, Advance TDS, Providend Funds, etc
+ """
+
+ _name = 'hr.allounce.deduction.categoty'
+ _description = 'Allowance Deduction Heads'
+
+ _columns = {
+ 'name':fields.char('Categoty Name', size=64, required=True, readonly=False),
+ 'code':fields.char('Categoty Code', size=64, required=True, readonly=False),
+ 'type':fields.selection([
+ ('allowance','Allowance'),
+ ('deduction','Deduction'),
+ ('other','Others'),
+ ],'Type', select=True),
+ 'base':fields.char('Based on', size=64, required=True, readonly=False, help='This will use to computer the % fields values, in general its on basic, but You can use all heads code field in small letter as a variable name i.e. hra, ma, lta, etc...., also you can use, static varible basic'),
+ 'condition':fields.char('Condition', size=1024, required=True, readonly=False, help='Applied this head for calculation if condition is true'),
+ 'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'),
+ 'note': fields.text('Description'),
+ 'user_id':fields.char('User', size=64, required=False, readonly=False),
+ 'state':fields.char('Label', size=64, required=False, readonly=False),
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ }
+ _defaults = {
+ 'condition': lambda *a: 'True',
+ 'base': lambda *a:'basic',
+ 'sequence': lambda *a:5,
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+payment_category()
+
+class company_contribution(osv.osv):
+ """
+ Company contribution
+ Allows to configure company contribution for some taxes
+ """
+
+ _name = 'company.contribution'
+ _description = "Company Contribution"
+
+ _columns = {
+ 'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Heads', required=False),
+ 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'code':fields.char('Code', size=64, required=True, readonly=False),
+ 'include_in_salary':fields.boolean('Included in Salary ?', help='If company contribute on this deduction then should company contribution is also deducted from Employee Salary'),
+ 'gratuity':fields.boolean('Use for Gratuity ?', required=False),
+ 'line_ids':fields.one2many('company.contribution.line', 'contribution_id', 'Calculations', required=False),
+ 'register_id':fields.property(
+ 'hr.contibution.register',
+ type='many2one',
+ relation='hr.contibution.register',
+ string="Contribution Register",
+ method=True,
+ view_load=True,
+ help="Contribution register based on company",
+ required=False
+ ),
+ 'amount_type':fields.selection([
+ ('fix','Fixed Amount'),
+ ('func','Function Calculation'),
+ ],'Amount Type', select=True),
+ 'contribute_per':fields.float('Contribution', digits=(16, int(config['price_accuracy'])), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'),
+ 'account_id':fields.property(
+ 'account.account',
+ type='many2one',
+ relation='account.account',
+ string="Account",
+ method=True,
+ view_load=True,
+ help="Expanse account where company expanse will be encoded",
+ required=False
+ ),
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ 'active':fields.boolean('Active', required=False),
+ 'note': fields.text('Description'),
+ }
+
+ _defaults = {
+ 'amount_type': lambda *a:'fix',
+ 'active': lambda *a:True,
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+
+ def execute_function(self, cr, uid, id, value, context):
+ """
+ self: pointer to self object
+ cr: cursor to database
+ uid: user id of current executer
+ """
+
+ line_pool = self.pool.get('company.contribution.line')
+ res = 0
+ ids = line_pool.search(cr, uid, [('category_id','=',id), ('to_val','>=',value),('from_val','<=',value)])
+ if not ids:
+ ids = line_pool.search(cr, uid, [('category_id','=',id), ('from','<=',value)])
+ if not ids:
+ res = 0
+ else:
+ res = line_pool.browse(cr, uid, ids)[0].value
+ return res
+
+company_contribution()
+
+class company_contribution_line(osv.osv):
+ """
+ Company contribution lines
+ """
+
+ _name = 'company.contribution.line'
+ _description = 'Allowance Deduction Categoty'
+ _order = 'sequence'
+
+ _columns = {
+ 'contribution_id':fields.many2one('company.contribution', 'Contribution', required=False),
+ 'name':fields.char('Name', size=64, required=False, readonly=False),
+ 'umo_id':fields.many2one('product.uom', 'Unite', required=False),
+ 'from_val': fields.float('From', digits=(16, int(config['price_accuracy']))),
+ 'to_val': fields.float('To', digits=(16, int(config['price_accuracy']))),
+ 'amount_type':fields.selection([
+ ('fix','Fixed Amount'),
+ ],'Amount Type', select=True),
+ 'sequence':fields.integer('Sequence'),
+ 'value': fields.float('Value', digits=(16, int(config['price_accuracy']))),
+ }
+company_contribution_line()
+
+class hr_holidays_status(osv.osv):
+ _inherit = "hr.holidays.status"
+
+ _columns = {
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ 'type':fields.selection([
+ ('paid','Paid Holiday'),
+ ('unpaid','Un-Paid Holiday'),
+ ('halfpaid','Half-Pay Holiday')
+ ], string='Payment'),
+ 'account_id': fields.many2one('account.account', 'Account', required=False),
+ 'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=False),
+ 'head_id': fields.many2one('hr.allounce.deduction.categoty', 'Payroll Head', domain=[('type','=','deduction')]),
+ 'code':fields.char('Code', size=64, required=False, readonly=False),
+ }
+ _defaults = {
+ 'type': lambda *args: 'unpaid',
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+hr_holidays_status()
+
+class hr_expense_expense(osv.osv):
+ _inherit = "hr.expense.expense"
+ _description = "Expense"
+ _columns = {
+ 'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Payroll Head', domain=[('type','=','other')]),
+ }
+hr_expense_expense()
+
+class hr_payslip(osv.osv):
+ '''
+ Pay Slip
+ '''
+ _name = 'hr.payslip'
+ _description = 'Pay Slip'
+
+ def _calculate(self, cr, uid, ids, field_names, arg, context):
+ res = {}
+ for rs in self.browse(cr, uid, ids, context):
+ allow = 0.0
+ deduct = 0.0
+ others = 0.0
+
+ obj = {
+ 'basic':rs.basic
+ }
+ if rs.igross > 0:
+ obj.update({
+ 'gross':rs.igross
+ })
+ if rs.inet > 0:
+ obj.update({
+ 'net':rs.inet
+ })
+
+ for line in rs.line_ids:
+ amount = 0.0
+
+ if line.amount_type == 'per':
+ try:
+ amount = line.amount * eval(str(line.category_id.base), obj)
+ except Exception, e:
+ raise osv.except_osv(_('Variable Error !'), _('Variable Error : %s ' % (e)))
+
+ elif line.amount_type in ('fix', 'func'):
+ amount = line.amount
+
+ cd = line.category_id.code.lower()
+ obj[cd] = amount
+
+ contrib = 0.0
+# if line.category_id.include_in_salary:
+# contrib = line.company_contrib
+
+ if line.type == 'allowance':
+ allow += amount
+ others += contrib
+ amount -= contrib
+ elif line.type == 'deduction':
+ deduct += amount
+ others -= contrib
+ amount += contrib
+ elif line.type == 'advance':
+ others += amount
+ elif line.type == 'loan':
+ others += amount
+ elif line.type == 'otherpay':
+ others += amount
+
+ self.pool.get('hr.payslip.line').write(cr, uid, [line.id], {'total':amount})
+
+ record = {
+ 'allounce':round(allow),
+ 'deduction':round(deduct),
+ 'grows':round(rs.basic + allow),
+ 'net':round(rs.basic + allow - deduct),
+ 'other_pay':others,
+ 'total_pay':round(rs.basic + allow - deduct)
+ }
+ res[rs.id] = record
+
+ return res
+
+ _columns = {
+ 'deg_id':fields.many2one('hr.payroll.structure', 'Designation', required=False),
+ 'register_id':fields.many2one('hr.payroll.register', 'Register', required=False),
+ 'journal_id': fields.many2one('account.journal', 'Expanse Journal', required=True),
+ 'bank_journal_id': fields.many2one('account.journal', 'Bank Journal', required=True),
+ 'name':fields.char('Name', size=64, required=False, readonly=True, states={'draft': [('readonly', False)]}),
+ 'number':fields.char('Number', size=64, required=False, readonly=True),
+ 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
+ 'date': fields.date('Date'),
+ 'state':fields.selection([
+ ('new','New Slip'),
+ ('draft','Wating for Verification'),
+ ('hr_check','Wating for HR Verification'),
+ ('accont_check','Wating for Account Verification'),
+ ('confirm','Confirm Sheet'),
+ ('done','Paid Salary'),
+ ('cancel','Reject'),
+ ],'State', select=True, readonly=True),
+ 'basic_before_leaves': fields.float('Basic Salary', readonly=True, digits=(16, 2)),
+ 'leaves': fields.float('Leaved Deduction', readonly=True, digits=(16, 2)),
+ 'basic': fields.float('Basic Salary - Leaves', readonly=True, digits=(16, 2)),
+ 'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, 2)),
+ 'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, 2)),
+ 'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits=(16, 2)),
+ 'deduction': fields.function(_calculate, method=True, store=True, multi='dc', string='Deduction', digits=(16, 2)),
+ 'other_pay': fields.function(_calculate, method=True, store=True, multi='dc', string='Others', digits=(16, 2)),
+ 'total_pay': fields.function(_calculate, method=True, store=True, multi='dc', string='Total Payment', digits=(16, 2)),
+ 'line_ids':fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}),
+ 'move_ids':fields.one2many('hr.payslip.account.move', 'slip_id', 'Accounting vouchers', required=False),
+ 'move_line_ids':fields.many2many('account.move.line', 'payslip_lines_rel', 'slip_id', 'line_id', 'Accounting Lines', readonly=True),
+ 'move_payment_ids':fields.many2many('account.move.line', 'payslip_payment_rel', 'slip_id', 'payment_id', 'Payment Lines', readonly=True),
+ 'company_id':fields.many2one('res.company', 'Company', required=False),
+ 'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')], help="Keep empty to use the period of the validation(Payslip) date."),
+ 'holiday_days': fields.integer('No of Leaves', readonly=True),
+ 'worked_days': fields.integer('Worked Day', readonly=True),
+ 'working_days': fields.integer('Working Days', readonly=True),
+ 'paid':fields.boolean('Paid ? ', required=False),
+ 'note':fields.text('Description'),
+ 'contract_id':fields.many2one('hr.contract', 'Contract', required=False),
+
+ 'igross': fields.float('Calculaton Field', readonly=True, digits=(16, 2), help="Calculation field used for internal calculation, do not place this on form"),
+ 'inet': fields.float('Calculaton Field', readonly=True, digits=(16, 2), help="Calculation field used for internal calculation, do not place this on form"),
+ }
+ _defaults = {
+ 'date': lambda *a: time.strftime('%Y-%m-%d'),
+ 'state': lambda *a: 'new',
+ 'company_id': lambda self, cr, uid, context: \
+ self.pool.get('res.users').browse(cr, uid, uid,
+ context=context).company_id.id,
+ }
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
+ default = {
+ 'line_ids': False,
+ 'move_ids': False,
+ 'move_line_ids': False,
+ 'move_payment_ids': False,
+ 'company_id':company_id,
+ 'period_id': False,
+ 'basic_before_leaves':0,
+ 'basic':0
+ }
+ res_id = super(hr_payslip, self).copy(cr, uid, id, default, context)
+ return res_id
+
+ def create_voucher(self, cr, uid, ids, name, voucher, sequence=5):
+ slip_move = self.pool.get('hr.payslip.account.move')
+ for slip in ids:
+ res = {
+ 'slip_id':slip,
+ 'move_id':voucher,
+ 'sequence':sequence,
+ 'name':name
+ }
+ slip_move.create(cr, uid, res)
+
+ def set_to_draft(self, cr, uid, ids, context={}):
+ self.write(cr, uid, ids, {'state':'draft'})
+ return True
+
+ def cancel_sheet(self, cr, uid, ids, context={}):
+ move_pool = self.pool.get('account.move')
+
+ for slip in self.browse(cr, uid, ids, context):
+ if slip.move_id:
+ if slip.move_id.state == 'posted':
+ move_pool.button_cancel(cr, uid [slip.move_id.id], context)
+ move_pool.unlink(cr, uid, [slip.move_id.id])
+
+ if slip.adj_move_id:
+ if slip.adj_move_id.state == 'posted':
+ move_pool.button_cancel(cr, uid [slip.adj_move_id.id], context)
+ move_pool.unlink(cr, uid, [slip.adj_move_id.id])
+
+ if slip.other_move_id:
+ if slip.other_move_id.state == 'posted':
+ move_pool.button_cancel(cr, uid [slip.other_move_id.id], context)
+ move_pool.unlink(cr, uid, [slip.other_move_id.id])
+
+ self.write(cr, uid, ids, {'state':'cancel'})
+ return True
+
+ def process_sheet(self, cr, uid, ids, context={}):
+ move_pool = self.pool.get('account.move')
+ movel_pool = self.pool.get('account.move.line')
+ invoice_pool = self.pool.get('account.invoice')
+
+ for slip in self.browse(cr,uid,ids):
+ line_ids = []
+ partner = False
+ partner_id = False
+ exp_ids = []
+
+ partner = slip.employee_id.address_home_id.partner_id
+ partner_id = partner.id
+
+ fiscal_year_ids = self.pool.get('account.fiscalyear').search(cr, uid, [])
+ if not fiscal_year_ids:
+ raise osv.except_osv(_('Warning !'), _('Please define fiscal year for perticular contract'))
+ fiscal_year_objs = self.pool.get('account.fiscalyear').read(cr, uid, fiscal_year_ids, ['date_start','date_stop'])
+ year_exist = False
+ for fiscal_year in fiscal_year_objs:
+ if ((fiscal_year['date_start'] <= slip.date) and (fiscal_year['date_stop'] >= slip.date)):
+ year_exist = True
+ if not year_exist:
+ raise osv.except_osv(_('Warning !'), _('Fiscal Year is not defined for slip date %s'%slip.date))
+ search_period = self.pool.get('account.period').search(cr,uid,[('date_start','<=',slip.date),('date_stop','>=',slip.date)])
+ if not search_period:
+ raise osv.except_osv(_('Warning !'), _('Period is not defined for slip date %s'%slip.date))
+ period_id = search_period[0]
+ name = 'Payment of Salary to %s' % (slip.employee_id.name)
+ move = {
+ 'journal_id': slip.bank_journal_id.id,
+ 'period_id': period_id,
+ 'date': slip.date,
+ 'type':'bank_pay_voucher',
+ 'ref':slip.number,
+ 'narration': name
+ }
+ move_id = move_pool.create(cr, uid, move)
+ self.create_voucher(cr, uid, [slip.id], name, move_id)
+
+ name = "To %s account" % (slip.employee_id.name)
+ ded_rec = {
+ 'move_id':move_id,
+ 'name': name,
+ #'partner_id': partner_id,
+ 'date': slip.date,
+ 'account_id': slip.employee_id.property_bank_account.id,
+ 'debit': 0.0,
+ 'credit' : slip.total_pay,
+ 'journal_id' : slip.journal_id.id,
+ 'period_id' :period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_rec)]
+ name = "By %s account" % (slip.employee_id.property_bank_account.name)
+ cre_rec = {
+ 'move_id':move_id,
+ 'name': name,
+ 'partner_id': partner_id,
+ 'date': slip.date,
+ 'account_id': partner.property_account_payable.id,
+ 'debit': slip.total_pay,
+ 'credit' : 0.0,
+ 'journal_id' : slip.journal_id.id,
+ 'period_id' :period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, cre_rec)]
+
+ other_pay = slip.other_pay
+ #Process all Reambuse Entries
+ for line in slip.line_ids:
+ if line.type == 'otherpay' and line.expanse_id.invoice_id:
+ if not line.expanse_id.invoice_id.move_id:
+ raise osv.except_osv(_('Warning !'), _('Please Confirm all Expanse Invoice appear for Reimbursement'))
+ invids = [line.expanse_id.invoice_id.id]
+ amount = line.total
+ acc_id = slip.bank_journal_id.default_credit_account_id and slip.bank_journal_id.default_credit_account_id.id
+ period_id = slip.period_id.id
+ journal_id = slip.bank_journal_id.id
+ name = '[%s]-%s' % (slip.number, line.name)
+ invoice_pool.pay_and_reconcile(cr, uid, invids, amount, acc_id, period_id, journal_id, False, period_id, False, context, name)
+ other_pay -= amount
+ #TODO: link this account entries to the Payment Lines also Expanse Entries to Account Lines
+ l_ids = movel_pool.search(cr, uid, [('name','=',name)])
+ line_ids += l_ids
+
+ l_ids = movel_pool.search(cr, uid, [('invoice','=',line.expanse_id.invoice_id.id)])
+ exp_ids += l_ids
+
+ #Process for Other payment if any
+ other_move_id = False
+ if slip.other_pay > 0:
+ narration = 'Payment of Other Payeble amounts to %s' % (slip.employee_id.name)
+ move = {
+ 'journal_id': slip.bank_journal_id.id,
+ 'period_id': period_id,
+ 'date': slip.date,
+ 'type':'bank_pay_voucher',
+ 'ref':slip.number,
+ 'narration': narration
+ }
+ other_move_id = move_pool.create(cr, uid, move)
+ self.create_voucher(cr, uid, [slip.id], narration, move_id)
+
+ name = "To %s account" % (slip.employee_id.name)
+ ded_rec = {
+ 'move_id':other_move_id,
+ 'name':name,
+ 'date':slip.date,
+ 'account_id':slip.employee_id.property_bank_account.id,
+ 'debit': 0.0,
+ 'credit': other_pay,
+ 'journal_id':slip.journal_id.id,
+ 'period_id':period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_rec)]
+ name = "By %s account" % (slip.employee_id.property_bank_account.name)
+ cre_rec = {
+ 'move_id':other_move_id,
+ 'name':name,
+ 'partner_id':partner_id,
+ 'date':slip.date,
+ 'account_id':partner.property_account_payable.id,
+ 'debit': other_pay,
+ 'credit':0.0,
+ 'journal_id':slip.journal_id.id,
+ 'period_id':period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, cre_rec)]
+
+ rec = {
+ 'state':'done',
+ 'move_payment_ids':[(6, 0, line_ids)],
+ 'paid':True
+ }
+ self.write(cr, uid, [slip.id], rec)
+ for exp_id in exp_ids:
+ self.write(cr, uid, [slip.id], {'move_line_ids':[(4, exp_id)]})
+
+ return True
+
+ def account_check_sheet(self, cr, uid, ids, context={}):
+ self.write(cr, uid, ids, {'state':'accont_check'})
+ return True
+
+ def hr_check_sheet(self, cr, uid, ids, context={}):
+ self.write(cr, uid, ids, {'state':'hr_check'})
+ return True
+
+ def verify_sheet(self, cr, uid, ids, context={}):
+
+ move_pool = self.pool.get('account.move')
+ movel_pool = self.pool.get('account.move.line')
+ exp_pool = self.pool.get('hr.expense.expense')
+
+ for slip in self.browse(cr,uid,ids):
+ total_deduct = 0.0
+
+ line_ids = []
+ partner = False
+ partner_id = False
+
+ if not slip.employee_id.address_home_id:
+ raise osv.except_osv(_('Integrity Error !'), _('Please defined the Employee Home Address Along with Partners !!'))
+
+ if not slip.employee_id.address_home_id.partner_id:
+ raise osv.except_osv(_('Integrity Error !'), _('Please defined the Partner in Home Address !!'))
+
+ partner = slip.employee_id.address_home_id.partner_id
+ partner_id = slip.employee_id.address_home_id.partner_id.id
+
+ period_id = False
+
+ if slip.period_id:
+ period_id = slip.period_id.id
+ else:
+ fiscal_year_ids = self.pool.get('account.fiscalyear').search(cr, uid, [])
+ if not fiscal_year_ids:
+ raise osv.except_osv(_('Warning !'), _('Please define fiscal year for perticular contract'))
+ fiscal_year_objs = self.pool.get('account.fiscalyear').read(cr, uid, fiscal_year_ids, ['date_start','date_stop'])
+ year_exist = False
+ for fiscal_year in fiscal_year_objs:
+ if ((fiscal_year['date_start'] <= slip.date) and (fiscal_year['date_stop'] >= slip.date)):
+ year_exist = True
+ if not year_exist:
+ raise osv.except_osv(_('Warning !'), _('Fiscal Year is not defined for slip date %s'%slip.date))
+ search_period = self.pool.get('account.period').search(cr,uid,[('date_start','<=',slip.date),('date_stop','>=',slip.date)])
+ if not search_period:
+ raise osv.except_osv(_('Warning !'), _('Period is not defined for slip date %s'%slip.date))
+ period_id = search_period[0]
+
+ move = {
+ #'name': slip.name,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'date': slip.date,
+ 'ref':slip.number,
+ 'narration': slip.name
+ }
+ move_id = move_pool.create(cr, uid, move)
+ self.create_voucher(cr, uid, [slip.id], slip.name, move_id)
+
+ line = {
+ 'move_id':move_id,
+ 'name': "By Basic Salary / " + slip.employee_id.name,
+ 'date': slip.date,
+ 'account_id': slip.employee_id.salary_account.id,
+ 'debit': slip.basic,
+ 'credit': 0.0,
+ 'quantity':slip.working_days,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'analytic_account_id': False,
+ 'ref':slip.number
+ }
+
+ #Setting Analysis Account for Basic Salary
+ if slip.employee_id.analytic_account:
+ line['analytic_account_id'] = slip.employee_id.analytic_account.id
+
+ move_line_id = movel_pool.create(cr, uid, line)
+ line_ids += [move_line_id]
+
+ line = {
+ 'move_id':move_id,
+ 'name': "To Basic Paysble Salary / " + slip.employee_id.name,
+ 'partner_id': partner_id,
+ 'date': slip.date,
+ 'account_id': slip.employee_id.employee_account.id,
+ 'debit': 0.0,
+ 'quantity':slip.working_days,
+ 'credit': slip.basic,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, line)]
+
+ for line in slip.line_ids:
+ name = "[%s] - %s / %s" % (line.code, line.name, slip.employee_id.name)
+ amount = line.total
+
+ if line.type == 'leaves':
+ continue
+
+ rec = {
+ 'move_id':move_id,
+ 'name': name,
+ 'date': slip.date,
+ 'account_id': line.account_id.id,
+ 'debit': 0.0,
+ 'credit' : 0.0,
+ 'journal_id' : slip.journal_id.id,
+ 'period_id' :period_id,
+ 'analytic_account_id':False,
+ 'ref':slip.number,
+ 'quantity':1
+ }
+
+ #Setting Analysis Account for Salary Slip Lines
+ if line.analytic_account_id:
+ rec['analytic_account_id'] = line.analytic_account_id.id
+ else:
+ rec['analytic_account_id'] = slip.deg_id.account_id.id
+
+ if line.type == 'allounce' or line.type == 'otherpay':
+ rec['debit'] = amount
+ if not partner.property_account_payable:
+ raise osv.except_osv(_('Integrity Error !'), _('Please Configure Partners Payable Account!!'))
+ ded_rec = {
+ 'move_id':move_id,
+ 'name': name,
+ 'partner_id': partner_id,
+ 'date': slip.date,
+ 'account_id': partner.property_account_payable.id,
+ 'debit': 0.0,
+ 'quantity':1,
+ 'credit' : amount,
+ 'journal_id' : slip.journal_id.id,
+ 'period_id' :period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_rec)]
+ elif line.type == 'deduction' or line.type == 'otherdeduct':
+ if not partner.property_account_receivable:
+ raise osv.except_osv(_('Integrity Error !'), _('Please Configure Partners Receivable Account!!'))
+ rec['credit'] = amount
+ total_deduct += amount
+ ded_rec = {
+ 'move_id':move_id,
+ 'name': name,
+ 'partner_id': partner_id,
+ 'date': slip.date,
+ 'quantity':1,
+ 'account_id': partner.property_account_receivable.id,
+ 'debit': amount,
+ 'credit' : 0.0,
+ 'journal_id' : slip.journal_id.id,
+ 'period_id' :period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_rec)]
+
+ line_ids += [movel_pool.create(cr, uid, rec)]
+
+ if line.company_contrib > 0:
+ company_contrib = line.company_contrib
+# if line.category_id.amount_type == 'per':
+# company_contrib = (amount * line.category_id.contribute_per)
+
+ narration = """Company Contribution of %s Encode same as a Company Expanse @ %s""" % (line.name, company_contrib)
+ move = {
+ #'name': slip.name,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'date': slip.date,
+ 'ref':slip.number,
+ 'narration': narration
+ }
+ company_contrib_move_id = move_pool.create(cr, uid, move)
+ name = "[%s] - %s / %s - Company Contribution" % (line.code, line.name, slip.employee_id.name)
+ self.create_voucher(cr, uid, [slip.id], name, company_contrib_move_id)
+
+ ded_deb = {
+ 'move_id':company_contrib_move_id,
+ 'name': name,
+ 'date': slip.date,
+ 'quantity':1,
+ 'account_id': line.category_id.account_id.id,
+ 'debit': company_contrib,
+ 'credit' : 0.0,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_deb)]
+ ded_cre = {
+ 'move_id':company_contrib_move_id,
+ 'name': name,
+ 'date': slip.date,
+ 'quantity':1,
+ 'account_id': line.category_id.register_id.account_id.id,
+ 'debit': 0.0,
+ 'credit' : company_contrib,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_cre)]
+
+ if line.category_id.include_in_salary:
+ narration = """Company Contribution of %s Deducted from Employee %s""" % (line.name, company_contrib)
+ move = {
+ #'name': slip.name,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'date': slip.date,
+ 'ref':slip.number,
+ 'narration': narration
+ }
+ include_in_salary_move_id = move_pool.create(cr, uid, move)
+ self.create_voucher(cr, uid, [slip.id], narration, include_in_salary_move_id)
+
+ total_deduct += company_contrib
+ ded_deb = {
+ 'move_id':include_in_salary_move_id,
+ 'name': name,
+ 'partner_id': partner_id,
+ 'date': slip.date,
+ 'quantity':1,
+ 'account_id': partner.property_account_receivable.id,
+ 'debit': company_contrib,
+ 'credit' : 0.0,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_deb)]
+ ded_cre = {
+ 'move_id':include_in_salary_move_id,
+ 'name': name,
+ 'date': slip.date,
+ 'quantity':1,
+ 'account_id': line.category_id.account_id.id,
+ 'debit': 0.0,
+ 'credit' : company_contrib,
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_cre)]
+
+ #make an entry line to contribution register
+ if line.category_id.register_id:
+ ctr = {
+ 'register_id':line.category_id.register_id.id,
+ 'name':line.name,
+ 'code':line.code,
+ 'employee_id':slip.employee_id.id,
+ 'period_id':period_id,
+ 'emp_deduction':amount,
+ }
+ if line.category_id.contribute:
+ ctr['comp_deduction'] = amount
+
+ company = 0.0
+ employee = 0.0
+ if line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'per':
+ new_amount = (amount * (line.category_id.contribute_per / (1+line.category_id.contribute_per)))
+ company = new_amount
+ employee = amount - company
+
+ elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'fix':
+ company = line.category_id.contribute_per
+ employee = amount - company
+
+ elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'func':
+ company = self.pool.get('hr.allounce.deduction.categoty').execute_function(cr, uid, line.category_id.id, line.slip_id.basic, context)
+ employee = amount
+
+ elif line.category_id.contribute and not line.category_id.include_in_salary and line.category_id.amount_type == 'per':
+ company = amount * line.category_id.contribute_per
+ employee = amount
+
+ elif line.category_id.contribute and not line.category_id.include_in_salary and line.category_id.amount_type == 'fix':
+ company = line.category_id.contribute_per
+ employee = amount
+
+ elif line.category_id.contribute and not line.category_id.include_in_salary and line.category_id.amount_type == 'func':
+ company = self.pool.get('hr.allounce.deduction.categoty').execute_function(cr, uid, line.category_id.id, line.slip_id.basic, context)
+ employee = amount
+
+ ctr['emp_deduction'] = employee
+ ctr['comp_deduction'] = company
+
+ self.pool.get('hr.contibution.register.line').create(cr, uid, ctr)
+
+ adj_move_id = False
+ if total_deduct > 0:
+ move = {
+ 'journal_id': slip.journal_id.id,
+ 'period_id': period_id,
+ 'date': slip.date,
+ 'ref':slip.number,
+ 'narration': 'Adjustment : %s' % (slip.name)
+ }
+ adj_move_id = move_pool.create(cr, uid, move)
+ name = "Adjustment Entry - %s" % (slip.employee_id.name)
+ self.create_voucher(cr, uid, [slip.id], name, adj_move_id)
+
+ ded_rec = {
+ 'move_id':adj_move_id,
+ 'name': name,
+ 'partner_id': partner_id,
+ 'date': slip.date,
+ 'account_id': partner.property_account_receivable.id,
+ 'debit': 0.0,
+ 'quantity':1,
+ 'credit' : total_deduct,
+ 'journal_id' : slip.journal_id.id,
+ 'period_id' :period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, ded_rec)]
+ cre_rec = {
+ 'move_id':adj_move_id,
+ 'name': name,
+ 'partner_id': partner_id,
+ 'date': slip.date,
+ 'account_id': partner.property_account_payable.id,
+ 'debit': total_deduct,
+ 'quantity':1,
+ 'credit' : 0.0,
+ 'journal_id' : slip.journal_id.id,
+ 'period_id' :period_id,
+ 'ref':slip.number
+ }
+ line_ids += [movel_pool.create(cr, uid, cre_rec)]
+
+ rec = {
+ 'state':'confirm',
+ 'move_line_ids':[(6, 0,line_ids)],
+ }
+ if not slip.period_id:
+ rec['period_id'] = period_id
+
+ dates = prev_bounds(slip.date)
+ exp_ids = exp_pool.search(cr, uid, [('date_valid','>=',dates[0]), ('date_valid','<=',dates[1]), ('state','=','invoiced')])
+ if exp_ids:
+ acc = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category')
+ for exp in exp_pool.browse(cr, uid, exp_ids):
+ exp_res = {
+ 'name':exp.name,
+ 'amount_type':'fix',
+ 'type':'otherpay',
+ 'category_id':exp.category_id.id,
+ 'amount':exp.amount,
+ 'slip_id':slip.id,
+ 'expanse_id':exp.id,
+ 'account_id':acc
+ }
+ self.pool.get('hr.payslip.line').create(cr, uid, exp_res)
+
+ self.write(cr, uid, [slip.id], rec)
+
+ return True
+
+ def get_contract(self, cr, uid, employee, date, context={}):
+ sql_req= '''
+ SELECT c.id as id, c.wage as wage, struct_id as function
+ FROM hr_contract c
+ LEFT JOIN hr_employee emp on (c.employee_id=emp.id)
+ LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id)
+ LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id)
+ WHERE
+ (emp.id=%s) AND
+ (date_start <= %s) AND
+ (date_end IS NULL OR date_end >= %s)
+ LIMIT 1
+ '''
+ cr.execute(sql_req, (employee.id, date, date))
+ contract = cr.dictfetchone()
+
+ return contract
+
+ def _get_leaves(self, cr, user, slip, employee, context={}):
+ """
+ Compute leaves for an employee
+
+ @param cr: cursor to database
+ @param user: id of current user
+ @param slip: object of the hr.payroll.slip model
+ @param employee: object of the hr.employee model
+ @param context: context arguments, like lang, time zone
+
+ @return: return a result
+ """
+
+ result = []
+
+ dates = prev_bounds(slip.date)
+ sql = '''select id from hr_holidays
+ where date_from >= '%s' and date_to <= '%s'
+ and employee_id = %s
+ and state = 'validate' ''' % (dates[0], dates[1], slip.employee_id.id)
+ cr.execute(sql)
+ res = cr.fetchall()
+
+ if res:
+ result = [x[0] for x in res]
+
+ return result
+
+ def compute_sheet(self, cr, uid, ids, context={}):
+ emp_pool = self.pool.get('hr.employee')
+ slip_pool = self.pool.get('hr.payslip')
+ func_pool = self.pool.get('hr.payroll.structure')
+ slip_line_pool = self.pool.get('hr.payslip.line')
+ holiday_pool = self.pool.get('hr.holidays')
+
+ date = self.read(cr, uid, ids, ['date'])[0]['date']
+
+ #Check for the Holidays
+ def get_days(start, end, month, year, calc_day):
+ count = 0
+ import datetime
+ for day in range(start, end):
+ if datetime.date(year, month, day).weekday() == calc_day:
+ count += 1
+ return count
+
+ for slip in self.browse(cr, uid, ids):
+ contracts = self.get_contract(cr, uid, slip.employee_id, date, context)
+
+ if contracts.get('id', False) == False:
+ continue
+
+ contract = self.pool.get('hr.contract').browse(cr, uid, contracts.get('id'))
+ sal_type = contract.wage_type_id.type
+ function = contract.struct_id.id
+
+ lines = []
+ if function:
+ func = func_pool.read(cr, uid, function, ['line_ids'])
+ lines = slip_line_pool.browse(cr, uid, func['line_ids'])
+
+ lines += slip.employee_id.line_ids
+
+ old_slip_id = slip_line_pool.search(cr, uid, [('slip_id','=',slip.id)])
+ slip_line_pool.unlink(cr, uid, old_slip_id)
+
+ ad = []
+ lns = {}
+ all_per = 0.0
+ ded_per = 0.0
+ all_fix = 0.0
+ ded_fix = 0.0
+
+ obj = {
+ 'basic':0.0
+ }
+ update = {
+
+ }
+
+ if contract.wage_type_id.type == 'gross':
+ obj['gross'] = contract.wage
+ update['igross'] = contract.wage
+ if contract.wage_type_id.type == 'net':
+ obj['net'] = contract.wage
+ update['inet'] = contract.wage
+ if contract.wage_type_id.type == 'basic':
+ obj['basic'] = contract.wage
+ update['basic'] = contract.wage
+
+ c_type = {
+
+ }
+
+ for line in lines:
+ cd = line.code.lower()
+ obj[cd] = line.amount or 0.0
+
+ for line in lines:
+
+ if line.category_id.code in ad:
+ continue
+
+ ad.append(line.category_id.code)
+ cd = line.category_id.code.lower()
+
+ calculate = False
+ try:
+ exp = line.category_id.condition
+ calculate = eval(exp, obj)
+ except Exception, e:
+ raise osv.except_osv(_('Variable Error !'), _('Variable Error : %s ' % (e)))
+
+ if not calculate:
+ continue
+
+ percent = 0.0
+ value = 0.0
+ base = False
+ company_contrib = 0.0
+ base = line.category_id.base
+
+ try:
+ # Please have a look at the configuration guide for rules and restrictions
+ amt = eval(base, obj)
+ except Exception, e:
+ raise osv.except_osv(_('Variable Error !'), _('Variable Error : %s ' % (e)))
+
+ if sal_type in ('gross', 'net'):
+ if line.amount_type == 'per':
+ percent = line.amount
+
+ if amt > 1:
+ value = percent * amt
+ elif amt > 0 and amt <= 1:
+ percent = percent * amt
+
+ if value > 0:
+ percent = 0.0
+
+ elif line.amount_type == 'fix':
+ value = line.amount
+
+ elif line.amount_type == 'func':
+ value = self.pool.get('hr.payslip.line').execute_function(cr, uid, line.id, amt, context)
+ line.amount = value
+ else:
+ if line.amount_type in ('fix', 'per'):
+ value = line.amount
+ elif line.amount_type == 'func':
+ value = self.pool.get('hr.payslip.line').execute_function(cr, uid, line.id, amt, context)
+ line.amount = value
+
+ if line.type == 'allowance':
+ all_per += percent
+ all_fix += value
+ elif line.type == 'deduction':
+ ded_per += percent
+ ded_fix += value
+
+ vals = {
+ 'amount':line.amount,
+ 'slip_id':slip.id,
+ 'employee_id':False,
+ 'function_id':False,
+ 'base':base
+ }
+ slip_line_pool.copy(cr, uid, line.id, vals, {})
+
+ if sal_type in ('gross', 'net'):
+ sal = contract.wage
+ if sal_type == 'net':
+ sal += ded_fix
+ sal -= all_fix
+ per = 0.0
+ if sal_type == 'net':
+ per = (all_per - ded_per)
+ else:
+ per = all_per
+ if per <=0 :
+ per *= -1
+ final = (per * 100) + 100
+ basic = (sal * 100) / final
+ else:
+ basic = contract.wage
+
+ number = self.pool.get('ir.sequence').get(cr, uid, 'salary.slip')
+ ttyme = datetime.fromtimestamp(time.mktime(time.strptime(slip.date,"%Y-%m-%d")))
+ update.update({
+ 'deg_id':function,
+ 'number':number,
+ 'basic': round(basic),
+ 'basic_before_leaves': round(basic),
+ 'name':'Salary Slip of %s for %s' % (slip.employee_id.name, ttyme.strftime('%B-%Y')),
+ 'state':'draft',
+ 'contract_id':contract.id,
+ 'company_id':slip.employee_id.company_id.id
+ })
+ self.write(cr, uid, [slip.id], update)
+
+
+ for slip in self.browse(cr, uid, ids):
+ basic_before_leaves = basic
+
+ working_day = 0
+ off_days = 0
+ dates = prev_bounds(slip.date)
+
+ days_arr = [0, 1, 2, 3, 4, 5, 6]
+ for dy in range(contract.working_days_per_week, 7):
+ off_days += get_days(1, dates[1].day, dates[1].month, dates[1].year, days_arr[dy])
+
+ total_off = off_days
+ working_day = dates[1].day - total_off
+ perday = slip.net / working_day
+
+ total = 0.0
+ leave = 0.0
+
+ leave_ids = self._get_leaves(cr, uid, slip, slip.employee_id, context)
+
+ total_leave = 0.0
+ paid_leave = 0.0
+ for hday in holiday_pool.browse(cr, uid, leave_ids):
+ res = {
+ 'slip_id':slip.id,
+ 'name':hday.holiday_status_id.name + '-%s' % (hday.number_of_days),
+ 'code':hday.holiday_status_id.code,
+ 'amount_type':'fix',
+ 'category_id':hday.holiday_status_id.head_id.id,
+ 'account_id':hday.holiday_status_id.account_id.id,
+ 'analytic_account_id':hday.holiday_status_id.analytic_account_id.id
+ }
+
+ days = hday.number_of_days
+ if hday.number_of_days < 0:
+ days = hday.number_of_days * -1
+
+ total_leave += days
+ if hday.holiday_status_id.type == 'paid':
+ paid_leave += days
+ continue
+
+ elif hday.holiday_status_id.type == 'halfpaid':
+ paid_leave += (days / 2)
+ res['name'] = hday.holiday_status_id.name + '-%s/2' % (days)
+ res['amount'] = perday * (days/2)
+ total += perday * (days/2)
+ leave += days / 2
+ res['type'] = 'deduction'
+ else:
+ res['name'] = hday.holiday_status_id.name + '-%s' % (days)
+ res['amount'] = perday * days
+ res['type'] = 'deduction'
+ leave += days
+ total += perday * days
+
+ slip_line_pool.create(cr, uid, res)
+ basic = basic - total
+ leaves = total
+
+ update.update({
+ 'basic_before_leaves': round(basic_before_leaves),
+ 'leaves':total,
+ 'holiday_days':leave,
+ 'worked_days':working_day - leave,
+ 'working_days':working_day,
+ })
+ self.write(cr, uid, [slip.id], update)
+
+ return True
+
+hr_payslip()
+
+class account_move_link_slip(osv.osv):
+ '''
+ Account Move Link to Pay Slip
+ '''
+ _name = 'hr.payslip.account.move'
+ _description = 'Account Move Link to Pay Slip'
+ _columns = {
+ 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'move_id':fields.many2one('account.move', 'Expanse Entries', required=False, readonly=True),
+ 'slip_id':fields.many2one('hr.payslip', 'Pay Slip', required=False),
+ 'sequence': fields.integer('Sequence'),
+ }
+account_move_link_slip()
+
+class line_condition(osv.osv):
+ '''
+ Line Condition
+ '''
+ _name = 'hr.payslip.line.condition'
+ _description = 'Line Condition'
+
+ _columns = {
+ 'name':fields.char('Name', size=64, required=False, readonly=False),
+ 'date_start': fields.date('Start Date'),
+ 'date_end': fields.date('End Date'),
+ 'state':fields.selection([
+ ('total','Override By'),
+ ('add','Add to Structure')
+ ],'Condition', select=True, readonly=False),
+ }
+line_condition()
+
+class hr_payslip_line(osv.osv):
+ '''
+ Payslip Line
+ '''
+ _name = 'hr.payslip.line'
+ _description = 'Payslip Line'
+
+# def _calculate(self, cr, uid, ids, field_names, arg, context):
+# res = {}
+# obj = {}
+# for line in self.browse(cr, uid, ids, context):
+# obj['basic'] = line.slip_id.basic
+# amount = 0.0
+#
+# if line.amount_type == 'per' and line.base:
+# print 'XXXXXXXXXXXXXXXX : ', obj
+# amount = line.amount * eval(line.base, obj)
+# elif line.amount_type in ('fix', 'func'):
+# amount = line.amount
+
+# cd = line.category_id.code.lower()
+# obj[cd] = amount
+# print 'XXXXXXXXXXXXXXXXXX : ', cd
+#
+# res[line.id] = amount
+# print 'XXXXXXXXXXXX : ', obj
+# return res
+
+ def onchange_category(self, cr, uid, ids, category_id):
+ seq = 0
+ res = {
+ }
+ if category_id:
+ category = self.pool.get('hr.allounce.deduction.categoty').browse(cr, uid, category_id)
+ res.update({
+ 'sequence':category.sequence,
+ 'name':category.name,
+ 'code':category.code,
+ 'type':category.type
+ })
+ return {'value':res}
+
+ def onchange_amount(self, cr, uid, ids, amount, typ):
+ amt = amount
+ if typ and typ == 'per':
+ if int(amt) > 0:
+ amt = amt / 100
+ return {'value':{'amount':amt}}
+
+ _columns = {
+ 'slip_id':fields.many2one('hr.payslip', 'Pay Slip', required=False),
+ 'condition_id':fields.many2one('hr.payslip.line.condition', 'Condition', required=False),
+ 'function_id':fields.many2one('hr.payroll.structure', 'Function', required=False),
+ 'employee_id':fields.many2one('hr.employee', 'Employee', required=False),
+ 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'base':fields.char('Formula', size=1024, required=False, readonly=False),
+ 'code':fields.char('Code', size=64, required=False, readonly=False),
+ 'type':fields.selection([
+ ('allowance','Allowance'),
+ ('deduction','Deduction'),
+ ('leaves','Leaves'),
+ ('advance','Advance'),
+ ('loan','Loan'),
+ ('installment','Loan Installment'),
+ ('otherpay','Other Payment'),
+ ('otherdeduct','Other Deduction'),
+ ],'Type', select=True, required=True),
+ 'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Category', required=True),
+ 'amount_type':fields.selection([
+ ('per','Percentage (%)'),
+ ('fix','Fixed Amount'),
+ ('func','Function Value'),
+ ],'Amount Type', select=True),
+ 'amount': fields.float('Amount / Percentage', digits=(16, 4)),
+ 'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=False),
+ 'account_id':fields.many2one('account.account', 'General Account', required=True),
+ 'total': fields.float('Sub Total', readonly=True, digits=(16, int(config['price_accuracy']))),
+ #'total': fields.function(_calculate, method=True, type='float', string='Label', store=True),
+ 'company_contrib': fields.float('Company Contribution', readonly=True, digits=(16, int(config['price_accuracy']))),
+ 'expanse_id': fields.many2one('hr.expense.expense', 'Expense'),
+ 'sequence': fields.integer('Sequence'),
+ 'note':fields.text('Description'),
+ 'line_ids':fields.one2many('hr.payslip.line.line', 'slipline_id', 'Calculations', required=False)
+ }
+ _order = 'sequence'
+
+ def execute_function(self, cr, uid, id, value, context):
+ line_pool = self.pool.get('hr.payslip.line.line')
+ res = 0
+ ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)])
+
+ if not ids:
+ ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value)])
+
+ if not ids:
+ return res
+
+ res = line_pool.browse(cr, uid, ids)[-1].value
+ return res
+
+hr_payslip_line()
+
+class hr_payslip_line_line(osv.osv):
+ '''
+ Function Line
+ '''
+ _name = 'hr.payslip.line.line'
+ _description = 'Function Line'
+ _order = 'sequence'
+
+ _columns = {
+ 'slipline_id':fields.many2one('hr.payslip.line', 'Slip Line', required=False),
+ 'name':fields.char('Name', size=64, required=False, readonly=False),
+ 'umo_id':fields.many2one('product.uom', 'Unite', required=False),
+ 'from_val': fields.float('From', digits=(16, int(config['price_accuracy']))),
+ 'to_val': fields.float('To', digits=(16, int(config['price_accuracy']))),
+ 'amount_type':fields.selection([
+ ('fix','Fixed Amount'),
+ ],'Amount Type', select=True),
+ 'sequence':fields.integer('Sequence'),
+ 'value': fields.float('Value', digits=(16, int(config['price_accuracy']))),
+ }
+hr_payslip_line_line()
+
+class hr_employee(osv.osv):
+ '''
+ Employee
+ '''
+ _inherit = 'hr.employee'
+ _description = 'Employee'
+
+ _columns = {
+ 'pan_no':fields.char('PAN No', size=64, required=False, readonly=False),
+ 'esp_account':fields.char('EPS Account', size=64, required=False, readonly=False),
+ 'pf_account':fields.char('PF Account', size=64, required=False, readonly=False),
+ 'pg_joining': fields.date('PF Join Date'),
+ 'esi_account':fields.char('ESI Account', size=64, required=False, readonly=False),
+ 'hospital_id':fields.many2one('res.partner.address', 'ESI Hospital', required=False),
+ 'passport_id':fields.many2one('hr.passport', 'Passport', required=False),
+ 'otherid':fields.char('Other Id', size=64, required=False),
+ 'line_ids':fields.one2many('hr.payslip.line', 'employee_id', 'Salary Structure', required=False),
+ 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
+ 'property_bank_account': fields.property(
+ 'account.account',
+ type='many2one',
+ relation='account.account',
+ string="Bank Account",
+ method=True,
+ view_load=True,
+ help="Select Bank Account from where Salary Expanse will be Paid",
+ required=True),
+ 'salary_account':fields.property(
+ 'account.account',
+ type='many2one',
+ relation='account.account',
+ string="Salary Account",
+ method=True,
+ view_load=True,
+ help="Expanse account when Salary Expanse will be recorded",
+ required=True),
+ 'employee_account':fields.property(
+ 'account.account',
+ type='many2one',
+ relation='account.account',
+ string="Employee Account",
+ method=True,
+ view_load=True,
+ help="Employee Payable Account",
+ required=True),
+ 'analytic_account':fields.property(
+ 'account.analytic.account',
+ type='many2one',
+ relation='account.analytic.account',
+ string="Analytic Account",
+ method=True,
+ view_load=True,
+ help="Analytic Account for Salary Analysis",
+ required=False),
+ }
+hr_employee()
+
diff --git a/addons/hr_payroll/hr_payroll_data.xml b/addons/hr_payroll/hr_payroll_data.xml
new file mode 100644
index 00000000000..80a66722efc
--- /dev/null
+++ b/addons/hr_payroll/hr_payroll_data.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="HRA" model="hr.allounce.deduction.categoty">
+ <field name="code">HRA</field>
+ <field name="type">allowance</field>
+ <field name="name">House Rant Allowance</field>
+ </record>
+
+ <record id="CA" model="hr.allounce.deduction.categoty">
+ <field name="code">CA</field>
+ <field name="type">allowance</field>
+ <field name="name">Convance Allowance</field>
+ </record>
+
+ <record id="MA" model="hr.allounce.deduction.categoty">
+ <field name="code">MA</field>
+ <field name="type">allowance</field>
+ <field name="name">Meducal Allowance</field>
+ </record>
+
+ <record id="TELA" model="hr.allounce.deduction.categoty">
+ <field name="code">TELA</field>
+ <field name="type">allowance</field>
+ <field name="name">Telephone Allowance</field>
+ </record>
+
+ <record id="LTA" model="hr.allounce.deduction.categoty">
+ <field name="code">LTA</field>
+ <field name="type">allowance</field>
+ <field name="name">Leave Travel Allowance</field>
+ </record>
+
+ <record id="NA" model="hr.allounce.deduction.categoty">
+ <field name="code">NA</field>
+ <field name="type">allowance</field>
+ <field name="name">Newspaper Allowance</field>
+ </record>
+
+ <record id="TA" model="hr.allounce.deduction.categoty">
+ <field name="code">TA</field>
+ <field name="type">allowance</field>
+ <field name="name">Traveling Allowance</field>
+ </record>
+
+ <record id="FA" model="hr.allounce.deduction.categoty">
+ <field name="code">FA</field>
+ <field name="type">allowance</field>
+ <field name="name">Food Allowance</field>
+ </record>
+
+ <record id="DA" model="hr.allounce.deduction.categoty">
+ <field name="code">DA</field>
+ <field name="type">allowance</field>
+ <field name="name">Dearness Allowance</field>
+ </record>
+
+ <record id="PF" model="hr.allounce.deduction.categoty">
+ <field name="code">PF</field>
+ <field name="type">deduction</field>
+ <field name="name">Provident Fund</field>
+ </record>
+
+ <record id="PT" model="hr.allounce.deduction.categoty">
+ <field name="code">PT</field>
+ <field name="type">deduction</field>
+ <field name="name">Professional Tax</field>
+ </record>
+
+ <record id="WF" model="hr.allounce.deduction.categoty">
+ <field name="code">WF</field>
+ <field name="type">deduction</field>
+ <field name="name">Welfare</field>
+ </record>
+
+ <record id="TDS" model="hr.allounce.deduction.categoty">
+ <field name="code">TDS</field>
+ <field name="type">deduction</field>
+ <field name="name">Tax Deduct at Source</field>
+ </record>
+
+ <record id="LWP" model="hr.allounce.deduction.categoty">
+ <field name="code">LWP</field>
+ <field name="type">deduction</field>
+ <field name="name">Leave without pay</field>
+ </record>
+
+ <record id="FC" model="hr.allounce.deduction.categoty">
+ <field name="code">FC</field>
+ <field name="type">deduction</field>
+ <field name="name">Food Coupons</field>
+ </record>
+
+ <record id="ESI" model="hr.allounce.deduction.categoty">
+ <field name="code">ESI</field>
+ <field name="type">deduction</field>
+ <field name="name">Employee's State Insurance</field>
+ </record>
+
+ <record id="OTHERD" model="hr.allounce.deduction.categoty">
+ <field name="code">OTHERD</field>
+ <field name="type">deduction</field>
+ <field name="name">Other Deduction</field>
+ </record>
+
+ <record id="OTHERA" model="hr.allounce.deduction.categoty">
+ <field name="code">OTHERA</field>
+ <field name="type">allowance</field>
+ <field name="name">Other Taxable Allowance</field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/hr_payroll/hr_payroll_sequence.xml b/addons/hr_payroll/hr_payroll_sequence.xml
new file mode 100644
index 00000000000..e1c27bbad27
--- /dev/null
+++ b/addons/hr_payroll/hr_payroll_sequence.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data noupdate="1">
+ <record id="seq_type_salary_slip" model="ir.sequence.type">
+ <field name="name">Salary Slip</field>
+ <field name="code">salary.slip</field>
+ </record>
+ <record id="seq_salary_slip" model="ir.sequence">
+ <field name="name">Salary Slip</field>
+ <field name="code">salary.slip</field>
+ <field name="prefix">SLIP/</field>
+ <field name="padding">3</field>
+ </record>
+
+ <record id="seq_type_salary_register" model="ir.sequence.type">
+ <field name="name">Salary Register</field>
+ <field name="code">salary.register</field>
+ </record>
+ <record id="seq_salary_register" model="ir.sequence">
+ <field name="name">Salary Register</field>
+ <field name="code">salary.register</field>
+ <field name="prefix">REG/</field>
+ <field name="padding">3</field>
+ </record>
+
+ <record id="seq_type_payment_advice" model="ir.sequence.type">
+ <field name="name">Payment Advice</field>
+ <field name="code">payment.advice</field>
+ </record>
+ <record id="seq_payment_advice" model="ir.sequence">
+ <field name="name">Payment Advice</field>
+ <field name="code">payment.advice</field>
+ <field name="prefix">PAY/</field>
+ <field name="padding">3</field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml
new file mode 100644
index 00000000000..0be3793a234
--- /dev/null
+++ b/addons/hr_payroll/hr_payroll_view.xml
@@ -0,0 +1,943 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <!-- Root Menus -->
+ <menuitem id="menu_hr_root_payroll" parent="hr.menu_hr_root" name="Payroll"/>
+ <menuitem id="payroll_configure" parent="hr.menu_hr_configuration" name="Payroll"/>
+
+ <!-- Passport Views -->
+ <record id="hr_passport_form" model="ir.ui.view">
+ <field name="name">hr.passport.form</field>
+ <field name="model">hr.passport</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Passport">
+ <group col="6" colspan="4">
+ <field name="name" select="1" colspan="4"/>
+ <field name="employee_id" select="1"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator string="Country &amp; Address" colspan="4"/>
+ <field name="country_id" select="1"/>
+ <field name="address_id" select="1"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator string="Valid From" colspan="2"/>
+ <field name="date_issue" select="1"/>
+ <field name="date_expire" select="1"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Description">
+ <separator string="Description" colspan="2"/>
+ <field name="note" colspan="4" nolabel="1"/>
+ </page>
+ <page string="Contracts">
+ <field name="contracts_ids" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+ <record id="hr_passport_tree" model="ir.ui.view">
+ <field name="name">hr.passport.tree</field>
+ <field name="model">hr.passport</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Passport">
+ <field name="name" select="1"/>
+ <field name="employee_id" select="1"/>
+ <field name="country_id" select="1"/>
+ <field name="date_expire" select="1"/>
+ <field name="date_expire" select="1"/>
+ </tree>
+ </field>
+ </record>
+ <record id="action_hr_passport_tree" model="ir.actions.act_window">
+ <field name="name">All Passports</field>
+ <field name="res_model">hr.passport</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="hr_passport_tree"/>
+ </record>
+ <menuitem id="passport_configure" parent="hr.menu_hr_configuration" name="Passport"/>
+ <menuitem
+ id="menu_action_hr_passport_tree"
+ action="action_hr_passport_tree"
+ parent="passport_configure"
+ />
+ <!-- End Passport Views -->
+
+ <!-- Employee View -->
+ <record id="hr_contract.hr_hr_employee_view_form2" model="ir.ui.view">
+ <field name="name">hr.hr.employee.view.form2</field>
+ <field name="model">hr.employee</field>
+ <field name="inherit_id" ref="hr.view_employee_form"/>
+ <field name="arch" type="xml">
+ <notebook position="inside">
+ <page string="Contracts">
+ <field colspan="4" mode="form,tree" name="contract_ids" nolabel="1">
+ <tree string="Contracts">
+ <field name="name"/>
+ <field name="job_id"/>
+ <field name="date_start"/>
+ <field name="date_end"/>
+ <field name="working_hours"/>
+ <field name="wage_type_id"/>
+ <field name="wage"/>
+ </tree>
+ <form string="Contract">
+ <group colspan="4" col="6">
+ <field name="name" select="1"/>
+ <field name="job_id"/>
+ <newline/>
+ <field name="wage"/>
+ <field name="wage_type_id" widget="selection"/>
+ <field name="type_id" widget="selection"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Main Data">
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Duration"/>
+ <field name="date_start" select="1"/>
+ <field name="date_end" select="1"/>
+ <field name="working_hours"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Advantages"/>
+ <field name="struct_id" select="1"/>
+ <field name="advantages_net"/>
+ <field name="advantages_gross"/>
+ <field name="advantages" nolabel="1" colspan="2"/>
+ </group>
+ </page>
+ <page string="Work Permit">
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Passport"/>
+ <field name="passport_id"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Valid for"/>
+ <field name="visa_no"/>
+ <field name="permit_no"/>
+ <field name="visa_expire"/>
+ </group>
+ </page>
+ </notebook>
+ <separator colspan="4" string="Notes"/>
+ <field colspan="4" name="notes" nolabel="1"/>
+ </form>
+ </field>
+ </page>
+ <page string="Miscelleanous">
+ <group colspan="2" col="2">
+ <separator string="Personal Info" colspan="2"/>
+ <field name="pan_no" select="1"/>
+ <field name="bank_account"/>
+ <field name="place_of_birth"/>
+ <field name="children"/>
+ </group>
+ <group colspan="2" col="2">
+ <separator string="Job Info" colspan="2"/>
+ <field name="manager" select="1"/>
+ <field name="vehicle" select="1"/>
+ <field name="vehicle_distance" select="1"/>
+ <field name="medic_exam" select="1"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="ESI Information"/>
+ <field name="esi_account" string="Account"/>
+ <field name="hospital_id" string="Hospital"/>
+ <field name="medic_exam" select="1" string="Medical Examination"/>
+ <field name="esp_account" select="1"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Providend Fund"/>
+ <field name="pf_account" string="Account"/>
+ <field name="pg_joining" string="Join Date"/>
+ </group>
+ </page>
+ <page string="Salary Structure">
+ <field name="line_ids" nolabel="1" colspan="4" string="Salary Structure">
+ <tree string="Salary Structure" editable="bottom">
+ <field name="category_id" on_change="onchange_category(category_id)"/>
+ <field name="sequence"/>
+ <field name="name"/>
+ <field name="code"/>
+ <field name="type"/>
+ <field name="amount_type"/>
+ <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
+ <field name="account_id"/>
+ <field name="analytic_account_id"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Accounting">
+ <field name="property_bank_account"/>
+ <field name="salary_account"/>
+ <field name="employee_account"/>
+ <field name="analytic_account"/>
+ <field name="slip_ids" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ </field>
+ </record>
+
+ <record id="view_employee_passport_form" model="ir.ui.view">
+ <field name="name">hr.employee.passport.form</field>
+ <field name="model">hr.employee</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_employee_form"/>
+ <field name="arch" type="xml">
+ <field name="otherid" position="after">
+ <field name="passport_id"/>
+ </field>
+ </field>
+ </record>
+ <!-- End Employee View -->
+
+ <!-- Contract View -->
+ <record id="hr_contract.hr_contract_view_form" model="ir.ui.view">
+ <field name="name">hr.contract.view.form</field>
+ <field name="model">hr.contract</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Contract">
+ <group colspan="4" col="6">
+ <field name="name" select="1"/>
+ <field name="employee_id" select="1"/>
+ <field name="job_id"/>
+ <field name="wage"/>
+ <field name="wage_type_id" widget="selection"/>
+ <field name="type_id" widget="selection"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Main Data">
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Duration"/>
+ <field name="date_start" select="1"/>
+ <field name="date_end" select="1"/>
+ <field name="working_hours"/>
+ <field name="working_days_per_week" select="1"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Advantages"/>
+ <field name="struct_id" select="1"/>
+ <field name="advantages_net"/>
+ <field name="advantages_gross"/>
+ <field name="advantages" nolabel="1" colspan="2"/>
+ </group>
+ </page>
+ <page string="Work Permit">
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Passport"/>
+ <field name="passport_id"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Valid for"/>
+ <field name="visa_no"/>
+ <field name="permit_no"/>
+ <field name="visa_expire"/>
+ </group>
+ </page>
+ </notebook>
+ <separator colspan="4" string="Notes"/>
+ <field colspan="4" name="notes" nolabel="1"/>
+ </form>
+ </field>
+ </record>
+ <menuitem action="hr_contract.action_hr_contract" id="hr_menu_contract" parent="payroll_configure" name="Contracts" sequence="4"/>
+ <!-- End Contract View-->
+
+ <!-- Salary structure -->
+ <record id="view_hr_employee_grade_tree" model="ir.ui.view">
+ <field name="name">hr.payroll.structure.tree</field>
+ <field name="model">hr.payroll.structure</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Employee Function">
+ <field name="name"/>
+ <field name="code"/>
+ <field name="line_ids"/>
+ <field name="company_id"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_hr_employee_grade_form" model="ir.ui.view">
+ <field name="name">hr.payroll.structure.form</field>
+ <field name="model">hr.payroll.structure</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Employee Function">
+ <group col="6" colspan="4">
+ <field name="name" colspan="4" select="1"/>
+ <field name="code" select="1"/>
+ <field name="account_id" select="1"/>
+ <field name="company_id"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Salary Structure">
+ <field name="line_ids" nolabel="1" colspan="4"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+ <record id="action_view_hr_employee_grade_form" model="ir.actions.act_window">
+ <field name="name">Salary Structure</field>
+ <field name="res_model">hr.payroll.structure</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="view_hr_employee_grade_tree"/>
+ </record>
+ <menuitem
+ id="menu_hr_employee_function"
+ action="action_view_hr_employee_grade_form"
+ parent="payroll_configure"
+ />
+ <!-- End Salary structure -->
+
+ <!-- Holiday Status -->
+ <record model="ir.ui.view" id="view_holiday_status_form1">
+ <field name="name">hr.holidays.status.inherit</field>
+ <field name="model">hr.holidays.status</field>
+ <field name="inherit_id" ref="hr_holidays.edit_holiday_status_form"/>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <field name="color_name" position="after">
+ <group col="2" colspan="2">
+ <separator colspan="4" string="Payroll Accounting"/>
+ <field name="company_id" widget="selection" select="2"/>
+ <field name="code"/>
+ <field name="analytic_account_id"/>
+ <field name="account_id"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="4" string="Payroll Configurtion"/>
+ <field name="type"/>
+ <field name="head_id"/>
+ </group>
+ </field>
+ </field>
+ </record>
+ <!-- End Holiday Status -->
+
+ <!-- Payslip Line -->
+ <record id="view_hr_payslip_line_tree" model="ir.ui.view">
+ <field name="name">hr.payslip.line.tree</field>
+ <field name="model">hr.payslip.line</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Salary Structure" editable="bottom">
+ <field name="category_id" on_change="onchange_category(category_id)"/>
+ <field name="sequence"/>
+ <field name="name"/>
+ <field name="code"/>
+ <field name="type"/>
+ <field name="amount_type"/>
+ <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
+ <field name="account_id"/>
+ <field name="analytic_account_id"/>
+ </tree>
+ </field>
+ </record>
+ <record id="view_hr_payslip_line_form" model="ir.ui.view">
+ <field name="name">hr.payslip.line.form</field>
+ <field name="model">hr.payslip.line</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Payslip Line">
+ <group col="6" colspan="4">
+ <field name="name" colspan="4" select="1"/>
+ <field name="code" select="1"/>
+ <field name="slip_id" select="1"/>
+ <field name="employee_id"/>
+ <field name="function_id"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="4" string="Calculations"/>
+ <field name="category_id" on_change="onchange_category(category_id)"/>
+ <field name="type"/>
+ <field name="amount_type"/>
+ <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
+ <field name="sequence"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="4" string="Accounting Informations"/>
+ <field name="account_id"/>
+ <field name="analytic_account_id"/>
+ <separator colspan="4" string="Company contribution"/>
+ <field name="company_contrib"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Function">
+ <field name="line_ids" colspan="4" nolabel="1" attrs="{'readonly':[('amount_type','!=','func')]}">
+ <tree string="Function Arguments" editable="bottom">
+ <field name="name"/>
+ <field name="sequence"/>
+ <field name="from_val"/>
+ <field name="to_val"/>
+ <field name="amount_type"/>
+ <field name="value"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Description">
+ <separator colspan="4" string="Description"/>
+ <field name="note" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_hr_payslip_tree" model="ir.ui.view">
+ <field name="name">hr.payslip.tree</field>
+ <field name="model">hr.payslip</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Payslip">
+ <field name="number"/>
+ <field name="employee_id"/>
+ <field name="name"/>
+ <field name="date"/>
+ <field name="grows"/>
+ <field name="net"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_hr_payslip_form" model="ir.ui.view">
+ <field name="name">hr.payslip.form</field>
+ <field name="model">hr.payslip</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Payslip">
+ <group col="6" colspan="4">
+ <field name="employee_id"/>
+ <field name="name"/>
+ <field name="number" select="1"/>
+ <field name="journal_id"/>
+ <field name="bank_journal_id" domain="[('type','=','cash')]"/>
+ <field name="date"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Salary Detail">
+ <field name="line_ids" colspan="4" nolabel="1">
+ <tree string="Salary Structure" editable="bottom">
+ <field name="category_id" on_change="onchange_category(category_id)"/>
+ <field name="sequence"/>
+ <field name="name"/>
+ <field name="code"/>
+ <field name="type"/>
+ <field name="amount_type"/>
+ <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
+ <field name="total"/>
+ <field name="account_id"/>
+ <field name="analytic_account_id"/>
+ </tree>
+ </field>
+
+ <group col="6" colspan="4">
+ <separator string="Computation Overview" colspan="6"/>
+ <field name="working_days"/>
+ <field name="holiday_days"/>
+ <field name="worked_days"/>
+
+ <field name="basic_before_leaves"/>
+ <field name="leaves"/>
+ <field name="basic"/>
+
+ <field name="allounce"/>
+ <field name="deduction"/>
+ <field name="other_pay"/>
+
+ <field name="grows"/>
+ <field name="net"/>
+ <field name="total_pay"/>
+ </group>
+ </page>
+ <page string="Accounting Details">
+ <group col="2" colspan="3">
+ <separator colspan="4" string="Accounting Informations"/>
+ <field name="move_ids" colspan="2" nolabel="1" readonly="1">
+ <tree string="Accounting Vouchers">
+ <field name="sequence"/>
+ <field name="name"/>
+ <field name="move_id"/>
+ </tree>
+ <form string="Accounting Vouchers">
+ <field name="sequence"/>
+ <field name="name"/>
+ <field name="move_id"/>
+ </form>
+ </field>
+ </group>
+ <group col="2" colspan="1">
+ <separator colspan="4" string="Other Informations"/>
+ <field name="paid" readonly="1"/>
+ <field name="company_id"/>
+ <field name="register_id"/>
+ <field name="deg_id"/>
+ <field name="contract_id" domain="[('employee_id','=',employee_id)]"/>
+ </group>
+ <separator colspan="4" string="Description"/>
+ <field name="note" colspan="4" nolabel="1"/>
+ </page>
+ <page string="Account Lines">
+ <field name="move_line_ids" colspan="4" nolabel="1"/>
+ </page>
+ <page string="Payment Lines">
+ <field name="move_payment_ids" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ <group col="9" colspan="4">
+ <field name="state"/>
+ <button string="Compute Sheet" name="compute_sheet" states="new"/>
+ <button string="Recompute Sheet" name="compute_sheet" type="object" states="draft"/>
+ <button string="Verify Sheet" name="verify_sheet" states="draft"/>
+ <button string="Complete HR Checking" name="verify_twice_sheet" states="hr_check"/>
+ <button string="Complete Accountant Checking" name="final_verify_sheet" states="accont_check"/>
+ <button string="Pay Salary" name="process_sheet" states="confirm"/>
+ <button string="Cancel" name="cancel_sheet" states="draft,hr_check,accont_check,confirm"/>
+ <button string="Set to Draft" name="set_to_draft" states="cancel"/>
+ </group>
+ </form>
+ </field>
+ </record>
+ <record id="action_view_hr_payslip_form" model="ir.actions.act_window">
+ <field name="name">Employee Payslip</field>
+ <field name="res_model">hr.payslip</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="view_hr_payslip_tree"/>
+ </record>
+ <menuitem action="action_view_hr_payslip_form" id="menu_department_tree" parent="menu_hr_root_payroll"/>
+
+
+
+ <!-- Payment Heads -->
+ <record id="hr_allounce_deduction_categoty_form" model="ir.ui.view">
+ <field name="name">hr.allounce.deduction.categoty.form</field>
+ <field name="model">hr.allounce.deduction.categoty</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Salary Heads">
+ <group col="6" colspan="6">
+ <field name="name" select="1"/>
+ <field name="code" select="1"/>
+ <field name="type" select="1"/>
+ <group col="2" colspan="4">
+ <separator colspan="4" string="Dynamic Computation"/>
+ <field name="base"/>
+ <field name="condition"/>
+ <field name="sequence"/>
+ </group>
+ </group>
+ <notebook colspan="4">
+ <page string="Description">
+ <field name="note" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+ <record id="hr_allounce_deduction_categoty_tree" model="ir.ui.view">
+ <field name="name">hr.allounce.deduction.categoty.tree</field>
+ <field name="model">hr.allounce.deduction.categoty</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Salary Heads">
+ <field name="name"/>
+ <field name="code"/>
+ <field name="type"/>
+ <field name="base"/>
+ <field name="condition"/>
+ <field name="sequence"/>
+ </tree>
+ </field>
+ </record>
+ <record id="hr_allounce_deduction_tree" model="ir.actions.act_window">
+ <field name="name">Salary Heads</field>
+ <field name="res_model">hr.allounce.deduction.categoty</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="hr_allounce_deduction_categoty_tree"/>
+ </record>
+ <menuitem
+ id="menu_hr_allounce_deduction_tree"
+ action="hr_allounce_deduction_tree"
+ parent="payroll_configure"
+ />
+ <!-- End Payment Heads -->
+
+ <!-- Company Contribution -->
+ <record id="hr_company_contribution_form" model="ir.ui.view">
+ <field name="name">company.contribution.form</field>
+ <field name="model">company.contribution</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Company Contribution">
+ <group col="6" colspan="6">
+ <field name="name" select="1"/>
+ <field name="code" select="1"/>
+ <field name="category_id"/>
+ <field name="company_id" select="1"/>
+ <field name="active" select="1"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Contributions"/>
+ <field name="amount_type" attrs="{'required': [('contribute','=',True)]}"/>
+ <field name="contribute_per" attrs="{'required': [('contribute','=',True)], 'readonly':[(('amount_type','=','func'))]}"/>
+ <field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Accounts"/>
+ <field name="include_in_salary" />
+ <field name="account_id" attrs="{'required': [('include_in_salary','=',True)]}"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">
+ <field name="line_ids" colspan="4" nolabel="1">
+ <tree string="Function Arguments" editable="bottom">
+ <field name="name"/>
+ <field name="sequence"/>
+ <field name="from_val"/>
+ <field name="to_val"/>
+ <field name="amount_type"/>
+ <field name="value"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Description">
+ <field name="note" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+ <record id="hr_company_contribution_tree" model="ir.ui.view">
+ <field name="name">company.contribution.tree</field>
+ <field name="model">company.contribution</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Company Contribution">
+ <field name="name"/>
+ <field name="code"/>
+ <field name="contribute_per"/>
+ <field name="amount_type"/>
+ <field name="register_id"/>
+ </tree>
+ </field>
+ </record>
+ <record id="action_hr_company_contribution_tree" model="ir.actions.act_window">
+ <field name="name">Company Contributions</field>
+ <field name="res_model">company.contribution</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="hr_company_contribution_tree"/>
+ </record>
+ <menuitem
+ id="menu_hr_company_contribution_tree"
+ action="action_hr_company_contribution_tree"
+ parent="payroll_configure"
+ />
+ <!-- End Company Contribution -->
+
+ <!-- Contract Form-->
+<!-- <record id="hr_contract.hr_contract_view_form" model="ir.ui.view">-->
+<!-- <field name="name">hr.contract.view.form</field>-->
+<!-- <field name="model">hr.contract</field>-->
+<!-- <field name="type">form</field>-->
+<!-- <field name="arch" type="xml">-->
+<!-- <form string="Contract">-->
+<!-- <field name="employee_id"/>-->
+<!-- <separator colspan="4" string="General Information"/>-->
+<!-- <field colspan="4" name="name" select="1"/>-->
+<!-- <newline/>-->
+<!-- <separator colspan="4" string="Contract Duration"/>-->
+<!-- <field name="function"/>-->
+<!-- <field name="working_hours_per_day"/>-->
+<!-- <field name="working_days_per_week"/>-->
+<!-- <field name="date_start" select="1"/>-->
+<!-- <field name="date_end" select="1"/>-->
+<!-- -->
+<!-- <separator colspan="4" string="Salary"/>-->
+<!-- <field name="wage_type_id"/>-->
+<!-- <field name="wage"/>-->
+<!-- -->
+<!-- <separator colspan="4" string="Notes"/>-->
+<!-- <field colspan="4" name="notes" nolabel="1"/>-->
+<!-- -->
+<!-- <separator colspan="4" string="Passport and Visa"/>-->
+<!-- <field name="permit_no"/>-->
+<!-- <field name="passport_id"/>-->
+<!-- <field name="visa_no"/>-->
+<!-- <field name="visa_expire"/>-->
+<!-- </form>-->
+<!-- </field>-->
+<!-- </record>-->
+<!-- <record id="action_hr_contract" model="ir.actions.act_window">-->
+<!-- <field name="name">Employee Contract</field>-->
+<!-- <field name="res_model">hr.contract</field>-->
+<!-- <field name="view_type">form</field>-->
+<!-- <field name="view_mode">form,tree</field>-->
+<!-- </record>-->
+<!-- <menuitem -->
+<!-- action="action_hr_contract" -->
+<!-- name="Employee Contract" -->
+<!-- id="hr_menu_contract" -->
+<!-- parent="payroll_configure"-->
+<!-- />-->
+
+ <record id="view_hr_bank_advice_tree" model="ir.ui.view">
+ <field name="name">hr.payroll.advice.tree</field>
+ <field name="model">hr.payroll.advice</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Bank Advice">
+ <field name="name" select="1"/>
+ <field name="date" select="1"/>
+ <field name="number" select="1"/>
+ <field name="company_id"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_hr_bank_advice_form" model="ir.ui.view">
+ <field name="name">hr.payroll.advice.form</field>
+ <field name="model">hr.payroll.advice</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Bank Advice">
+ <group col="6" colspan="4">
+ <field name="name" colspan="4" select="1"/>
+ <field name="account_id" select="1"/>
+ <newline/>
+ <field name="date" select="1"/>
+ <field name="number" select="1"/>
+ <field name="register_id"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Paymeny Lines">
+ <field name="line_ids" colspan="4" nolabel="1">
+ <tree string="Payment Lines" editable="bottom">
+ <field name="employee_id" on_change="onchange_employee_id(parent.date, employee_id)"/>
+ <field name="name"/>
+ <field name="amount"/>
+ <field name="bysal"/>
+ <field name="flag"/>
+ </tree>
+ </field>
+ <field name="company_id"/>
+ <field name="chaque_nos"/>
+ </page>
+ <page string="Letter Content">
+ <separator colspan="4" string="Letter Details"/>
+ <field name="note" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ <group col="6" colspan="6">
+ <field name="state"/>
+ <button name="confirm_sheet" string="Confirm Sheet" states="draft" type="object"/>
+ <button name="set_to_draft" string="Set to Draft" states="cancel,confirm" type="object"/>
+ <button name="cancel_sheet" string="Cancel Sheet" states="draft" type="object"/>
+ </group>
+ </form>
+ </field>
+ </record>
+ <record id="action_view_hr_bank_advice_tree" model="ir.actions.act_window">
+ <field name="name">Payment Advice</field>
+ <field name="res_model">hr.payroll.advice</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_hr_bank_advice_tree"/>
+ </record>
+ <menuitem
+ action="action_view_hr_bank_advice_tree"
+ id="hr_menu_payment_advice"
+ parent="menu_hr_root_payroll"
+ />
+
+ <record id="view_hr_payroll_register_tree" model="ir.ui.view">
+ <field name="name">hr.payroll.register.tree</field>
+ <field name="model">hr.payroll.register</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Payroll Register">
+ <field name="number"/>
+ <field name="name"/>
+ <field name="date"/>
+ <field name="journal_id"/>
+ <field name="bank_journal_id"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </record>
+ <record id="view_hr_payroll_register_form" model="ir.ui.view">
+ <field name="name">hr.payroll.register.form</field>
+ <field name="model">hr.payroll.register</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Payroll Register">
+ <group col="6" colspan="4">
+ <field name="name" select="1"/>
+ <field name="date" select="1"/>
+ <field name="number" select="1"/>
+ <field name="journal_id"/>
+ <field name="bank_journal_id"/>
+ <field name="active"/>
+ </group>
+ <notebook colspan="4">
+ <page string="Payslips">
+ <field name="line_ids" colspan="4" nolabel="1">
+ <tree string="Payslip">
+ <field name="number"/>
+ <field name="employee_id"/>
+ <field name="name"/>
+ <field name="date"/>
+ <field name="basic"/>
+ <field name="allounce"/>
+ <field name="grows"/>
+ <field name="deduction"/>
+ <field name="net"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ <group col="2" colspan="2">
+ <separator colspan="4" string="Allowance / Deduction"/>
+ <field name="allounce"/>
+ <field name="deduction"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="4" string="Salary Information"/>
+ <field name="grows"/>
+ <field name="net"/>
+ </group>
+ </page>
+ </notebook>
+ <group col="8" colspan="4">
+ <field name="state"/>
+ <button string="Compute" name="compute_sheet" states="new" type="object"/>
+ <button string="Verify Sheet" name="verify_sheet" states="draft" type="object"/>
+ <button string="Complete HR Checking" name="verify_twice_sheet" type="object" states="hr_check"/>
+ <button string="Complete Accountant Checking" name="final_verify_sheet" states="accont_check" type="object"/>
+ <button string="Pay Salary" name="process_sheet" states="confirm" type="object"/>
+ <button string="Cancel" name="cancel_sheet" states="draft,hr_check,accont_check,confirm" type="object"/>
+ <button string="Set to Draft" name="set_to_draft" states="cancel" type="object"/>
+ </group>
+ </form>
+ </field>
+ </record>
+ <record id="action_view_hr_payroll_register_form" model="ir.actions.act_window">
+ <field name="name">Payroll Register</field>
+ <field name="res_model">hr.payroll.register</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+ <menuitem
+ action="action_view_hr_payroll_register_form"
+ id="hr_menu_payroll_register"
+ parent="menu_hr_root_payroll"
+ />
+
+ <!--
+ Contribution Register
+ -->
+ <record id="hr_contibution_register_tree" model="ir.ui.view">
+ <field name="name">hr.contibution.register.tree</field>
+ <field name="model">hr.contibution.register</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Contribution Registers">
+ <field name="name" select="1"/>
+ <field name="company_id" select="1"/>
+ <field name="monthly_total_by_emp"/>
+ <field name="monthly_total_by_comp"/>
+ <field name="yearly_total_by_emp"/>
+ <field name="yearly_total_by_comp"/>
+ </tree>
+ </field>
+ </record>
+ <record id="hr_contibution_register_form" model="ir.ui.view">
+ <field name="name">hr.contibution.register.form</field>
+ <field name="model">hr.contibution.register</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Contribution">
+ <field name="name" select="1"/>
+ <field name="account_id"/>
+ <field name="analytic_account_id"/>
+ <field name="company_id" select="1"/>
+ <notebook colspan="4">
+ <page string="Contribution Lines">
+ <field colspan="4" name="register_line_ids" nolabel="1" select="1">
+ <tree string="Register Lines" editable="top">
+ <field name="code"/>
+ <field name="employee_id"/>
+ <field name="period_id"/>
+ <field name="emp_deduction"/>
+ <field name="comp_deduction"/>
+ <field name="total"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Description">
+ <separator colspan="4" string="Description"/>
+ <field name="note" colspan="4" nolabel="1"/>
+ </page>
+ </notebook>
+ <group col="2" colspan="2">
+ <separator colspan="4" string="Year"/>
+ <field name="yearly_total_by_emp"/>
+ <field name="yearly_total_by_comp"/>
+ </group>
+ <group col="2" colspan="2">
+ <separator colspan="2" string="Month"/>
+ <field name="monthly_total_by_emp"/>
+ <field name="monthly_total_by_comp"/>
+ </group>
+ </form>
+ </field>
+ </record>
+ <record id="action_contibution_register_form" model="ir.actions.act_window">
+ <field name="name">Contibution Register</field>
+ <field name="res_model">hr.contibution.register</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="hr_contibution_register_tree"/>
+ </record>
+ <menuitem
+ id="menu_action_hr_contibution_register_form"
+ action="action_contibution_register_form"
+ parent="payroll_configure"
+ />
+ <record id="hr_contibution_register_line_form" model="ir.ui.view">
+ <field name="name">hr.contibution.register.line.form</field>
+ <field name="model">hr.contibution.register.line</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Contribution">
+ <field name="name"/>
+ <field name="code"/>
+ <field name="employee_id"/>
+ <field name="period_id"/>
+ <field name="emp_deduction"/>
+ <field name="comp_deduction"/>
+ <field name="total"/>
+ </form>
+ </field>
+ </record>
+
+ <record id="hr_payslip_line_condition_tree" model="ir.ui.view">
+ <field name="name">hr.payslip.line.condition.tree</field>
+ <field name="model">hr.payslip.line.condition</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <form string="Condition">
+ <field name="name"/>
+ <field name="date_start"/>
+ <field name="date_end"/>
+ <field name="state"/>
+ </form>
+ </field>
+ </record>
+ </data>
+</openerp>
+
diff --git a/addons/hr_payroll/hr_payroll_wizard.xml b/addons/hr_payroll/hr_payroll_wizard.xml
new file mode 100644
index 00000000000..acc1646a8b5
--- /dev/null
+++ b/addons/hr_payroll/hr_payroll_wizard.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" ?>
+<openerp>
+ <data>
+ <menuitem id="menu_hr_payroll_reporting" parent="hr.menu_hr_reporting" name="Payroll"/>
+ <wizard id="wizard_print_year_salary"
+ menu="False"
+ model="hr.payslip"
+ name="wizard.year.salary"
+ string="Year Salary Detail"/>
+ <menuitem id="menu_wizard_print_year_salary"
+ icon="STOCK_PRINT"
+ action="wizard_print_year_salary"
+ parent="menu_hr_payroll_reporting"
+ name="Employee Year Salary"
+ type="wizard"/>
+
+ <wizard id="wizard_print_employees_detail"
+ menu="False"
+ model="hr.payslip"
+ name="wizard.employees.detail"
+ string="Employees Salary Detail"/>
+ <menuitem id="menu_wizard_print_employees_detail"
+ icon="STOCK_PRINT"
+ action="wizard_print_employees_detail"
+ parent="menu_hr_payroll_reporting"
+ name="Employees Salary Detail"
+ type="wizard"/>
+
+ <wizard id="wizard_payroll_analysis"
+ menu="False"
+ model="account.analytic.account"
+ name="payroll.analysis"
+ string="Create Analytic Structure"/>
+ <menuitem id="menu_wizard_payroll_analysis"
+ action="wizard_payroll_analysis"
+ parent="payroll_configure"
+ name="Create Analytic Structure"
+ type="wizard"/>
+ </data>
+</openerp>
diff --git a/addons/hr_payroll/hr_payroll_workflow.xml b/addons/hr_payroll/hr_payroll_workflow.xml
new file mode 100644
index 00000000000..0e5ccfe091f
--- /dev/null
+++ b/addons/hr_payroll/hr_payroll_workflow.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="wkf" model="workflow">
+ <field name="name">hr.payslip.basic</field>
+ <field name="osv">hr.payslip</field>
+ <field name="on_create">True</field>
+ </record>
+
+ <record id="act_new" model="workflow.activity">
+ <field name="wkf_id" ref="wkf"/>
+ <field name="flow_start">True</field>
+ <field name="name">new</field>
+ </record>
+
+ <record id="act_draft" model="workflow.activity">
+ <field name="wkf_id" ref="wkf"/>
+ <field name="name">draft</field>
+ <field name="action">compute_sheet()</field>
+ <field name="split_mode">OR</field>
+ <field name="kind">function</field>
+ </record>
+
+ <record id="act_hr_check" model="workflow.activity">
+ <field name="wkf_id" ref="wkf"/>
+ <field name="name">hr_check</field>
+ <field name="action">hr_check_sheet()</field>
+ <field name="kind">function</field>
+ </record>
+
+ <record id="act_account_check" model="workflow.activity">
+ <field name="wkf_id" ref="wkf"/>
+ <field name="name">account_check</field>
+ <field name="action">account_check_sheet()</field>
+ <field name="kind">function</field>
+ </record>
+
+ <record id="act_confirm" model="workflow.activity">
+ <field name="wkf_id" ref="wkf"/>
+ <field name="name">confirm</field>
+ <field name="action">verify_sheet()</field>
+ <field name="kind">function</field>
+ </record>
+
+ <record id="act_cancel" model="workflow.activity">
+ <field name="wkf_id" ref="wkf"/>
+ <field name="name">cancel</field>
+ <field name="action">cancel_sheet()</field>
+ <field name="kind">function</field>
+ </record>
+
+ <record id="act_done" model="workflow.activity">
+ <field name="wkf_id" ref="wkf"/>
+ <field name="name">done</field>
+ <field name="action">process_sheet()</field>
+ <field name="kind">function</field>
+ <field name="flow_stop">True</field>
+ </record>
+
+ <record id="t1" model="workflow.transition">
+ <field name="act_from" ref="act_new"/>
+ <field name="act_to" ref="act_draft"/>
+ <field name="signal">compute_sheet</field>
+ </record>
+
+ <record id="t2" model="workflow.transition">
+ <field name="act_from" ref="act_draft"/>
+ <field name="act_to" ref="act_hr_check"/>
+ <field name="condition">basic&gt;=10000</field>
+ <field name="signal">verify_sheet</field>
+ </record>
+
+ <record id="t3" model="workflow.transition">
+ <field name="act_from" ref="act_hr_check"/>
+ <field name="act_to" ref="act_account_check"/>
+ <field name="signal">verify_twice_sheet</field>
+ </record>
+
+ <record id="t4" model="workflow.transition">
+ <field name="act_from" ref="act_draft"/>
+ <field name="act_to" ref="act_account_check"/>
+ <field name="condition">basic&lt;10000</field>
+ <field name="signal">verify_sheet</field>
+ </record>
+
+ <record id="t5" model="workflow.transition">
+ <field name="act_from" ref="act_account_check"/>
+ <field name="act_to" ref="act_confirm"/>
+ <field name="signal">final_verify_sheet</field>
+ </record>
+
+ <record id="t6" model="workflow.transition">
+ <field name="act_from" ref="act_confirm"/>
+ <field name="act_to" ref="act_done"/>
+ <field name="signal">process_sheet</field>
+ </record>
+
+ <record id="t7" model="workflow.transition">
+ <field name="act_from" ref="act_draft"/>
+ <field name="act_to" ref="act_cancel"/>
+ <field name="signal">cancel_sheet</field>
+ </record>
+
+ <record id="t8" model="workflow.transition">
+ <field name="act_from" ref="act_hr_check"/>
+ <field name="act_to" ref="act_cancel"/>
+ <field name="signal">cancel_sheet</field>
+ </record>
+
+ <record id="t9" model="workflow.transition">
+ <field name="act_from" ref="act_account_check"/>
+ <field name="act_to" ref="act_cancel"/>
+ <field name="signal">cancel_sheet</field>
+ </record>
+
+ <record id="t10" model="workflow.transition">
+ <field name="act_from" ref="act_confirm"/>
+ <field name="act_to" ref="act_cancel"/>
+ <field name="signal">cancel_sheet</field>
+ </record>
+
+ <record id="t11" model="workflow.transition">
+ <field name="act_from" ref="act_done"/>
+ <field name="act_to" ref="act_cancel"/>
+ <field name="signal">cancel_sheet</field>
+ </record>
+
+ <record id="t12" model="workflow.transition">
+ <field name="act_from" ref="act_cancel"/>
+ <field name="act_to" ref="act_draft"/>
+ <field name="signal">set_to_draft</field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/hr_payroll/i18n/fr_BE.po b/addons/hr_payroll/i18n/fr_BE.po
new file mode 100644
index 00000000000..a4466114f51
--- /dev/null
+++ b/addons/hr_payroll/i18n/fr_BE.po
@@ -0,0 +1,1435 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * hr_payroll
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-25 13:16:10+0000\n"
+"PO-Revision-Date: 2009-11-25 13:16:10+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "E-mail Address"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.holidays.status:0
+msgid "(Based on type Payroll will calculate basic salary)"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,net:0
+#: field:hr.payslip,net:0
+msgid "Net Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,working_days:0
+msgid "Working Days"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "New Slip"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Axis Bank"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,esp_account:0
+msgid "EPS Account"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,analytic_account:0
+msgid "Analytic Account for Salary Analysis"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Allowances with Basic:"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "Department"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Deductions:"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,gratuity:0
+msgid "Use for Gratuity ?"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Employee No"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Salary Payment Register"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,paid:0
+msgid "Paid ? "
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.year_salary_report
+msgid "Year Salary Report"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Paid Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,flag:0
+msgid "D/C"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,company_id:0
+#: field:hr.payslip,company_id:0
+#: wizard_field:payroll.analysis,init,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,employee_account:0
+msgid "Employee Payable Account"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Letter Details"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid ","
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Set to Draft"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "The Manager"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.holidays.status,type:0
+msgid "Half-Pay Holiday"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,type:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,other_pay:0
+msgid "Others"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,slip_id:0
+#: model:ir.model,name:hr_payroll.model_hr_payslip
+#: rml:payslip.pdf:0
+msgid "Pay Slip"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Calculations Rules"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.module.module,description:hr_payroll.module_meta_information
+msgid "\n"
+" The Payroll system - India, Manages and depends on,\n"
+" * HR Details\n"
+" * HR Contracts\n"
+" * HR Payslip\n"
+" * HR Paysheet\n"
+" * HR Attendance\n"
+" * HR Holidays\n"
+" "
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+#: rml:salary.structure:0
+msgid "Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.holidays.status,account_id:0
+msgid "Account"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Payment From"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Miscelleanous / Statutory"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Leaves"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,register_id:0
+msgid "Register"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:wizard.year.salary,init,salary_on:0
+msgid "Next Month Date"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.payroll.register,period_id:0
+#: help:hr.payslip,period_id:0
+msgid "Keep empty to use the period of the validation(Payslip) date."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,value:0
+msgid "Value"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Name of the Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,permit_no:0
+msgid "Work Permit No"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,amount:0
+#: rml:payroll.advice:0
+msgid "Amount"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,line_ids:0
+#: view:hr.payslip.line:0
+#: model:ir.model,name:hr_payroll.model_hr_payslip_line
+msgid "Payslip Line"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,country_id:0
+msgid "Country of Issue"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Warning !"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Please Confirm all Expanse Invoice appear for Reimbursement"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Other Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.holidays.status,type:0
+msgid "Paid Holiday"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Employees Salary Details"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,date_expire:0
+msgid "Passport Expire Date"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Special Allowance and Deductions for Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.holidays.status,type:0
+msgid "Un-Paid Holiday"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,period_id:0
+#: field:hr.payslip,period_id:0
+msgid "Force Period"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Amount (in words) :"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.holidays.status,type:0
+msgid "Payment"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,analytic_account:0
+#: field:hr.employee.grade,account_id:0
+#: field:hr.holidays.status,analytic_account_id:0
+#: field:hr.payslip.line,analytic_account_id:0
+#: rml:salary.structure:0
+msgid "Analytic Account"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Expanse To"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,base:0
+msgid "Based on"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "Bank"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,move_id:0
+msgid "Expanse Entries"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.module.module,shortdesc:hr_payroll.module_meta_information
+msgid "Human Resource Payroll"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:account.analytic.account:0
+msgid "Error! You can not create recursive analytic accounts."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,esi_account:0
+msgid "ESI Account"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_passport
+msgid "Passport Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Please defined the Employee Home Address Along with Partners !!"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,total:0
+msgid "Sub Total"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,visa_no:0
+msgid "Visa No"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,from:0
+msgid "From"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,bysal:0
+msgid "By Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.menu_wizard_print_year_salary
+msgid "Employee Year Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.salary_payslip
+msgid "Employee PaySlip"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+#: rml:payroll.advice:0
+msgid "Authorised Signature"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,umo_id:0
+msgid "Unite"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Salary Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Notes:"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "End Date"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Accounting Information"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "Amount Information"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,passport_id:0
+#: field:hr.employee,passport_id:0
+#: view:hr.passport:0
+msgid "Passport"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,employee_id:0
+#: field:hr.payroll.advice.line,employee_id:0
+#: field:hr.payslip,employee_id:0
+#: field:hr.payslip.line,employee_id:0
+msgid "Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Start Date"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_payroll_advice_line
+msgid "Bank Advice Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,type:0
+#: field:hr.payslip.line,type:0
+#: wizard_field:payroll.analysis,init,type:0
+#: rml:salary.structure:0
+msgid "Type"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "#"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Miscelleanous"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Integrity Error !"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Verify Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,pan_no:0
+msgid "PAN No"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_button:wizard.employees.detail,init,report:0
+#: wizard_button:wizard.year.salary,init,report:0
+msgid "Print"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Accounting Informations"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Contributions Configuration"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,grows:0
+#: field:hr.payslip,grows:0
+msgid "Gross Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Total Earnings"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Other Payment"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,basic:0
+msgid "Basic Salary - Leaves"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "C/D"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:payroll.analysis,init,type:0
+msgid "By Employee Function"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,line_ids:0
+msgid "Employee Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,chaque_nos:0
+msgid "Chaque Nos"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.wizard,name:hr_payroll.wizard_print_year_salary
+msgid "Year Salary Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty.line,amount_type:0
+#: selection:hr.payslip.line,amount_type:0
+msgid "Fixed Amount"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Wating for Verification"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Account Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Pay Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Gross SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Please defined the Partner in Home Address !!"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+#: rml:payslip.pdf:0
+msgid "For the month of"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Payslip"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,type:0
+#: field:hr.payroll.register,deduction:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,deduction:0
+#: selection:hr.payslip.line,type:0
+msgid "Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_payroll_advice
+msgid "Bank Advice Note"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.passport:0
+msgid "Passport List"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,payment_id:0
+msgid "Payment Entries"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "YTD"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,expanse_id:0
+msgid "Expense"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,based_on:0
+msgid "Fided Value"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Loan Installment"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Complete HR Checking"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Yours Sincerely"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Allowances"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "SI. No."
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Net Amount"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,based_on:0
+#: field:hr.payroll.advice,state:0
+#: field:hr.payroll.register,state:0
+#: field:hr.payslip,state:0
+msgid "State"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Salary Structure:"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.year_employees_detail
+#: model:ir.actions.wizard,name:hr_payroll.wizard_print_employees_detail
+#: model:ir.ui.menu,name:hr_payroll.menu_wizard_print_employees_detail
+msgid "Employees Salary Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_employee_grade
+msgid "Function of the Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: selection:hr.payroll.advice,state:0
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Confirm Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Wating for Account Verification"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Others:"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+#: field:hr.passport,contracts_ids:0
+msgid "Contracts"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Passport and Visa"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Employee Code"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,amount_type:0
+#: field:hr.payslip.line,amount_type:0
+#: rml:salary.structure:0
+msgid "Amount Type"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,category_id:0
+#: field:hr.payslip.line,category_id:0
+#: rml:salary.structure:0
+msgid "Category"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,move_line_ids:0
+msgid "Accounting Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,bank_journal_id:0
+#: field:hr.payslip,bank_journal_id:0
+msgid "Bank Journal"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Total SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,hospital_id:0
+msgid "ESI Hospital"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,slip_ids:0
+#: view:hr.payroll.register:0
+#: field:hr.payroll.register,line_ids:0
+msgid "Payslips"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Earnings"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.advice,state:0
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Reject"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_hr_passport_tree
+#: model:ir.ui.menu,name:hr_payroll.menu_action_hr_passport_tree
+msgid "All Passports"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:hr.payroll.register.sheet:0
+#: rml:payslip.pdf:0
+msgid "Employee Name"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,salary_account:0
+msgid "Salary Account"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty.line,amount_type:0
+#: selection:hr.payslip.line,amount_type:0
+msgid "Percentage (%)"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,register_id:0
+#: view:hr.payroll.register:0
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payroll_register_form
+#: model:ir.model,name:hr_payroll.model_hr_payroll_register
+#: model:ir.ui.menu,name:hr_payroll.hr_menu_payroll_register
+msgid "Payroll Register"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:hr.payroll.register.sheet:0
+#: rml:payroll.advice:0
+#: rml:salary.structure:0
+#: rml:year.salary:0
+msgid "For"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,journal_id:0
+#: field:hr.payslip,journal_id:0
+msgid "Expanse Journal"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_hr_contract
+#: model:ir.ui.menu,name:hr_payroll.hr_menu_contract
+msgid "Employee Contract"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,contribute:0
+msgid "Contribe by Company ?"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "Employee Function"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,working_days_per_week:0
+msgid "Working Days / Week"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,worked_days:0
+msgid "Worked Day"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Complete Accountant Checking"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Title"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,based_on:0
+msgid "On Attendance"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_employee_grade_form
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_allounce_deduction_tree
+msgid "Allowance/Deduction Heads"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Compute Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,active:0
+msgid "Active"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,employee_account:0
+msgid "Employee Account"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:year.salary:0
+msgid "Yearly Salary Details"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,condition:0
+msgid "Condition"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Wating for HR Verification"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,pf_account:0
+msgid "PF Account"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+msgid "Compute"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: view:hr.payslip:0
+#: field:hr.payslip,move_payment_ids:0
+msgid "Payment Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: field:hr.payslip,deg_id:0
+#: rml:payslip.pdf:0
+#: rml:salary.structure:0
+msgid "Designation"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "HR Manager"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,based_on:0
+#: field:hr.payslip,basic_before_leaves:0
+#: rml:payslip.pdf:0
+msgid "Basic Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,code:0
+msgid "Categoty Code"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+msgid "Salary Information"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_allounce_deduction_categoty
+#: model:ir.model,name:hr_payroll.model_hr_allounce_deduction_categoty_line
+msgid "Allowance Deduction Categoty"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Authorized Signature"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Allowance / Deduction Category"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.advice,state:0
+msgid "Draft Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,date:0
+#: field:hr.payroll.register,date:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,date:0
+msgid "Date"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Basic SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,visa_expire:0
+msgid "Visa Expire Date"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "Phone No."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,include_in_salary:0
+msgid "Included in Salary ?"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.expense.expense,category_id:0
+#: field:hr.holidays.status,head_id:0
+msgid "Payroll Head"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: field:hr.payroll.advice.line,advice_id:0
+msgid "Bank Advice"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,account_id:0
+#: rml:salary.structure:0
+msgid "General Account"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.holidays.status,code:0
+#: field:hr.payslip.line,code:0
+#: rml:salary.structure:0
+msgid "Code"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_bank_advice_tree
+#: model:ir.ui.menu,name:hr_payroll.hr_menu_payment_advice
+#: rml:payroll.advice:0
+msgid "Payment Advice"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,to:0
+msgid "To"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_button:payroll.analysis,init,process:0
+msgid "Process"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Loan"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_field:wizard.year.salary,init,salary_on:0
+msgid "Salary On"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,number:0
+#: field:hr.payroll.register,number:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,number:0
+msgid "Number"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Contract Detail:"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "General Information"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Paymeny Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+#: field:hr.employee,line_ids:0
+#: view:hr.employee.grade:0
+#: field:hr.employee.grade,line_ids:0
+#: rml:salary.structure:0
+msgid "Salary Structure"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+#: wizard_button:payroll.analysis,init,end:0
+#: wizard_button:wizard.employees.detail,init,end:0
+#: wizard_button:wizard.year.salary,init,end:0
+msgid "Cancel"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,amount:0
+#: rml:salary.structure:0
+msgid "Amount / Percentage"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Accounting Details"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:wizard.year.salary,init,salary_on:0
+msgid "Current Month Date"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Contract Duration"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_view:payroll.analysis,init:0
+msgid "Process Form"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,name:0
+msgid "Passport No"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "Account Information"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Generalities"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "for period"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+msgid "Allowance / Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "E-mail"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.year_payroll_register
+msgid "Print Statement"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+#: field:hr.allounce.deduction.categoty,line_ids:0
+msgid "Calculations"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_view:wizard.year.salary,init:0
+msgid "Salary Deposit Date Option?"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Other Informations"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Dynamic Computation"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee.grade,function_id:0
+#: field:hr.payslip.line,function_id:0
+msgid "Function"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Dear Sir/Madam,"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "PAN No."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,note:0
+msgid "Description"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,pg_joining:0
+msgid "PF Join Date"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_payroll_reporting
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_root_payroll
+msgid "Payroll"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_view:wizard.employees.detail,init:0
+#: wizard_view:wizard.year.salary,init:0
+msgid "Year Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,name:0
+msgid "Categoty Name"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.wizard,name:hr_payroll.wizard_payroll_analysis
+#: model:ir.ui.menu,name:hr_payroll.menu_wizard_payroll_analysis
+msgid "Create Analytic Structure"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:payslip.pdf:0
+#: rml:salary.structure:0
+msgid "Address"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,property_bank_account:0
+msgid "Select Bank Account from where Salary Expanse will be Paid"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,salary_account:0
+msgid "Expanse account when Salary Expanse will be recorded"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Notes"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.payroll_configure
+msgid "Configure Payroll"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Cancel Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Advance"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Special Allowances and Deductions For Employee:"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,name:0
+#: field:hr.payroll.advice,name:0
+#: field:hr.payroll.register,name:0
+#: field:hr.payslip,name:0
+#: field:hr.payslip.line,name:0
+#: rml:salary.structure:0
+#: rml:year.salary:0
+msgid "Name"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,leaves:0
+msgid "Leaved Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Statutory Information"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_employee_function
+msgid "Employee Functions"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_field:wizard.employees.detail,init,employee_ids:0
+#: wizard_field:wizard.year.salary,init,employee_ids:0
+msgid "Employees"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,property_bank_account:0
+#: rml:payroll.advice:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,name:0
+msgid "Bank Account A/C"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_field:wizard.employees.detail,init,fiscalyear_id:0
+#: wizard_field:wizard.year.salary,init,fiscalyear_id:0
+msgid "Fiscal Year"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Contract"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:payroll.analysis,init,type:0
+msgid "By Allownce / Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.holidays.status:0
+msgid "Payroll Configurtion"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,date_issue:0
+msgid "Passport Issue Date"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,type:0
+#: field:hr.payroll.register,allounce:0
+#: field:hr.payslip,allounce:0
+#: selection:hr.payslip.line,type:0
+msgid "Allowance"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,holiday_days:0
+msgid "No of Leaves"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Bank Details"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Deductions"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payslip_form
+#: model:ir.ui.menu,name:hr_payroll.menu_department_tree
+msgid "Employee Payslip"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Letter Content"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "By Sal"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Net SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.payroll_advice
+msgid "Bank Payment Advice"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.salary_structure_register
+msgid "Print Salary Structure"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Total Deductions"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:payroll.advice:0
+#: rml:year.salary:0
+msgid "Total"
+msgstr ""
+
diff --git a/addons/hr_payroll/i18n/hr_payroll.pot b/addons/hr_payroll/i18n/hr_payroll.pot
new file mode 100644
index 00000000000..a4466114f51
--- /dev/null
+++ b/addons/hr_payroll/i18n/hr_payroll.pot
@@ -0,0 +1,1435 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * hr_payroll
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-25 13:16:10+0000\n"
+"PO-Revision-Date: 2009-11-25 13:16:10+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "E-mail Address"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.holidays.status:0
+msgid "(Based on type Payroll will calculate basic salary)"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,net:0
+#: field:hr.payslip,net:0
+msgid "Net Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,working_days:0
+msgid "Working Days"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "New Slip"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Axis Bank"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,esp_account:0
+msgid "EPS Account"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,analytic_account:0
+msgid "Analytic Account for Salary Analysis"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Allowances with Basic:"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "Department"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Deductions:"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,gratuity:0
+msgid "Use for Gratuity ?"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Employee No"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Salary Payment Register"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,paid:0
+msgid "Paid ? "
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.year_salary_report
+msgid "Year Salary Report"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Paid Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,flag:0
+msgid "D/C"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,company_id:0
+#: field:hr.payslip,company_id:0
+#: wizard_field:payroll.analysis,init,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,employee_account:0
+msgid "Employee Payable Account"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Letter Details"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid ","
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Set to Draft"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "The Manager"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.holidays.status,type:0
+msgid "Half-Pay Holiday"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,type:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,other_pay:0
+msgid "Others"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,slip_id:0
+#: model:ir.model,name:hr_payroll.model_hr_payslip
+#: rml:payslip.pdf:0
+msgid "Pay Slip"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Calculations Rules"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.module.module,description:hr_payroll.module_meta_information
+msgid "\n"
+" The Payroll system - India, Manages and depends on,\n"
+" * HR Details\n"
+" * HR Contracts\n"
+" * HR Payslip\n"
+" * HR Paysheet\n"
+" * HR Attendance\n"
+" * HR Holidays\n"
+" "
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+#: rml:salary.structure:0
+msgid "Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.holidays.status,account_id:0
+msgid "Account"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Payment From"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Miscelleanous / Statutory"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Leaves"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,register_id:0
+msgid "Register"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:wizard.year.salary,init,salary_on:0
+msgid "Next Month Date"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.payroll.register,period_id:0
+#: help:hr.payslip,period_id:0
+msgid "Keep empty to use the period of the validation(Payslip) date."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,value:0
+msgid "Value"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Name of the Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,permit_no:0
+msgid "Work Permit No"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,amount:0
+#: rml:payroll.advice:0
+msgid "Amount"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,line_ids:0
+#: view:hr.payslip.line:0
+#: model:ir.model,name:hr_payroll.model_hr_payslip_line
+msgid "Payslip Line"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,country_id:0
+msgid "Country of Issue"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Warning !"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Please Confirm all Expanse Invoice appear for Reimbursement"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Other Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.holidays.status,type:0
+msgid "Paid Holiday"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Employees Salary Details"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,date_expire:0
+msgid "Passport Expire Date"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Special Allowance and Deductions for Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.holidays.status,type:0
+msgid "Un-Paid Holiday"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,period_id:0
+#: field:hr.payslip,period_id:0
+msgid "Force Period"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Amount (in words) :"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.holidays.status,type:0
+msgid "Payment"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,analytic_account:0
+#: field:hr.employee.grade,account_id:0
+#: field:hr.holidays.status,analytic_account_id:0
+#: field:hr.payslip.line,analytic_account_id:0
+#: rml:salary.structure:0
+msgid "Analytic Account"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Expanse To"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,base:0
+msgid "Based on"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "Bank"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,move_id:0
+msgid "Expanse Entries"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.module.module,shortdesc:hr_payroll.module_meta_information
+msgid "Human Resource Payroll"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:account.analytic.account:0
+msgid "Error! You can not create recursive analytic accounts."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,esi_account:0
+msgid "ESI Account"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_passport
+msgid "Passport Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Please defined the Employee Home Address Along with Partners !!"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,total:0
+msgid "Sub Total"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,visa_no:0
+msgid "Visa No"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,from:0
+msgid "From"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,bysal:0
+msgid "By Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.menu_wizard_print_year_salary
+msgid "Employee Year Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.salary_payslip
+msgid "Employee PaySlip"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+#: rml:payroll.advice:0
+msgid "Authorised Signature"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,umo_id:0
+msgid "Unite"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Salary Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Notes:"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "End Date"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Accounting Information"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "Amount Information"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,passport_id:0
+#: field:hr.employee,passport_id:0
+#: view:hr.passport:0
+msgid "Passport"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,employee_id:0
+#: field:hr.payroll.advice.line,employee_id:0
+#: field:hr.payslip,employee_id:0
+#: field:hr.payslip.line,employee_id:0
+msgid "Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Start Date"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_payroll_advice_line
+msgid "Bank Advice Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,type:0
+#: field:hr.payslip.line,type:0
+#: wizard_field:payroll.analysis,init,type:0
+#: rml:salary.structure:0
+msgid "Type"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "#"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Miscelleanous"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Integrity Error !"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Verify Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,pan_no:0
+msgid "PAN No"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_button:wizard.employees.detail,init,report:0
+#: wizard_button:wizard.year.salary,init,report:0
+msgid "Print"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Accounting Informations"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Contributions Configuration"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,grows:0
+#: field:hr.payslip,grows:0
+msgid "Gross Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Total Earnings"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Other Payment"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,basic:0
+msgid "Basic Salary - Leaves"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "C/D"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:payroll.analysis,init,type:0
+msgid "By Employee Function"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,line_ids:0
+msgid "Employee Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,chaque_nos:0
+msgid "Chaque Nos"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.wizard,name:hr_payroll.wizard_print_year_salary
+msgid "Year Salary Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty.line,amount_type:0
+#: selection:hr.payslip.line,amount_type:0
+msgid "Fixed Amount"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Wating for Verification"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Account Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Pay Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Gross SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: code:addons/hr_payroll/hr_payroll.py:0
+#, python-format
+msgid "Please defined the Partner in Home Address !!"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+#: rml:payslip.pdf:0
+msgid "For the month of"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Payslip"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,type:0
+#: field:hr.payroll.register,deduction:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,deduction:0
+#: selection:hr.payslip.line,type:0
+msgid "Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_payroll_advice
+msgid "Bank Advice Note"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.passport:0
+msgid "Passport List"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,payment_id:0
+msgid "Payment Entries"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "YTD"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,expanse_id:0
+msgid "Expense"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,based_on:0
+msgid "Fided Value"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Loan Installment"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Complete HR Checking"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Yours Sincerely"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Allowances"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "SI. No."
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Net Amount"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,based_on:0
+#: field:hr.payroll.advice,state:0
+#: field:hr.payroll.register,state:0
+#: field:hr.payslip,state:0
+msgid "State"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Salary Structure:"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.year_employees_detail
+#: model:ir.actions.wizard,name:hr_payroll.wizard_print_employees_detail
+#: model:ir.ui.menu,name:hr_payroll.menu_wizard_print_employees_detail
+msgid "Employees Salary Detail"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_employee_grade
+msgid "Function of the Employee"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: selection:hr.payroll.advice,state:0
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Confirm Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Wating for Account Verification"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Others:"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+#: field:hr.passport,contracts_ids:0
+msgid "Contracts"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Passport and Visa"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Employee Code"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,amount_type:0
+#: field:hr.payslip.line,amount_type:0
+#: rml:salary.structure:0
+msgid "Amount Type"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,category_id:0
+#: field:hr.payslip.line,category_id:0
+#: rml:salary.structure:0
+msgid "Category"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,move_line_ids:0
+msgid "Accounting Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,bank_journal_id:0
+#: field:hr.payslip,bank_journal_id:0
+msgid "Bank Journal"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Total SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,hospital_id:0
+msgid "ESI Hospital"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,slip_ids:0
+#: view:hr.payroll.register:0
+#: field:hr.payroll.register,line_ids:0
+msgid "Payslips"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Earnings"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.advice,state:0
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Reject"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_hr_passport_tree
+#: model:ir.ui.menu,name:hr_payroll.menu_action_hr_passport_tree
+msgid "All Passports"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:hr.payroll.register.sheet:0
+#: rml:payslip.pdf:0
+msgid "Employee Name"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,salary_account:0
+msgid "Salary Account"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty.line,amount_type:0
+#: selection:hr.payslip.line,amount_type:0
+msgid "Percentage (%)"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,register_id:0
+#: view:hr.payroll.register:0
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payroll_register_form
+#: model:ir.model,name:hr_payroll.model_hr_payroll_register
+#: model:ir.ui.menu,name:hr_payroll.hr_menu_payroll_register
+msgid "Payroll Register"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:hr.payroll.register.sheet:0
+#: rml:payroll.advice:0
+#: rml:salary.structure:0
+#: rml:year.salary:0
+msgid "For"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,journal_id:0
+#: field:hr.payslip,journal_id:0
+msgid "Expanse Journal"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_hr_contract
+#: model:ir.ui.menu,name:hr_payroll.hr_menu_contract
+msgid "Employee Contract"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,contribute:0
+msgid "Contribe by Company ?"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "Employee Function"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,working_days_per_week:0
+msgid "Working Days / Week"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,worked_days:0
+msgid "Worked Day"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+msgid "Complete Accountant Checking"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+msgid "Title"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,based_on:0
+msgid "On Attendance"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_employee_grade_form
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_allounce_deduction_tree
+msgid "Allowance/Deduction Heads"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Compute Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.register,active:0
+msgid "Active"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,employee_account:0
+msgid "Employee Account"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:year.salary:0
+msgid "Yearly Salary Details"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,condition:0
+msgid "Condition"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.register,state:0
+#: selection:hr.payslip,state:0
+msgid "Wating for HR Verification"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,pf_account:0
+msgid "PF Account"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+msgid "Compute"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: view:hr.payslip:0
+#: field:hr.payslip,move_payment_ids:0
+msgid "Payment Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: field:hr.payslip,deg_id:0
+#: rml:payslip.pdf:0
+#: rml:salary.structure:0
+msgid "Designation"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "HR Manager"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,based_on:0
+#: field:hr.payslip,basic_before_leaves:0
+#: rml:payslip.pdf:0
+msgid "Basic Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,code:0
+msgid "Categoty Code"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+msgid "Salary Information"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.model,name:hr_payroll.model_hr_allounce_deduction_categoty
+#: model:ir.model,name:hr_payroll.model_hr_allounce_deduction_categoty_line
+msgid "Allowance Deduction Categoty"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Authorized Signature"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Allowance / Deduction Category"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payroll.advice,state:0
+msgid "Draft Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,date:0
+#: field:hr.payroll.register,date:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,date:0
+msgid "Date"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Basic SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.contract,visa_expire:0
+msgid "Visa Expire Date"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "Phone No."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,include_in_salary:0
+msgid "Included in Salary ?"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.expense.expense,category_id:0
+#: field:hr.holidays.status,head_id:0
+msgid "Payroll Head"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+#: field:hr.payroll.advice.line,advice_id:0
+msgid "Bank Advice"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,account_id:0
+#: rml:salary.structure:0
+msgid "General Account"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.holidays.status,code:0
+#: field:hr.payslip.line,code:0
+#: rml:salary.structure:0
+msgid "Code"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_bank_advice_tree
+#: model:ir.ui.menu,name:hr_payroll.hr_menu_payment_advice
+#: rml:payroll.advice:0
+msgid "Payment Advice"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,to:0
+msgid "To"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_button:payroll.analysis,init,process:0
+msgid "Process"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Loan"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_field:wizard.year.salary,init,salary_on:0
+msgid "Salary On"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,number:0
+#: field:hr.payroll.register,number:0
+#: rml:hr.payroll.register.sheet:0
+#: field:hr.payslip,number:0
+msgid "Number"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Contract Detail:"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "General Information"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Paymeny Lines"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+#: field:hr.employee,line_ids:0
+#: view:hr.employee.grade:0
+#: field:hr.employee.grade,line_ids:0
+#: rml:salary.structure:0
+msgid "Salary Structure"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+#: view:hr.payslip:0
+#: wizard_button:payroll.analysis,init,end:0
+#: wizard_button:wizard.employees.detail,init,end:0
+#: wizard_button:wizard.year.salary,init,end:0
+msgid "Cancel"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip.line,amount:0
+#: rml:salary.structure:0
+msgid "Amount / Percentage"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Accounting Details"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:wizard.year.salary,init,salary_on:0
+msgid "Current Month Date"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Contract Duration"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_view:payroll.analysis,init:0
+msgid "Process Form"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,name:0
+msgid "Passport No"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee.grade:0
+msgid "Account Information"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Generalities"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "for period"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.register:0
+msgid "Allowance / Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "E-mail"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.year_payroll_register
+msgid "Print Statement"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+#: field:hr.allounce.deduction.categoty,line_ids:0
+msgid "Calculations"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_view:wizard.year.salary,init:0
+msgid "Salary Deposit Date Option?"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payslip:0
+msgid "Other Informations"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.allounce.deduction.categoty:0
+msgid "Dynamic Computation"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee.grade,function_id:0
+#: field:hr.payslip.line,function_id:0
+msgid "Function"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "Dear Sir/Madam,"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:salary.structure:0
+msgid "PAN No."
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice,note:0
+msgid "Description"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,pg_joining:0
+msgid "PF Join Date"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_payroll_reporting
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_root_payroll
+msgid "Payroll"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_view:wizard.employees.detail,init:0
+#: wizard_view:wizard.year.salary,init:0
+msgid "Year Salary"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty,name:0
+msgid "Categoty Name"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.wizard,name:hr_payroll.wizard_payroll_analysis
+#: model:ir.ui.menu,name:hr_payroll.menu_wizard_payroll_analysis
+msgid "Create Analytic Structure"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:payslip.pdf:0
+#: rml:salary.structure:0
+msgid "Address"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,property_bank_account:0
+msgid "Select Bank Account from where Salary Expanse will be Paid"
+msgstr ""
+
+#. module: hr_payroll
+#: help:hr.employee,salary_account:0
+msgid "Expanse account when Salary Expanse will be recorded"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Notes"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.payroll_configure
+msgid "Configure Payroll"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Cancel Sheet"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.payslip.line,type:0
+msgid "Advance"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:salary.structure:0
+msgid "Special Allowances and Deductions For Employee:"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.allounce.deduction.categoty.line,name:0
+#: field:hr.payroll.advice,name:0
+#: field:hr.payroll.register,name:0
+#: field:hr.payslip,name:0
+#: field:hr.payslip.line,name:0
+#: rml:salary.structure:0
+#: rml:year.salary:0
+msgid "Name"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,leaves:0
+msgid "Leaved Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Statutory Information"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.ui.menu,name:hr_payroll.menu_hr_employee_function
+msgid "Employee Functions"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_field:wizard.employees.detail,init,employee_ids:0
+#: wizard_field:wizard.year.salary,init,employee_ids:0
+msgid "Employees"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.employee,property_bank_account:0
+#: rml:payroll.advice:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payroll.advice.line,name:0
+msgid "Bank Account A/C"
+msgstr ""
+
+#. module: hr_payroll
+#: wizard_field:wizard.employees.detail,init,fiscalyear_id:0
+#: wizard_field:wizard.year.salary,init,fiscalyear_id:0
+msgid "Fiscal Year"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.employee:0
+msgid "Contract"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:payroll.analysis,init,type:0
+msgid "By Allownce / Deduction"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.holidays.status:0
+msgid "Payroll Configurtion"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.passport,date_issue:0
+msgid "Passport Issue Date"
+msgstr ""
+
+#. module: hr_payroll
+#: selection:hr.allounce.deduction.categoty,type:0
+#: field:hr.payroll.register,allounce:0
+#: field:hr.payslip,allounce:0
+#: selection:hr.payslip.line,type:0
+msgid "Allowance"
+msgstr ""
+
+#. module: hr_payroll
+#: field:hr.payslip,holiday_days:0
+msgid "No of Leaves"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Bank Details"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Deductions"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.act_window,name:hr_payroll.action_view_hr_payslip_form
+#: model:ir.ui.menu,name:hr_payroll.menu_department_tree
+msgid "Employee Payslip"
+msgstr ""
+
+#. module: hr_payroll
+#: view:hr.payroll.advice:0
+msgid "Letter Content"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payroll.advice:0
+msgid "By Sal"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:hr.payroll.register.sheet:0
+msgid "Net SAL"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.payroll_advice
+msgid "Bank Payment Advice"
+msgstr ""
+
+#. module: hr_payroll
+#: model:ir.actions.report.xml,name:hr_payroll.salary_structure_register
+msgid "Print Salary Structure"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:payslip.pdf:0
+msgid "Total Deductions"
+msgstr ""
+
+#. module: hr_payroll
+#: rml:employees.salary:0
+#: rml:payroll.advice:0
+#: rml:year.salary:0
+msgid "Total"
+msgstr ""
+
diff --git a/addons/hr_payroll/report/__init__.py b/addons/hr_payroll/report/__init__.py
new file mode 100755
index 00000000000..c0f35b40bfc
--- /dev/null
+++ b/addons/hr_payroll/report/__init__.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# d$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import report_payslip
+import report_payroll_advice
+import report_year_salary
+import report_payroll_register
+import report_employees_detail
+import report_emp_salary_structure \ No newline at end of file
diff --git a/addons/hr_payroll/report/payroll_register.rml b/addons/hr_payroll/report/payroll_register.rml
new file mode 100644
index 00000000000..13e40b68fe5
--- /dev/null
+++ b/addons/hr_payroll/report/payroll_register.rml
@@ -0,0 +1,261 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table3">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table2">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table4">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table5">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10"/>
+ <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
+ <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
+ <paraStyle name="P4" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
+ <paraStyle name="P5" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
+ <paraStyle name="P6" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
+ <paraStyle name="P7" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
+ <paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
+ <paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
+ <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/>
+ <paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
+ <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/>
+ <paraStyle name="P13" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
+ <paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10"/>
+ <paraStyle name="P15" fontName="Helvetica" fontSize="8.0" leading="10"/>
+ <paraStyle name="P16" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
+ <paraStyle name="P17" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
+ <paraStyle name="P18" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
+ <paraStyle name="P19" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Standard" fontName="Times-Roman"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Times-Roman"/>
+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ </stylesheet>
+ <images/>
+ <story>
+ <para style="P1">[[ repeatIn(objects, 'o') ]]</para>
+ <para style="P4">Salary Payment Register</para>
+ <para style="P5">[[o.name]]</para>
+ <para style="P2">For the month of [[get_month(o.date)]]</para>
+ <para style="P3">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="72.0,295.0,47.0,68.0" style="Table3">
+ <tr>
+ <td>
+ <para style="P6">Expanse To</para>
+ </td>
+ <td>
+ <para style="P11">[[o.journal_id.name]]</para>
+ </td>
+ <td>
+ <para style="P13">Number</para>
+ </td>
+ <td>
+ <para style="P12">[[o.number]]</para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="P13">Payment From</para>
+ </td>
+ <td>
+ <para style="P11">[[o.bank_journal_id.name]]</para>
+ </td>
+ <td>
+ <para style="P6">Date</para>
+ </td>
+ <td>
+ <para style="P12">[[o.date]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="P3">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <blockTable colWidths="24.0,96.0,60.0,60.0,60.0,60.0,60.0,60.0" style="Table1">
+ <tr>
+ <td>
+ <para style="P5">#</para>
+ </td>
+ <td>
+ <para style="P6">Employee Name</para>
+ </td>
+ <td>
+ <para style="P7">Basic SAL</para>
+ </td>
+ <td>
+ <para style="P7">Others</para>
+ </td>
+ <td>
+ <para style="P7">Allowances</para>
+ </td>
+ <td>
+ <para style="P7">Gross SAL</para>
+ </td>
+ <td>
+ <para style="P7">Deduction</para>
+ </td>
+ <td>
+ <para style="P7">Net SAL</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="24.0,96.0,60.0,60.0,60.0,60.0,60.0,60.0" style="Table2">
+ <tr>
+ <td>
+ <para style="P9">[[ get_no() ]]</para>
+ </td>
+ <td>
+ <para style="P8">[[ repeatIn(o.line_ids, 'l') ]]</para>
+ <para style="P8">[[add_line(l)]]</para>
+ <para style="P8">[[ l.employee_id.name ]]</para>
+ </td>
+ <td>
+ <para style="P10">[[l.basic]]</para>
+ </td>
+ <td>
+ <para style="P10">[[l.other_pay]]</para>
+ </td>
+ <td>
+ <para style="P10">[[l.allounce]]</para>
+ </td>
+ <td>
+ <para style="P10">[[l.grows]]</para>
+ </td>
+ <td>
+ <para style="P10">[[l.deduction]]</para>
+ </td>
+ <td>
+ <para style="P10">[[l.net]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="24.0,96.0,60.0,60.0,60.0,60.0,60.0,60.0" style="Table4">
+ <tr>
+ <td>
+ <para style="P5">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">Total SAL</para>
+ </td>
+ <td>
+ <para style="P7">[[get_basic()]]</para>
+ </td>
+ <td>
+ <para style="P7">[[get_other()]]</para>
+ </td>
+ <td>
+ <para style="P7">[[get_allow()]]</para>
+ </td>
+ <td>
+ <para style="P7">[[get_grows()]]</para>
+ </td>
+ <td>
+ <para style="P7">[[get_deduct()]]</para>
+ </td>
+ <td>
+ <para style="P7">[[get_net()]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <blockTable colWidths="241.0,241.0" style="Table5">
+ <tr>
+ <td>
+ <para style="P6">For [[company.name]],</para>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ <para style="P6">HR Manager</para>
+ <para style="P19">Authorised Signature</para>
+ </td>
+ <td>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="P1">
+ <font color="white"> </font>
+ </para>
+ </story>
+</document>
+
diff --git a/addons/hr_payroll/report/payslip.rml b/addons/hr_payroll/report/payslip.rml
new file mode 100755
index 00000000000..ede60a9a490
--- /dev/null
+++ b/addons/hr_payroll/report/payslip.rml
@@ -0,0 +1,671 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table2">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table15">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table16">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table17">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table18">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table10">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table19">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table20">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table12">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table14">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table13">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table3">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table8">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table9">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table11">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table4">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table21">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table22">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table5">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table6">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table7">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
+ <paraStyle name="Standard" fontName="Times-Roman"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Times-Roman"/>
+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Footer" fontName="Times-Roman"/>
+ <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
+ <paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Table" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_space" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ </stylesheet>
+ <images/>
+ <story>
+ <para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
+ <blockTable colWidths="539.0" style="Table2">
+ <tr>
+ <td>
+ <para style="terp_tblheader_General_Centre">Pay Slip </para>
+ <para style="terp_default_Centre_9">For the month of [[ get_month(o) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="43.0,101.0,67.0,328.0" style="Table15">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Code</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.employee_id.sinid or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Name </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[o.employee_id.name]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="43.0,496.0" style="Table16">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Address </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="43.0,168.0,65.0,263.0" style="Table1">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Email</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.employee_id.work_email or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Bank Details </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.employee_id.otherid or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="43.0,102.0,66.0,169.0,68.0,91.0" style="Table17">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Slip ID</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.number or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Bill No</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.move_id and o.move_id.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">PAN No</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.employee_id.pan_no or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="43.0,102.0,66.0,169.0,68.0,91.0" style="Table18">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Register</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.register_id and o.register_id.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Payment</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.payment_id and o.payment_id.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Designation </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.employee_id.contract_ids and o.employee_id.contract_ids[0].function.name or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space"/>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="539.0" style="Table10">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Basic Salary without Leave:</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="70.0,89.0,90.0,93.0,105.0,92.0" style="Table19">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Working Days</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.working_days or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Number of Leaves</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.holiday_days or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Worked Day </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.worked_days or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="70.0,89.0,90.0,93.0,105.0,92.0" style="Table20">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Basic Salary</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.basic_before_leaves or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Leaved Deduction</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.leaves or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">Basic Salary – Leaves</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ formatLang(o.basic) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="539.0" style="Table12">
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Leave Deductions Line:</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="292.0,247.0" style="Table14">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Deductions</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ get_month(o) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_9">[[repeatIn(get_leave(o.line_ids),'ld') ]]</para>
+ <blockTable colWidths="293.0,246.0" style="Table13">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ ld.code ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(ld.total) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="158.0,112.0,160.0,109.0" style="Table3">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Earnings</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ get_month(o) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Deductions</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ get_month(o) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="269.0,269.0" style="Table8">
+ <tr>
+ <td>
+ <blockTable colWidths="141.0,122.0" style="Table9">
+ <tr>
+ <td>
+ <para style="terp_default_9">Basic Salary</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(o.basic) ]]</para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_default_9"><font>[[repeatIn(get_earnings(o.line_ids),'a') ]]</font><font>[[ a.code or removeParentNode('tr') ]]</font></para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(a.total) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <section>
+ <para style="terp_default_9">[[repeatIn(get_deductions(o.line_ids),'b') ]]</para>
+ <blockTable colWidths="142.0,121.0" style="Table11">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ b.code ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(b.total) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="181.0,88.0,177.0,93.0" style="Table4">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Total Earnings </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(o.allounce + o.basic) ]] </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Total Deductions </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(o.deduction) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="269.0,134.0,135.0" style="Table21">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Other Lines</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Payments - [[ get_month(o) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Deduction -[[ get_month(o) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_9">[[repeatIn(get_others(o.line_ids),'ol') ]]</para>
+ <blockTable colWidths="269.0,134.0,135.0" style="Table22">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ ol.type in ['advance','loan','otherpay','otherdeduct','installment'] and ol.code or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total) or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total) or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_2">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="269.0,177.0,93.0" style="Table5">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Net Amount </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(o.net) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="269.0,269.0" style="Table6">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Amount (in words) :</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ convert(o.net,company.currency_id.name) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_8">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="269.0,269.0" style="Table7">
+ <tr>
+ <td>
+ <para style="P1">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Authorized Signature </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ </story>
+</document>
diff --git a/addons/hr_payroll/report/report_emp_salary_structure.py b/addons/hr_payroll/report/report_emp_salary_structure.py
new file mode 100644
index 00000000000..01dd4302d37
--- /dev/null
+++ b/addons/hr_payroll/report/report_emp_salary_structure.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# d$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+import mx.DateTime
+from report import report_sxw
+from tools import amount_to_text_en
+
+class salary_structure_report(report_sxw.rml_parse):
+
+ def __init__(self, cr, uid, name, context):
+ super(salary_structure_report, self).__init__(cr, uid, name, context)
+ self.localcontext.update({
+ 'time': time,
+ 'get_type':self.get_type,
+ 'get_contract':self.get_contract,
+ 'get_line_amount_type':self.get_line_amount_type,
+ 'get_line_type':self.get_line_type
+ })
+
+ def get_contract(self,emp):
+ curr_date = "'"+time.strftime("%Y-%m-%d")+"'"
+ sql_req= '''
+ SELECT c.id as id, c.wage as wage, function as function
+ FROM hr_contract c
+ LEFT JOIN hr_employee emp on (c.employee_id=emp.id)
+ LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id)
+ LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id)
+ WHERE
+ (emp.id=%s) AND
+ (date_start <= %s) AND
+ (date_end IS NULL OR date_end >= %s)
+ LIMIT 1
+ '''%(emp.id, curr_date, curr_date)
+ self.cr.execute(sql_req)
+ contract_id = self.cr.dictfetchone()
+ if not contract_id:
+ return []
+ contract = self.pool.get('hr.contract').browse(self.cr, self.uid, [contract_id['id']])
+ return contract
+
+ def get_type(self,type):
+ return type[0].swapcase() + type[1:] +' Salary'
+
+ def get_line_amount_type(self,amount_type):
+ if amount_type == 'per':
+ return 'Percent(%)'
+ else:
+ return 'Fixed'
+
+ def get_line_type(self,type):
+ if type == 'allounce':
+ return 'Allowance'
+ elif type == 'deduction':
+ return 'Deduction'
+ elif type == 'advance':
+ return 'Advance'
+ elif type == 'loan':
+ return 'Loan'
+ elif type == 'otherpay':
+ return 'Other Payment'
+ else:
+ return 'Other Deduction'
+
+report_sxw.report_sxw('report.salary.structure', 'hr.employee', 'hr_payroll/report/report_emp_salary_structure.rml', parser=salary_structure_report)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr_payroll/report/report_emp_salary_structure.rml b/addons/hr_payroll/report/report_emp_salary_structure.rml
new file mode 100644
index 00000000000..18211b254f3
--- /dev/null
+++ b/addons/hr_payroll/report/report_emp_salary_structure.rml
@@ -0,0 +1,552 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table4">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table6">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table7">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table13">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table2">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table3">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table9">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table5">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table8">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table10">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table11">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table12">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Standard" fontName="Times-Roman"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Helvetica"/>
+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Footer" fontName="Times-Roman"/>
+ <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Drawing" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Header" fontName="Times-Roman"/>
+ <paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
+ <paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
+ <paraStyle name="Signature" fontName="Times-Roman"/>
+ <paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Salutation" fontName="Times-Roman"/>
+ <paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
+ </stylesheet>
+ <images/>
+ <story>
+ <para style="terp_default_8">[[repeatIn(objects,'employee')]]</para>
+ <blockTable colWidths="539.0" style="Table1">
+ <tr>
+ <td>
+ <para style="terp_header_Centre">Salary Structure</para>
+ <para style="terp_header_Centre">For [[ employee.name ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_9">[[repeatIn(get_contract(employee),'cont')]]</para>
+ <blockTable colWidths="68.0,111.0,63.0,111.0,71.0,115.0" style="Table4">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Code</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ employee.ssnid ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Department</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ employee.company_id and employee.company_id.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Bank</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ employee.otherid or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="68.0,111.0,63.0,111.0,71.0,115.0" style="Table6">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Name</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ employee.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">PAN No.</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ employee.pan_no or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Address</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[employee.address_home_id and employee.address_home_id.name or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="68.0,111.0,63.0,111.0,71.0,115.0" style="Table7">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Designation</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ cont.function.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Phone No.</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ employee.work_phone or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">E-mail</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ employee.work_email or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="539.0" style="Table13">
+ <tr>
+ <td>
+ <para style="P1">Contract Detail:</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="68.0,111.0,63.0,111.0,71.0,115.0" style="Table2">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Start Date</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ formatLang(cont.date_start,date=True) or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">End Date</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ formatLang(cont.date_end,date=True) or removeParentNode('para') ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Type</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ get_type(cont.wage_type_id.type) or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="68.0,111.0,63.0,297.0" style="Table3">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Salary</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ formatLang(cont.wage) or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Notes:</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ cont.notes or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="539.0" style="Table9">
+ <tr>
+ <td>
+ <para style="P1">Salary Structure:</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="34.0,116.0,40.0,67.0,44.0,109.0,70.0,59.0" style="Table5">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Code</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Name</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Amount Type</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Amount / Percentage</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Type</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Category</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">General Account</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Analytic Account</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_9">[[repeatIn(cont.function.line_ids,'line')]]</para>
+ <blockTable colWidths="34.0,117.0,39.0,67.0,44.0,110.0,69.0,59.0" style="Table8">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ line.code or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ get_line_amount_type(line.amount_type) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(line.amount) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ get_line_type(line.type) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line.category_id.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line.account_id.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line.analytic_account_id and line.analytic_account_id.name or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ </section>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="539.0" style="Table10">
+ <tr>
+ <td>
+ <para style="P1">Special Allowances and Deductions For Employee:</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="34.0,116.0,40.0,67.0,44.0,109.0,128.0" style="Table11">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Code</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Name</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Amount Type</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Amount / Percentage</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Type</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Category</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">General Account</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_9">[[repeatIn(employee.line_ids,'line1')]]</para>
+ <blockTable colWidths="34.0,117.0,39.0,67.0,44.0,110.0,128.0" style="Table12">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ line1.code or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line1.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ get_line_amount_type(line1.amount_type) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(line1.amount) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ get_line_type(line1.type) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line1.category_id.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line1.account_id.name ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ </story>
+</document>
diff --git a/addons/hr_payroll/report/report_employees_detail.py b/addons/hr_payroll/report/report_employees_detail.py
new file mode 100644
index 00000000000..c809696a35b
--- /dev/null
+++ b/addons/hr_payroll/report/report_employees_detail.py
@@ -0,0 +1,235 @@
+import time
+import locale
+import datetime
+from report import report_sxw
+import time
+import pooler
+import rml_parse
+import mx.DateTime
+from mx.DateTime import RelativeDateTime, now, DateTime, localtime
+
+class employees_salary_report(rml_parse.rml_parse):
+
+ def __init__(self, cr, uid, name, context):
+ super(employees_salary_report, self).__init__(cr, uid, name, context)
+ self.localcontext.update({
+ 'time': time,
+ 'get_employee' : self.get_employee,
+ 'get_employee_detail' : self.get_employee_detail,
+ 'cal_monthly_amt':self.cal_monthly_amt,
+ 'get_periods' : self.get_periods,
+ 'get_fiscalyear' : self.get_fiscalyear,
+ 'get_total' : self.get_total,
+ 'get_allow':self.get_allow,
+ 'get_deduct':self.get_deduct,
+ 'get_other':self.get_other,
+ 'get_monthly_total':self.get_monthly_total,
+ })
+
+ self.mnths =[]
+ self.allow_list =[]
+ self.deduct_list = []
+ self.other_list = []
+ self.month_total_list =[]
+ self.curr_fiscal_year_name=''
+ self.period_ids = []
+ self.total=0.00
+
+ def get_periods(self,form):
+ self.mnths =[]
+ fiscalyear = pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
+ curr_fiscalyear_id = form['fiscalyear_id']
+ curr_fiscalyear = fiscalyear.read(self.cr,self.uid,[form['fiscalyear_id']],['date_start','date_stop'])[0]
+
+# Get start year-month-date and end year-month-date
+ fy = int(curr_fiscalyear['date_start'][0:4])
+ ly = int(curr_fiscalyear['date_stop'][0:4])
+
+ fm = int(curr_fiscalyear['date_start'][5:7])
+ lm = int(curr_fiscalyear['date_stop'][5:7])
+ no_months = (ly-fy)*12+lm-fm + 1
+ cm = fm
+ cy = fy
+
+# Get name of the months from integer
+ mnth_name = []
+ for count in range(0,no_months):
+ m = datetime.date(cy, cm, 1).strftime('%b')
+ mnth_name.append(m)
+ self.mnths.append(str(cm)+'-'+str(cy))
+ if cm == 12:
+ cm = 0
+ cy = ly
+ cm = cm +1
+ return [mnth_name]
+
+ def get_fiscalyear(self,fiscalyear_id):
+ fiscalyear_obj = pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
+ return fiscalyear_obj.read(self.cr,self.uid,[fiscalyear_id],['name'])[0]['name']
+
+ def get_employee(self,form):
+ result = []
+ periods = []
+ emp = pooler.get_pool(self.cr.dbname).get('hr.employee')
+ emp_ids = form['employee_ids'][0][2]
+ result = emp.browse(self.cr,self.uid, emp_ids)
+ fiscalyear_obj = pooler.get_pool(self.cr.dbname).get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear_id'])
+ period_ids_l = fiscalyear_obj.period_ids
+ for period in period_ids_l:
+ periods.append(period.id)
+ self.period_ids = ','.join(map(str, periods))
+ return result
+
+ def get_employee_detail(self,obj):
+ self.month_total_list =['Net Total (Allowances with Basic - Deductions)',0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00]
+ self.allow_list =[]
+ self.deduct_list = []
+ self.other_list = []
+ allowance_cat_ids =[]
+ deduction_cat_ids = []
+ other_cat_ids =[]
+ self.total = 0.00
+ payment_category = self.pool.get('hr.allounce.deduction.categoty')
+ payslip = self.pool.get('hr.payslip')
+ allowance_cat_ids = payment_category.search( self.cr, self.uid, [('type','=','allow')])
+ deduction_cat_ids = payment_category.search( self.cr, self.uid, [('type','=','deduct')])
+ other_cat_ids = payment_category.search( self.cr, self.uid, [('type','=','other')])
+ #for Basic Salary
+ res = []
+ res = self.cal_monthly_amt(obj.id,None)
+ self.total += res[len(res)-1]
+ basic_flag = False
+ for i in range(1,len(res)):
+ if res[i] > 0.0:
+ basic_flag = True
+ if basic_flag:
+ self.allow_list.append(res)
+ #for allowance
+ if allowance_cat_ids:
+ for allow in allowance_cat_ids:
+ res = []
+ res = self.cal_monthly_amt(obj.id,allow)
+ all_flag = False
+ for i in range(1,len(res)):
+ if res[i] > 0.0:
+ all_flag = True
+ if all_flag:
+ self.allow_list.append(res)
+ self.total += res[len(res)-1]
+ #for Deduction
+ if deduction_cat_ids:
+ for deduct in deduction_cat_ids:
+ res = []
+ res = self.cal_monthly_amt(obj.id,deduct)
+ ded_flag = False
+ for i in range(1,len(res)):
+ if res[i] > 0.0:
+ ded_flag = True
+ if ded_flag:
+ self.deduct_list.append(res)
+ self.total -= res[len(res)-1]
+ #for Other
+ if other_cat_ids:
+ for other in other_cat_ids:
+ res = []
+ res = self.cal_monthly_amt(obj.id,other)
+ other_flag = False
+ for i in range(1,len(res)):
+ if res[i] > 0.0:
+ other_flag = True
+ if other_flag:
+ self.other_list.append(res)
+ return None
+
+ def cal_monthly_amt(self,emp_id,category):
+ tot = 0.0
+ cnt = 1
+ result = []
+ res ={}
+ if not category:
+ result.append('Basic Salary')
+ else:
+ category_name = self.pool.get('hr.allounce.deduction.categoty').read(self.cr, self.uid, [category],['name','type'])[0]
+ result.append(category_name['name'])
+ for mnth in self.mnths:
+ if len(mnth) != 7:
+ mnth = '0' + str(mnth)
+ query = "select id from hr_payslip where employee_id = "+str(emp_id)+" and to_char(date,'mm-yyyy') like '%"+mnth+"%' and state = 'done' and period_id in "+"("+ self.period_ids +")" +""
+ self.cr.execute(query)
+ payslip_id = self.cr.dictfetchone()
+ if payslip_id:
+ payslip_obj = self.pool.get('hr.payslip').browse(self.cr, self.uid, payslip_id['id'])
+ if not category:
+ tot += payslip_obj.basic
+ res[mnth] = payslip_obj.basic
+ result.append(payslip_obj.basic)
+ self.month_total_list[cnt] = self.month_total_list[cnt] + payslip_obj.basic
+ else:
+ append_index = 0
+ for line in payslip_obj.line_ids:
+ if line.category_id.id == category:
+ if category_name['type'] == 'allow':
+ if res:
+ self.month_total_list[cnt] = self.month_total_list[cnt] + line.total
+ result[append_index] += line.total
+ tot += line.total
+ res[mnth] = result[append_index]
+ else:
+ self.month_total_list[cnt] = self.month_total_list[cnt] + line.total
+ tot += line.total
+ res[mnth] = line.total
+ append_index = len(result) - 1
+ result.append(line.total)
+ if category_name['type'] == 'deduct':
+ if res:
+ self.month_total_list[cnt] = self.month_total_list[cnt] - line.total
+ result[append_index] += line.total
+ tot += line.total
+ res[mnth] = result[append_index]
+ else:
+ self.month_total_list[cnt] = self.month_total_list[cnt] - line.total
+ tot += line.total
+ res[mnth] = line.total
+ append_index = len(result) - 1
+ result.append(line.total)
+ if category_name['type'] == 'other':
+ if res:
+ result[append_index] += line.total
+ tot += line.total
+ res[mnth] = result[append_index]
+ else:
+ res[mnth] = line.total
+ result.append(res[mnth])
+ append_index = len(result) - 1
+ tot += line.total
+ else:
+ result.append(0.00)
+ res[mnth] = 0.00
+ if not res:
+ result.append(0.00)
+ res = {}
+ cnt = cnt + 1
+ cnt = 1
+ result.append(tot)
+ tot = 0.0
+ return result
+
+ def get_allow(self):
+ return self.allow_list
+
+ def get_deduct(self):
+ return self.deduct_list
+
+ def get_other(self):
+ return self.other_list
+
+ def get_total(self):
+ return self.total
+
+ def get_monthly_total(self):
+ return self.month_total_list
+
+report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report)
+
+
+
diff --git a/addons/hr_payroll/report/report_employees_detail.rml b/addons/hr_payroll/report/report_employees_detail.rml
new file mode 100644
index 00000000000..1c3ec0e03fa
--- /dev/null
+++ b/addons/hr_payroll/report/report_employees_detail.rml
@@ -0,0 +1,582 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(842.0,595.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="28.0" y1="28.0" width="786" height="539"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table2">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table3">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table5">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table4">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="12,-1" stop="12,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="13,-1" stop="13,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table6">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table8">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table9">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="Standard" fontName="Times-Roman"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text body" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Times-Roman"/>
+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
+ <paraStyle name="Drawing" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Header" fontName="Times-Roman"/>
+ <paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
+ <paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
+ <paraStyle name="Signature" fontName="Times-Roman"/>
+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Salutation" fontName="Times-Roman"/>
+ <paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Footer" fontName="Times-Roman"/>
+ <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="9.0" spaceAfter="0.0"/>
+ </stylesheet>
+ <images/>
+ <story>
+ <para style="terp_default_8">[[ repeatIn(get_employee(data['form']), 'o') ]]</para>
+ <para style="terp_header_Centre">Employees Salary Details </para>
+ <para style="terp_default_Centre_9">For [[ get_fiscalyear(data['form']['fiscalyear_id']) ]]</para>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="100.0,162.0,92.0,161.0,103.0,167.0" style="Table2">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Employee Code</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.ssnid ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Department</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.company_id and o.company_id.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Bank</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.otherid or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="100.0,162.0,92.0,161.0,103.0,167.0" style="Table3">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Employee Name</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">PAN No.</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.pan_no or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Address</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[o.address_home_id and o.address_home_id.name or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="100.0,162.0,92.0,161.0,103.0,167.0" style="Table5">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Designation</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.contract_ids and o.contract_ids[0].function.name or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Phone No.</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ o.work_phone or '' ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">E-mail Address</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[o.work_email or '' ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_8">[[ repeatIn(get_periods(data['form']),'m') ]]</para>
+ <blockTable colWidths="74.0,54.0,51.0,55.0,52.0,54.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table4">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Title</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[0] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[1] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[2] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[3] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[4] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[5] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[6] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[7] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[8] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[9] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[10] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[11] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Total</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_9">[[ get_employee_detail(o) ]]</para>
+ <para style="terp_tblheader_Details">Allowances with Basic:</para>
+ <section>
+ <para style="terp_default_9">[[ repeatIn(get_allow(),'e1') ]]</para>
+ <blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table6">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ e1[0] ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[1]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[2]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[3]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[4]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[5]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[6]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[7]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[8]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[9]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[10]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[11]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e1[12]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9_Bold">[[ formatLang(e1[13]) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_tblheader_Details">Deductions:</para>
+ <section>
+ <para style="terp_default_9">[[ repeatIn(get_deduct(),'e2') ]]</para>
+ <blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table8">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ e2[0] ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[1]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[2]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[3]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[4]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[5]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[6]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[7]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[8]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[9]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[10]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[11]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e2[12]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9_Bold">[[ formatLang(e2[13]) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_tblheader_Details">Others:</para>
+ <section>
+ <para style="terp_default_9">[[ repeatIn(get_other(),'e3') ]]</para>
+ <blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table9">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ e3[0] ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[1]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[2]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[3]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[4]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[5]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[6]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[7]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[8]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[9]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[10]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[11]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e3[12]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9_Bold">[[ formatLang(e3[13]) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="74.0,54.0,50.0,55.0,52.0,55.0,55.0,54.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table1">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">[[ get_monthly_total()[0] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[1]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[2]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[3]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[4]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[5]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[6]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[7]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[8]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[9]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[10]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[11]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[12]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right"><u>[[ formatLang(get_total()) ]]</u></para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ </story>
+</document>
diff --git a/addons/hr_payroll/report/report_payroll_advice.py b/addons/hr_payroll/report/report_payroll_advice.py
new file mode 100644
index 00000000000..d33ad5affc1
--- /dev/null
+++ b/addons/hr_payroll/report/report_payroll_advice.py
@@ -0,0 +1,54 @@
+import time
+import mx.DateTime
+from report import report_sxw
+from tools import amount_to_text_en
+
+class payroll_advice_report(report_sxw.rml_parse):
+ def __init__(self, cr, uid, name, context):
+ super(payroll_advice_report, self).__init__(cr, uid, name, context)
+
+ self.total_amount = 0.00
+ self.total_bysal = 0.00
+ self.localcontext.update({
+ 'time': time,
+ 'get_month' : self.get_month,
+ 'convert' : self.convert,
+ 'get_detail' : self.get_detail,
+ 'get_total' : self.get_total,
+ 'get_bysal_total' : self.get_bysal_total,
+ })
+
+ def get_month(self,input_date):
+ res = {
+ 'mname':''
+ }
+ date = mx.DateTime.strptime(input_date, '%Y-%m-%d')
+ res['mname']= date.strftime('%B')+'-'+date.strftime('%Y')
+ return res
+
+ def convert(self,amount, cur):
+ amt_en = amount_to_text_en.amount_to_text(amount,'en',cur);
+ return amt_en
+
+ def get_bysal_total(self):
+ return self.total_bysal
+
+ def get_total(self):
+ return self.total_amount
+
+ def get_detail(self,line_ids):
+ result =[]
+ if line_ids:
+ for l in line_ids:
+ res = {}
+ res['name'] = l.employee_id.name
+ res['acc_no'] = l.name
+ res['amount'] = l.amount
+ res['bysal'] = l.bysal
+ res['flag'] = l.flag
+ self.total_amount += l.amount
+ self.total_bysal += l.bysal
+ result.append(res)
+ return result
+
+report_sxw.report_sxw('report.payroll.advice', 'hr.payroll.advice', 'hr_payroll/report/report_payroll_advice.rml', parser=payroll_advice_report) \ No newline at end of file
diff --git a/addons/hr_payroll/report/report_payroll_advice.rml b/addons/hr_payroll/report/report_payroll_advice.rml
new file mode 100644
index 00000000000..00a2d599d0e
--- /dev/null
+++ b/addons/hr_payroll/report/report_payroll_advice.rml
@@ -0,0 +1,337 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table2">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table3">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table4">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table5">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table6">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table7">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Standard" fontName="Times-Roman"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Helvetica"/>
+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Footer" fontName="Times-Roman"/>
+ <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_0.30cmspace" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="9.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="4.0" leading="5" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_8_space" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="1.0"/>
+ <paraStyle name="Drawing" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Header" fontName="Times-Roman"/>
+ <paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
+ <paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
+ <paraStyle name="Signature" fontName="Times-Roman"/>
+ <paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Salutation" fontName="Times-Roman"/>
+ <paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
+ </stylesheet>
+ <images/>
+ <story>
+ <para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
+ <para style="terp_tblheader_Details_Centre">Payment Advice</para>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="269.0,269.0" style="Table1">
+ <tr>
+ <td>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(o.date,date=True) ]]</para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">The Manager</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_default_Bold_9">Axis Bank</para>
+ </td>
+ <td>
+ <para style="terp_default_Bold_9">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <para style="terp_default_9">Dear Sir/Madam,</para>
+ </td>
+ <td>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="539.0" style="Table2">
+ <tr>
+ <td>
+ <para style="terp_tblheader_General_Centre"><u>[[ o.name ]] for period [[ get_month(o.date)['mname'] ]]</u></para>
+ </td>
+ </tr>
+ </blockTable>
+ <blockTable colWidths="539.0" style="Table3">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ o.note ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_8_space">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="61.0,166.0,84.0,82.0,111.0,35.0" style="Table4">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">SI. No.</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Name of the Employee</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Amount</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">By Sal</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Bank Account</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">C/D</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_8">[[ repeatIn(get_detail(o.line_ids),'line') ]]</para>
+ <blockTable colWidths="60.0,167.0,84.0,82.0,110.0,35.0" style="Table5">
+ <tr>
+ <td>
+ <para style="P1" leftIndent="15" bulletIndent="0">
+ <bullet size="8.0"><seq id="L1"/>.</bullet>
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line['name'] ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(line['amount' ]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(line['bysal']) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line['acc_no'] ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_9">[[ line['flag'] ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="60.0,167.0,84.0,82.0,145.0" style="Table6">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">Total</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_total()) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ formatLang(get_bysal_total()) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_0.30cmspace">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="269.0,269.0" style="Table7">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Yours Sincerely</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">For [[ company.name ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Authorised Signature</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_9">
+ <font color="white"> </font>
+ </para>
+ <para>
+ <seqReset id="L1"/>
+ </para>
+ </story>
+</document>
diff --git a/addons/hr_payroll/report/report_payroll_register.py b/addons/hr_payroll/report/report_payroll_register.py
new file mode 100644
index 00000000000..6ab5b0c35c9
--- /dev/null
+++ b/addons/hr_payroll/report/report_payroll_register.py
@@ -0,0 +1,72 @@
+import time
+import mx.DateTime
+from report import report_sxw
+from tools import amount_to_text_en
+
+class report_payroll_register(report_sxw.rml_parse):
+ def __init__(self, cr, uid, name, context):
+ super(report_payroll_register, self).__init__(cr, uid, name, context)
+
+ self.total_amount = 0.00
+ self.total_bysal = 0.00
+ self.localcontext.update({
+ 'time': time,
+ 'get_month': self.get_month,
+ 'get_no': self.get_no,
+ 'get_basic':self.get_basic,
+ 'get_other':self.get_other,
+ 'get_allow':self.get_allow,
+ 'get_grows':self.get_grows,
+ 'get_deduct':self.get_deduct,
+ 'get_net':self.get_net,
+ 'add_line':self.add_line,
+ })
+ self.no = 0
+ self.basic = 0.0
+ self.other = 0.0
+ self.allow = 0.0
+ self.grows = 0.0
+ self.deduct = 0.0
+ self.net = 0.0
+
+ def add_line(self, line):
+ self.basic += line.basic
+ self.other += line.other_pay
+ self.allow += line.allounce
+ self.grows += line.grows
+ self.deduct += line.deduction
+ self.net += line.net
+
+ def get_basic(self):
+ return self.basic
+
+ def get_other(self):
+ return self.other
+
+ def get_allow(self):
+ return self.allow
+
+ def get_grows(self):
+ return self.grows
+
+ def get_deduct(self):
+ return self.deduct
+
+ def get_net(self):
+ return self.net
+
+ def get_month(self, indate):
+ new_date = mx.DateTime.strptime(indate, '%Y-%m-%d')
+ out_date = new_date.strftime('%B')+'-'+new_date.strftime('%Y')
+ return out_date
+
+ def get_no(self):
+ self.no += 1
+ return self.no
+
+report_sxw.report_sxw(
+ 'report.hr.payroll.register.sheet',
+ 'hr.payroll.register',
+ 'hr_payroll/report/payroll_register.rml',
+ parser=report_payroll_register
+)
diff --git a/addons/hr_payroll/report/report_payslip.py b/addons/hr_payroll/report/report_payslip.py
new file mode 100755
index 00000000000..7895178de58
--- /dev/null
+++ b/addons/hr_payroll/report/report_payslip.py
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# d$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+import mx.DateTime
+from report import report_sxw
+from tools import amount_to_text_en
+
+class payslip_report(report_sxw.rml_parse):
+
+ def __init__(self, cr, uid, name, context):
+ super(payslip_report, self).__init__(cr, uid, name, context)
+ self.localcontext.update({
+ 'convert' : self.convert,
+ 'get_month' : self.get_month,
+ 'get_earnings': self.get_earnings,
+ 'get_deductions':self.get_deductions,
+ 'get_leave':self.get_leave,
+ 'get_others':self.get_others,
+ })
+
+
+ def convert(self,amount, cur):
+ amt_en = amount_to_text_en.amount_to_text(amount,'en',cur)
+ return amt_en
+
+ def get_others(self,obj):
+ res = []
+ ids = []
+ for id in range(len(obj)):
+ if obj[id].category_id.type == 'other' and obj[id].type != 'leaves':
+ ids.append(obj[id].id)
+ payslip_line = self.pool.get('hr.payslip.line')
+ if len(ids):
+ res = payslip_line.browse(self.cr, self.uid, ids)
+ return res
+
+ def get_leave(self,obj):
+ res = []
+ ids = []
+ for id in range(len(obj)):
+ if obj[id].type == 'leaves':
+ ids.append(obj[id].id)
+ payslip_line = self.pool.get('hr.payslip.line')
+ if len(ids):
+ res = payslip_line.browse(self.cr, self.uid, ids)
+ return res
+
+ def get_earnings(self,obj):
+ res = []
+ ids = []
+ for id in range(len(obj)):
+ if obj[id].category_id.type == 'allow' and obj[id].type != 'leaves':
+ ids.append(obj[id].id)
+ payslip_line = self.pool.get('hr.payslip.line')
+ if len(ids):
+ res = payslip_line.browse(self.cr, self.uid, ids)
+ return res
+
+ def get_deductions(self,obj):
+ res = []
+ ids = []
+ for id in range(len(obj)):
+ if obj[id].category_id.type == 'deduct' and obj[id].type != 'leaves':
+ ids.append(obj[id].id)
+ payslip_line = self.pool.get('hr.payslip.line')
+ if len(ids):
+ res = payslip_line.browse(self.cr, self.uid, ids)
+ return res
+
+ def get_month(self,obj):
+ res = {
+ 'mname':''
+ }
+ date = mx.DateTime.strptime(obj.date, '%Y-%m-%d')
+ res['mname']= date.strftime('%B')+"-"+date.strftime('%Y')
+ return res['mname']
+
+report_sxw.report_sxw('report.payslip.pdf', 'hr.payslip', 'hr_payroll/report/payslip.rml', parser=payslip_report)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr_payroll/report/report_year_report.rml b/addons/hr_payroll/report/report_year_report.rml
new file mode 100755
index 00000000000..74c6d347550
--- /dev/null
+++ b/addons/hr_payroll/report/report_year_report.rml
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(842.0,595.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="28.0" y1="28.0" width="786" height="539"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table4">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="12,-1" stop="12,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="13,-1" stop="13,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Table6">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Standard" fontName="Times-Roman"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text body" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Times-Roman"/>
+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
+ <paraStyle name="Drawing" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Header" fontName="Times-Roman"/>
+ <paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
+ <paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
+ <paraStyle name="Signature" fontName="Times-Roman"/>
+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Salutation" fontName="Times-Roman"/>
+ <paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Footer" fontName="Times-Roman"/>
+ <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="9.0" spaceAfter="0.0"/>
+ </stylesheet>
+ <images/>
+ <story>
+ <para style="terp_header_Centre">Yearly Salary Details </para>
+ <para style="terp_default_Centre_9">For [[ get_fiscalyear(data['form']['fiscalyear_id']) ]]</para>
+ <para style="terp_default_space">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_8">[[ repeatIn(get_periods(data['form']),'m') ]]</para>
+ <blockTable colWidths="74.0,54.0,51.0,55.0,52.0,54.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table4">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Name</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[0] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[1] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[2] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[3] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[4] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[5] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[6] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[7] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[8] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[9] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[10] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">[[ m[11] ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_Details_Right">Total</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="terp_default_9">[[ repeatIn(get_employee(data['form']),'e') ]]</para>
+ <blockTable colWidths="74.0,54.0,51.0,55.0,52.0,55.0,56.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table1">
+ <tr>
+ <td>
+ <para style="terp_default_9">[[ e[0] ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[1]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[2]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[3]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[4]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[5]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[6]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[7]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[8]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[9]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[10]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[11]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9">[[ formatLang(e[12]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_default_Right_9_Bold">[[ formatLang(e[13]) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ <section>
+ <para style="P1">[[ repeatIn(get_months_tol(),'t') ]]</para>
+ <blockTable colWidths="74.0,54.0,51.0,55.0,52.0,56.0,55.0,53.0,56.0,56.0,56.0,56.0,56.0,56.0" style="Table6">
+ <tr>
+ <td>
+ <para style="terp_tblheader_Details">Total</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[1]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[2]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[3]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[4]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[5]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[6]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[7]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[8]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[9]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[10]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[11]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(t[12]) ]]</para>
+ </td>
+ <td>
+ <para style="terp_tblheader_General_Right">[[ formatLang(get_total()) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="terp_default_1">
+ <font color="white"> </font>
+ </para>
+ </section>
+ <para style="terp_default_8">
+ <font color="white"> </font>
+ </para>
+ </story>
+</document>
diff --git a/addons/hr_payroll/report/report_year_salary.py b/addons/hr_payroll/report/report_year_salary.py
new file mode 100755
index 00000000000..1866ef795b6
--- /dev/null
+++ b/addons/hr_payroll/report/report_year_salary.py
@@ -0,0 +1,113 @@
+import time
+import locale
+import datetime
+from report import report_sxw
+import time
+import pooler
+import rml_parse
+import mx.DateTime
+from mx.DateTime import RelativeDateTime, now, DateTime, localtime
+
+class year_salary_report(rml_parse.rml_parse):
+
+ def __init__(self, cr, uid, name, context):
+ super(year_salary_report, self).__init__(cr, uid, name, context)
+ self.localcontext.update({
+ 'time': time,
+ 'get_employee' : self.get_employee,
+ 'get_periods' : self.get_periods,
+ 'get_months_tol' : self.get_months_tol,
+ 'get_fiscalyear' : self.get_fiscalyear,
+ 'get_total' : self.get_total,
+ })
+
+ self.mnths =[]
+ self.mnths_tol = []
+ self.curr_fiscal_year_name=''
+ self.total=0.0
+
+ def get_periods(self,form):
+ fiscalyear = pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
+ curr_fiscalyear_id = form['fiscalyear_id']
+ curr_fiscalyear = fiscalyear.read(self.cr,self.uid,[form['fiscalyear_id']],['date_start','date_stop'])[0]
+
+# Get start year-month-date and end year-month-date
+ fy = int(curr_fiscalyear['date_start'][0:4])
+ ly = int(curr_fiscalyear['date_stop'][0:4])
+
+ fm = int(curr_fiscalyear['date_start'][5:7])
+ lm = int(curr_fiscalyear['date_stop'][5:7])
+ no_months = (ly-fy)*12+lm-fm + 1
+ cm = fm
+ cy = fy
+
+# Get name of the months from integer
+ mnth_name = []
+ for count in range(0,no_months):
+ m = datetime.date(cy, cm, 1).strftime('%b')
+ mnth_name.append(m)
+ self.mnths.append(str(cm)+'-'+str(cy))
+ if cm == 12:
+ cm = 0
+ cy = ly
+ cm = cm +1
+ return [mnth_name]
+
+ def get_fiscalyear(self,fiscalyear_id):
+ fiscalyear_obj = pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
+ return fiscalyear_obj.read(self.cr,self.uid,[fiscalyear_id],['name'])[0]['name']
+
+
+ def get_employee(self,form):
+ ls1=[]
+ ls = []
+ periods = []
+ tol_mnths=['Total',0,0,0,0,0,0,0,0,0,0,0,0]
+ emp = pooler.get_pool(self.cr.dbname).get('hr.employee')
+ emp_ids = form['employee_ids'][0][2]
+ empll = emp.browse(self.cr,self.uid, emp_ids)
+ fiscalyear_obj = pooler.get_pool(self.cr.dbname).get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear_id'])
+ period_ids_l = fiscalyear_obj.period_ids
+ for period in period_ids_l:
+ periods.append(period.id)
+ periods_ids = ','.join(map(str, periods))
+ cnt = 1
+ for emp_id in empll:
+ ls1.append(emp_id.name)
+ tol = 0.0
+ for mnth in self.mnths:
+ if len(mnth) != 7:
+ mnth = '0' + str(mnth)
+ query = "select net from hr_payslip where employee_id = "+str(emp_id.id)+" and to_char(date,'mm-yyyy') like '%"+mnth+"%' and state = 'done' and period_id in "+"("+ periods_ids +")" +""
+ self.cr.execute(query)
+ sal = self.cr.fetchall()
+ try:
+ ls1.append(sal[0][0])
+ except:
+ ls1.append(0)
+ try:
+ tol += sal[0][0]
+ tol_mnths[cnt] = tol_mnths[cnt] + sal[0][0]
+ except:
+ tol += 0
+ cnt = cnt + 1
+ cnt = 1
+ ls1.append(tol)
+ ls.append(ls1)
+ ls1 = []
+ self.mnths_tol.append(tol_mnths)
+ return ls
+
+ def get_months_tol(self):
+ return self.mnths_tol
+
+ def get_total(self):
+ for item in self.mnths_tol:
+ for count in range(1,len(item)):
+ self.total += item[count]
+ return self.total
+
+report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report)
+
+
+
diff --git a/addons/hr_payroll/report/rml_parse.py b/addons/hr_payroll/report/rml_parse.py
new file mode 100755
index 00000000000..beeb6deae49
--- /dev/null
+++ b/addons/hr_payroll/report/rml_parse.py
@@ -0,0 +1,162 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from report import report_sxw
+import xml.dom.minidom
+import os, time
+import osv
+import re
+import tools
+import pooler
+import re
+import sys
+
+
+class rml_parse(report_sxw.rml_parse):
+ def __init__(self, cr, uid, name, context):
+ super(rml_parse, self).__init__(cr, uid, name, context=None)
+ self.localcontext.update({
+ 'comma_me': self.comma_me,
+ 'format_date': self._get_and_change_date_format_for_swiss,
+ 'strip_name' : self._strip_name,
+ 'explode_name' : self._explode_name,
+ })
+
+ def comma_me(self,amount):
+ #print "#" + str(amount) + "#"
+ if not amount:
+ amount = 0.0
+ if type(amount) is float :
+ amount = str('%.2f'%amount)
+ else :
+ amount = str(amount)
+ if (amount == '0'):
+ return ' '
+ orig = amount
+ new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
+ if orig == new:
+ return new
+ else:
+ return self.comma_me(new)
+ def _ellipsis(self, string, maxlen=100, ellipsis = '...'):
+ ellipsis = ellipsis or ''
+ try:
+ return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
+ except Exception, e:
+ return False
+ def _strip_name(self, name, maxlen=50):
+ return self._ellipsis(name, maxlen, '...')
+
+ def _get_and_change_date_format_for_swiss (self,date_to_format):
+ date_formatted=''
+ if date_to_format:
+ date_formatted = strptime (date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
+ return date_formatted
+
+ def _explode_name(self,chaine,length):
+ # We will test if the size is less then account
+ full_string = ''
+ if (len(str(chaine)) <= length):
+ return chaine
+ #
+ else:
+ chaine = unicode(chaine,'utf8').encode('iso-8859-1')
+ rup = 0
+ for carac in chaine:
+ rup = rup + 1
+ if rup == length:
+ full_string = full_string + '\n'
+ full_string = full_string + carac
+ rup = 0
+ else:
+ full_string = full_string + carac
+
+ return full_string
+
+ def makeAscii(self,str):
+ try:
+ Stringer = str.encode("utf-8")
+ except UnicodeDecodeError:
+ try:
+ Stringer = str.encode("utf-16")
+ except UnicodeDecodeError:
+ print "UTF_16 Error"
+ Stringer = str
+ else:
+ return Stringer
+ else:
+ return Stringer
+ return Stringer
+
+ def explode_this(self,chaine,length):
+ #chaine = self.repair_string(chaine)
+ chaine = rstrip(chaine)
+ ast = list(chaine)
+ i = length
+ while i <= len(ast):
+ ast.insert(i,'\n')
+ i = i + length
+ chaine = str("".join(ast))
+ return chaine
+
+ def repair_string(self,chaine):
+ ast = list(chaine)
+ UnicodeAst = []
+ _previouslyfound = False
+ i = 0
+ #print str(ast)
+ while i < len(ast):
+ elem = ast[i]
+ try:
+ Stringer = elem.encode("utf-8")
+ except UnicodeDecodeError:
+ to_reencode = elem + ast[i+1]
+ print str(to_reencode)
+ Good_char = to_reencode.decode('utf-8')
+ UnicodeAst.append(Good_char)
+ i += i +2
+ else:
+ UnicodeAst.append(elem)
+ i += i + 1
+ return "".join(UnicodeAst)
+
+ def ReencodeAscii(self,str):
+ print sys.stdin.encoding
+ try:
+ Stringer = str.decode("ascii")
+ except UnicodeEncodeError:
+ print "REENCODING ERROR"
+ return str.encode("ascii")
+ except UnicodeDecodeError:
+ print "DECODING ERROR"
+ return str.encode("ascii")
+
+ else:
+ print Stringer
+ return Stringer
+
+ def _add_header(self, node, header=1):
+ if header==2:
+ rml_head = self.rml_header2
+ else:
+ rml_head = self.rml_header
+ rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
+ return True
diff --git a/addons/hr_payroll/wizard/__init__.py b/addons/hr_payroll/wizard/__init__.py
new file mode 100755
index 00000000000..453998a44ca
--- /dev/null
+++ b/addons/hr_payroll/wizard/__init__.py
@@ -0,0 +1,3 @@
+import wizard_year_salary
+import wizard_employees_detail
+import wizard_create_analytic
diff --git a/addons/hr_payroll/wizard/wizard_create_analytic.py b/addons/hr_payroll/wizard/wizard_create_analytic.py
new file mode 100644
index 00000000000..371b0a2bda4
--- /dev/null
+++ b/addons/hr_payroll/wizard/wizard_create_analytic.py
@@ -0,0 +1,124 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# d$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import wizard
+import pooler
+
+class wizard_create_analytics(wizard.interface):
+ '''
+ OpenERP Wizard
+ '''
+ form = '''<?xml version="1.0"?>
+ <form string="Process Form">
+ <field name="company_id"/>
+ <newline/>
+ <field name="type"/>
+ </form>'''
+
+ fields = {
+ 'company_id': {'string': 'Company', 'type': 'many2one', 'relation': 'res.company'},
+ 'type': {'string':'Type', 'type':'selection', 'selection':[('bydeg','By Employee Function'), ('byallded','By Allownce / Deduction')]}
+ }
+
+ def _get_defaults(self, cr, user, data, context):
+ #TODO : initlize required data
+
+
+ return data['form']
+
+ def _do_duplicate(self, cr, uid, data, context):
+ pool = pooler.get_pool(cr.dbname)
+ account_pool = pool.get('account.analytic.account')
+ func_pool = pool.get('hr.employee.grade')
+ ad_pool = pool.get('hr.allounce.deduction.categoty')
+
+ tpy = data['form']['type']
+ company = data['form']['company_id']
+
+ function_ids = func_pool.search(cr, uid, [])
+ ad_ids = ad_pool.search(cr, uid, [])
+
+ if tpy == 'bydeg':
+ for function in func_pool.browse(cr, uid, function_ids):
+ res = {
+ 'name':function.name,
+ 'company_id':company
+ }
+ fid = account_pool.create(cr, uid, res)
+ res = {
+ 'name':'Basic Salary',
+ 'company_id':company,
+ 'parent_id': fid
+ }
+ account_pool.create(cr, uid, res)
+ for ad in ad_pool.browse(cr, uid, ad_ids):
+ res = {
+ 'name':ad.name,
+ 'company_id':company,
+ 'parent_id': fid
+ }
+ account_pool.create(cr, uid, res)
+
+
+
+ elif tpy == 'byallded':
+ res = {
+ 'name':'Basic Salary',
+ 'company_id':company
+ }
+ adid = account_pool.create(cr, uid, res)
+ for function in func_pool.browse(cr, uid, function_ids):
+ res = {
+ 'name':function.name,
+ 'company_id':company,
+ 'parent_id': adid
+ }
+ account_pool.create(cr, uid, res)
+
+ for ad in ad_pool.browse(cr, uid, ad_ids):
+ res = {
+ 'name':ad.name,
+ 'company_id':company,
+ }
+ adid = account_pool.create(cr, uid, res)
+ for function in func_pool.browse(cr, uid, function_ids):
+ res = {
+ 'name':function.name,
+ 'company_id':company,
+ 'parent_id': adid
+ }
+ account_pool.create(cr, uid, res)
+
+ return {}
+
+ states = {
+ 'init': {
+ 'actions': [_get_defaults],
+ 'result': {'type': 'form', 'arch': form, 'fields': fields, 'state': (('end', 'Cancel'), ('process', 'Process'))},
+ },
+ 'process': {
+ 'actions': [_do_duplicate],
+ 'result': {'type': 'state', 'state': 'end'},
+ },
+ }
+wizard_create_analytics('payroll.analysis')
diff --git a/addons/hr_payroll/wizard/wizard_employees_detail.py b/addons/hr_payroll/wizard/wizard_employees_detail.py
new file mode 100755
index 00000000000..707a428229e
--- /dev/null
+++ b/addons/hr_payroll/wizard/wizard_employees_detail.py
@@ -0,0 +1,60 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import wizard
+import datetime
+import pooler
+import time
+import netsvc
+
+form='''<?xml version="1.0"?>
+<form string="Year Salary">
+ <field name="fiscalyear_id" select="1" colspan="2"/>
+ <newline/>
+ <field name="employee_ids" colspan="2"/>
+ <newline/>
+</form>'''
+fields = {
+ 'fiscalyear_id':{'string': 'Fiscal Year', 'type': 'many2one', 'relation': 'account.fiscalyear', 'required': True },
+ 'employee_ids':{'string':'Employees', 'type':'many2many','relation':'hr.employee','required':True},
+ }
+
+class wizard_print(wizard.interface):
+ def _get_defaults(self, cr, uid, data, context={}):
+ fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
+ data['form']['fiscalyear_id'] = fiscalyear_obj.find(cr, uid)
+ return data['form']
+
+ states={
+ 'init':{
+ 'actions':[_get_defaults],
+ 'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
+ },
+ 'report':{
+ 'actions':[],
+ 'result':{'type':'print', 'report':'employees.salary', 'state':'end'}
+ }
+ }
+wizard_print('wizard.employees.detail')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/hr_payroll/wizard/wizard_year_salary.py b/addons/hr_payroll/wizard/wizard_year_salary.py
new file mode 100755
index 00000000000..efab1695ba1
--- /dev/null
+++ b/addons/hr_payroll/wizard/wizard_year_salary.py
@@ -0,0 +1,69 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import wizard
+import datetime
+import pooler
+import time
+import netsvc
+
+form='''<?xml version="1.0"?>
+<form string="Year Salary">
+ <field name="fiscalyear_id" select="1" colspan="2"/>
+ <newline/>
+ <field name="employee_ids" colspan="2"/>
+ <newline/>
+ <separator string="Salary Deposit Date Option?" colspan="2"/>
+ <newline/>
+ <field name="salary_on"/>
+</form>'''
+fields = {
+ 'fiscalyear_id':{'string': 'Fiscal Year', 'type': 'many2one', 'relation': 'account.fiscalyear', 'required': True },
+ 'employee_ids':{'string':'Employees', 'type':'many2many','relation':'hr.employee','required':True},
+ 'salary_on':{
+ 'string':"Salary On",
+ 'type':'selection',
+ 'selection':[('current_month','Current Month Date'),('next_month','Next Month Date')],
+ 'default': lambda *a:'current_month'
+ },
+ }
+
+class wizard_print(wizard.interface):
+ def _get_defaults(self, cr, uid, data, context={}):
+ fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
+ data['form']['fiscalyear_id'] = fiscalyear_obj.find(cr, uid)
+ return data['form']
+
+ states={
+ 'init':{
+ 'actions':[_get_defaults],
+ 'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
+ },
+ 'report':{
+ 'actions':[],
+ 'result':{'type':'print', 'report':'year.salary', 'state':'end'}
+ }
+ }
+wizard_print('wizard.year.salary')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+