[MERGE] branch merged with trunk-payroll

bzr revid: mtr@mtr-20110630115822-u0rnk1w1auk7s583
This commit is contained in:
mtr 2011-06-30 17:28:22 +05:30
commit 9dbd0df043
36 changed files with 647 additions and 4224 deletions

View File

@ -38,7 +38,7 @@ Generic Payroll system.
""",
'author':'OpenERP SA',
'website':'http://www.openerp.com',
'images': ['images/hr_company_contributions.jpeg','images/hr_salary_heads.jpeg','images/hr_salary_structure.jpeg','images/hr_employee_payslip.jpeg','images/hr_payment_advice.jpeg','images/hr_payroll_register.jpeg'],
'images': ['images/hr_company_contributions.jpeg','images/hr_salary_heads.jpeg','images/hr_salary_structure.jpeg','images/hr_employee_payslip.jpeg'],
'depends': [
'hr',
'hr_contract',
@ -56,8 +56,7 @@ Generic Payroll system.
'hr_payroll_report.xml',
'hr_payroll_data.xml',
'security/ir.model.access.csv',
'wizard/hr_payroll_employees_detail.xml',
'wizard/hr_payroll_year_salary.xml',
'wizard/hr_payroll_contribution_register_report.xml',
],
'test': [
'test/payslip.yml',

View File

@ -211,10 +211,15 @@ class hr_payslip_run(osv.osv):
'state': fields.selection([
('draft', 'Draft'),
('close', 'Close'),
], 'State', select=True, readonly=True)
], 'State', select=True, readonly=True),
'date_start': fields.date('Date From', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'date_end': fields.date('Date To', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'credit_note': fields.boolean('Credit Note', readonly=True, states={'draft': [('readonly', False)]}, help="If its checked, indicates that all payslips generated from here are refund payslips."),
}
_defaults = {
'state': 'draft',
'date_start': lambda *a: time.strftime('%Y-%m-01'),
'date_end': lambda *a: str(datetime.now() + relativedelta.relativedelta(months=+1, day=1, days=-1))[:10],
}
def draft_payslip_run(self, cr, uid, ids, context=None):
@ -309,7 +314,7 @@ class hr_payslip(osv.osv):
def hr_verify_sheet(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state': 'verify'}, context=context)
def refund_sheet(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
wf_service = netsvc.LocalService("workflow")
@ -540,7 +545,7 @@ class hr_payslip(osv.osv):
inputs = {}
for input_line in payslip.input_line_ids:
inputs[input_line.code] = input_line
categories_obj = BrowsableObject(self.pool, cr, uid, payslip.employee_id.id, categories_dict)
input_obj = InputLine(self.pool, cr, uid, payslip.employee_id.id, inputs)
worked_days_obj = WorkedDays(self.pool, cr, uid, payslip.employee_id.id, worked_days)
@ -759,21 +764,12 @@ class hr_salary_rule(osv.osv):
('fix','Fixed Amount'),
('code','Python Code'),
],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),
'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Account'),),
'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Account'), help='For example, enter 50.0 to apply a percentage of 50%'),
'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),),
'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll'), help='For example, enter 50.0 to apply a percentage of 50%'),
'amount_python_compute':fields.text('Python Code'),
'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),
'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),
'register_id':fields.property(
'hr.contribution.register',
type='many2one',
relation='hr.contribution.register',
string="Contribution Register",
method=True,
view_load=True,
help="Contribution register based on company",
required=False
),
'register_id':fields.many2one('hr.contribution.register', 'Contribution Register', help="Contribution register for the rule"),
'input_ids': fields.one2many('hr.rule.input', 'input_id', 'Inputs'),
'note':fields.text('Description'),
}
@ -785,7 +781,7 @@ class hr_salary_rule(osv.osv):
# employee: hr.employee object
# contract: hr.contract object
# rules: object containing the rules code (previously computed)
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# worked_days: object containing the computed worked days.
# inputs: object containing the computed inputs.
@ -800,7 +796,7 @@ result = contract.wage * 0.10''',
# employee: hr.employee object
# contract: hr.contract object
# rules: object containing the rules code (previously computed)
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# worked_days: object containing the computed worked days
# inputs: object containing the computed inputs
@ -920,10 +916,10 @@ class hr_payslip_line(osv.osv):
'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),
'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
'contract_id':fields.many2one('hr.contract', 'Contract', required=True),
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account')),
'company_contrib': fields.float('Company Contribution', readonly=True, digits_compute=dp.get_precision('Account')),
'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Account'),store=True ),
'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')),
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')),
'company_contrib': fields.float('Company Contribution', readonly=True, digits_compute=dp.get_precision('Payroll')),
'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ),
}
hr_payslip_line()
@ -965,7 +961,7 @@ class hr_employee(osv.osv):
_columns = {
'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
'total_wage': fields.function(_calculate_total_wage, method=True, type='float', string='Total Basic Salary', digits_compute=dp.get_precision('Account'), help="Sum of all current contract's wage of employee."),
'total_wage': fields.function(_calculate_total_wage, method=True, type='float', string='Total Basic Salary', digits_compute=dp.get_precision('Payroll'), help="Sum of all current contract's wage of employee."),
}
hr_employee()

View File

@ -72,5 +72,12 @@
<field name="company_id" ref="base.main_company"/>
</record>
<!-- Decimal Precision -->
<record forcecreate="True" id="decimal_payroll" model="decimal.precision">
<field name="name">Payroll</field>
<field name="digits">2</field>
</record>
</data>
</openerp>

View File

@ -18,5 +18,14 @@
rml="hr_payroll/report/report_payslip_details.rml"
string="PaySlip Details" />
<report
auto="False"
menu="False"
id="contribution_register"
model="hr.contribution.register"
name="contribution.register.lines"
rml="hr_payroll/report/report_contribution_register.rml"
string="PaySlip Lines By Conribution Register" />
</data>
</openerp>

View File

@ -1,6 +1,7 @@
<?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>
@ -11,27 +12,6 @@
<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>

View File

@ -141,7 +141,7 @@
<field name="sequence" groups="base.group_extended"/>
<field name="name"/>
<field name="code"/>
<field name="quantity"/>
<field name="quantity" string="Quantity/Rate"/>
<field name="amount"/>
<field name="total"/>
</tree>
@ -238,7 +238,7 @@
<field name="struct_id" groups="base.group_extended" attrs="{'required':[('contract_id','&lt;&gt;',False)]}"/>
<field name="date_to"/>
<field name="name" colspan="4"/>
<field name="credit_note" readonly="1"/>
<field name="credit_note"/>
</group>
<notebook colspan="4">
<page string="Salary Computation" >
@ -248,7 +248,7 @@
<field name="code"/>
<field name="category_id"/>
<field name="sequence" invisible="1"/>
<field name="quantity"/>
<field name="quantity" string="Quantity/Rate"/>
<field name="amount"/>
<field name="total"/>
</tree>
@ -258,7 +258,7 @@
<field name="code" select="1"/>
<field name="category_id"/>
<field name="sequence" groups="base.group_extended"/>
<field name="quantity"/>
<field name="quantity" string="Quantity/Rate"/>
<field name="amount"/>
<field name="total"/>
<field name="salary_rule_id" groups="base.group_extended"/>
@ -277,7 +277,7 @@
</field>
</page>
<page string="Worked Days">
<page string="Worked Days &amp; Inputs">
<field name="worked_days_line_ids" colspan="4" nolabel="1">
<tree string="Worked Days" editable="bottom">
<field name="name"/>
@ -635,6 +635,8 @@
<field name="arch" type="xml">
<search string="Search Payslips Group">
<field name="name"/>
<field name="date_start"/>
<field name="date_end"/>
</search>
</field>
</record>
@ -646,6 +648,8 @@
<field name="arch" type="xml">
<tree string="Payslips Run">
<field name="name"/>
<field name="date_start"/>
<field name="date_end"/>
</tree>
</field>
</record>
@ -656,15 +660,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payslips Run">
<group col="6" colspan="6">
<field name="name"/>
<group col="6" colspan="4">
<field name="name" colspan="4"/>
<field name="credit_note"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<notebook colspan="6">
<notebook colspan="4">
<page string="Payslips">
<field name="slip_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
<group col="6" colspan="6">
<group col="6" colspan="4">
<field name="state"/>
<button name="%(action_hr_payslip_by_employees)d" type="action" states="draft" icon="gtk-execute" string="Generate Payslips" />
<button name="close_payslip_run" type="object" icon="gtk-jump-to" string="Close" states="draft"/>

View File

@ -1,29 +0,0 @@
<?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="Salary Register"/>
<menuitem id="menu_wizard_print_year_salary"
icon="STOCK_PRINT"
action="wizard_print_year_salary"
parent="menu_hr_payroll_reporting"
name="Salary Register"
type="wizard"/>
<wizard id="wizard_print_employees_detail"
menu="False"
model="hr.payslip"
name="wizard.employees.detail"
string="Employee Salary Statement"/>
<menuitem id="menu_wizard_print_employees_detail"
icon="STOCK_PRINT"
action="wizard_print_employees_detail"
parent="menu_hr_payroll_reporting"
name="Employee Salary Statement"
type="wizard"/>
</data>
</openerp>

View File

@ -24,10 +24,6 @@
import report_payslip
import report_payslip_details
import report_payroll_advice
import report_year_salary
import report_payroll_register
import report_employees_detail
import report_emp_salary_structure
import report_contribution_register
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,262 +0,0 @@
<?xml version="1.0"?>
<document filename="Salary Payment Register.pdf">
<template pageSize="(595.0,842.0)" title="Salary Payment Register" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="33.0" y1="30.0" width="529" height="782"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<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="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-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"/>
</blockTableStyle>
<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica" fontSize="6.0" leading="8"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Contents" fontName="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" 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="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10"/>
<paraStyle name="terp_header_center" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8_center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="terp_default_9_bold_center" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="terp_default_9_center" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="terp_tblheader_general" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="terp_tblheader_details_center" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tbleheader_details_right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_right" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="terp_default_9_bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT"/>
<images/>
</stylesheet>
<story>
<pto>
<pto_header>
<blockTable colWidths="26.0,106.0,66.0,66.0,66.0,66.0,66.0,66.0" style="Table6">
<tr>
<td>
<para style="terp_tblheader_details_center">#</para>
</td>
<td>
<para style="terp_tblheader_details">Employee Name</para>
</td>
<td>
<para style="terp_tbleheader_details_right">Basic</para>
</td>
<td>
<para style="terp_tbleheader_details_right">Others </para>
</td>
<td>
<para style="terp_tbleheader_details_right">Allowances </para>
</td>
<td>
<para style="terp_tbleheader_details_right">Gross Sal.</para>
</td>
<td>
<para style="terp_tbleheader_details_right">Deduction </para>
</td>
<td>
<para style="terp_tbleheader_details_right">Net Sal.</para>
</td>
</tr>
</blockTable>
</pto_header>
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
<para style="terp_header_center">Salary Payment Register</para>
<para style="terp_default_9_bold_center">[[o.name]]</para>
<para style="terp_default_8_center">For the month of [[get_month(o.date)]]</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_tblheader_general">Number : <font face="Helvetica">[[o.number]]</font></para>
<para style="terp_tblheader_general">Date : <font face="Helvetica">[[formatLang(time.strftime('%Y-%m-%d'), date = True)]]</font></para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<section>
<blockTable colWidths="26.0,106.0,66.0,66.0,66.0,66.0,66.0,66.0" style="Table6">
<tr>
<td>
<para style="terp_tblheader_details_center">#</para>
</td>
<td>
<para style="terp_tblheader_details">Employee Name</para>
</td>
<td>
<para style="terp_tbleheader_details_right">Basic</para>
</td>
<td>
<para style="terp_tbleheader_details_right">Others </para>
</td>
<td>
<para style="terp_tbleheader_details_right">Allowances </para>
</td>
<td>
<para style="terp_tbleheader_details_right">Gross Sal.</para>
</td>
<td>
<para style="terp_tbleheader_details_right">Deduction </para>
</td>
<td>
<para style="terp_tbleheader_details_right">Net Sal.</para>
</td>
</tr>
</blockTable>
</section>
<section>
<para style="terp_default_9">[[repeatIn(o.line_ids, 'l')]]</para>
<blockTable colWidths="26.0,106.0,66.0,66.0,66.0,66.0,66.0,66.0" style="Table1">
<tr>
<td>
<para style="terp_default_8">[[ get_no() ]]</para>
</td>
<td>
<para style="terp_default_8">[[ l.employee_id.name ]]</para>
</td>
<td>
<para style="terp_default_9_right">[[ formatLang(l.basic, dp='Account') ]] [[ company.currency_id.symbol]] </para>
</td>
<td>
<para style="terp_default_9_right">[[ formatLang(l.other_pay, dp='Account')]] [[ company.currency_id.symbol]] </para>
</td>
<td>
<para style="terp_default_9_right">[[ formatLang(l.allounce, dp='Account')]] [[ company.currency_id.symbol]] </para>
</td>
<td>
<para style="terp_default_9_right">[[ formatLang(l.grows, dp='Account')]] [[ company.currency_id.symbol]] </para>
</td>
<td>
<para style="terp_default_9_right">[[ formatLang(l.deduction, dp='Account')]] [[ company.currency_id.symbol]] </para>
</td>
<td>
<para style="terp_default_9_right">[[ formatLang(l.net, dp='Account')]] [[ company.currency_id.symbol]] </para>
</td>
</tr>
</blockTable>
</section>
<blockTable colWidths="26.0,106.0,66.0,66.0,66.0,66.0,66.0,66.0" style="Table4">
<tr>
<td>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_tblheader_details">Total Salary</para>
</td>
<td>
<para style="terp_tbleheader_details_right">[[formatLang(get_basic(o), dp='Account')]][[ company.currency_id.symbol]] </para>
</td>
<td>
<para style="terp_tbleheader_details_right">[[formatLang(get_other(o), dp='Account')]] [[ company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tbleheader_details_right">[[formatLang(get_allow(o), dp='Account')]] [[ company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tbleheader_details_right">[[formatLang(get_grows(o), dp='Account')]] [[ company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tbleheader_details_right">[[formatLang(get_deduct(o), dp='Account')]] [[ company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tbleheader_details_right">[[formatLang(get_net(o), dp='Account')]] [[ company.currency_id.symbol]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="265.0,265.0" style="Table5">
<tr>
<td>
<para style="terp_default_9_bold">For [[company.name]],</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_9_bold">HR Manager</para>
<para style="terp_default_8">Authorised Signature</para>
</td>
<td>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</pto>
</story>
</document>

View File

@ -1,584 +0,0 @@
<?xml version="1.0"?>
<document filename="Pay Slip.pdf">
<template pageSize="(595.0,842.0)" title="Pay Slip" author="OpenERP S.A.(sales@openerp.com)" 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="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="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="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="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="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Contents" fontName="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" 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="Helvetica" 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"/>
<images/>
</stylesheet>
<story>
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
<blockTable colWidths="539.0" style="Table2">
<tr>
<td>
<para style="terp_header_Centre">Pay Slip </para>
<para style="terp_default_Centre_9">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="42.0,207.0,93.0,197.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_Bold_9">[[o.employee_id.name]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="42.0,497.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="42.0,207.0,93.0,197.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="42.0,208.0,93.0,197.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">Identification No</para>
</td>
<td>
<para style="terp_default_9">[[ o.employee_id.passport_id and o.employee_id.passport_id.name or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="42.0,208.0,93.0,197.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">Designation </para>
</td>
<td>
<para style="terp_default_9">[[ o.employee_id.contract_id and o.employee_id.contract_id.job_id.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">[[ formatLang(o.contract_id.wage, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] </para>
</td>
<td>
<para style="terp_default_Bold_9">Leaved Deduction</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(o.leaves, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] </para>
</td>
<td>
<para style="terp_default_Bold_9">Basic Salary Leaves</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(o.basic, dp='Account') ]] [[ o.company_id.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="539.0" style="Table12">
<tr>
<td>
<para style="terp_default_Bold_9">Leave Deductions Line:</para>
</td>
</tr>
</blockTable>
<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>
<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, dp='Account') ]] [[ o.company_id.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
<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>
<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, dp='Account') ]] [[ o.company_id.currency_id.symbol ]]</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9">[[repeatIn(get_earnings(o.line_ids),'a') ]] [[ a.code ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(a.total, dp='Account') ]] [[ o.company_id.currency_id.symbol ]]</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, dp='Account') ]] [[ o.company_id.currency_id.symbol ]]</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>
<blockTable colWidths="181.0,88.0,177.0,93.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Total Earnings<font face="Helvetica" size="7.0">([[ o.company_id and o.company_id.currency_id.symbol or '' ]])</font></para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(o.allounce + o.basic, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] </para>
</td>
<td>
<para style="terp_tblheader_Details">Total Deductions<font face="Helvetica" size="7.0">([[ o.company_id and o.company_id.currency_id.symbol or '' ]])</font></para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(o.deduction, dp='Account') ]] [[ o.company_id.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_space">
<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<font face="Helvetica" size="7.0">([[ o.company_id and o.company_id.currency_id.symbol or '' ]])</font></para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(o.net, dp='Account') ]] [[ o.company_id.currency_id.symbol ]]</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="terp_default_8">
<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>

View File

@ -0,0 +1,74 @@
#!/usr/bin/env python
#-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 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 Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from datetime import datetime
from dateutil import relativedelta
from report import report_sxw
class contribution_register_report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(contribution_register_report, self).__init__(cr, uid, name, context)
self.localcontext.update({
'get_payslip_lines': self._get_payslip_lines,
'sum_total': self.sum_total,
})
def set_context(self, objects, data, ids, report_type=None):
self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
self.date_to = data['form'].get('date_to', str(datetime.now() + relativedelta.relativedelta(months=+1, day=1, days=-1))[:10])
return super(contribution_register_report, self).set_context(objects, data, ids, report_type=report_type)
def sum_total(self):
return self.regi_total
def _get_payslip_lines(self, obj):
payslip_obj = self.pool.get('hr.payslip')
payslip_line = self.pool.get('hr.payslip.line')
payslip_lines = []
res = []
self.regi_total = 0.0
self.cr.execute("SELECT pl.id from hr_payslip_line as pl "\
"LEFT JOIN hr_payslip AS hp on (pl.slip_id = hp.id) "\
"WHERE (hp.date_from >= %s) AND (hp.date_to <= %s) "\
"AND pl.register_id = %s "\
"ORDER BY pl.slip_id, pl.sequence",
(self.date_from, self.date_to, obj.id))
payslip_lines = [x[0] for x in self.cr.fetchall()]
for line in payslip_line.browse(self.cr, self.uid, payslip_lines):
res.append({
'payslip_name': line.slip_id.name,
'name': line.name,
'code': line.code,
'quantity': line.quantity,
'amount': line.amount,
'total': line.total,
})
self.regi_total += line.total
return res
report_sxw.report_sxw('report.contribution.register.lines', 'hr.contribution.register', 'hr_payroll/report/report_contribution_register.rml', parser=contribution_register_report)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,234 @@
<?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="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="LINEAFTER" 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"/>
</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="LINEAFTER" 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"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<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"/>
</blockTableStyle>
<blockTableStyle id="Table16">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" rightIndent="-56.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P12" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P15" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" fontName="Helvetica" fontSize="2.0" leading="3"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<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="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"/>
<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_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_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_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_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="Table Contents" fontName="Helvetica"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" 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_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
<paraStyle name="payslip_adj" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
<para style="P1">[[repeatIn(objects,'o')]]</para>
<blockTable colWidths="539.0" style="Table1">
<tr>
<td>
<para style="P6">PaySlip Lines by Contribution Register</para>
</td>
</tr>
</blockTable>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P5">
<font color="white"> </font>
</para>
<para style="P16"/>
<blockTable colWidths="254.0,143.0,141.0" style="Table3">
<tr>
<td>
<para style="P17">Register Name</para>
</td>
<td>
<para style="P13">Date From</para>
</td>
<td>
<para style="P14">Date To</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="254.0,143.0,141.0" style="Table4">
<tr>
<td>
<para style="P4">[[ o.name or '']]</para>
</td>
<td>
<para style="P4">[[ data['form']['date_from'] or '']]</para>
</td>
<td>
<para style="P4">[[ data['form']['date_to'] or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_Bold_8"/>
<para style="terp_default_Bold_8">
<font color="white"> </font>
</para>
<para style="P8">
<font color="white"> </font>
</para>
<blockTable colWidths="194.0,35.0,126.0,72.0,43.0,69.0" style="Table2">
<tr>
<td>
<para style="P9">PaySlip Name</para>
</td>
<td>
<para style="P9">Code</para>
</td>
<td>
<para style="P9">Name</para>
</td>
<td>
<para style="P9">Quantity/Rate</para>
</td>
<td>
<para style="P9">Amount</para>
</td>
<td>
<para style="P10">Total </para>
</td>
</tr>
</blockTable>
<para style="P18">
<font color="white"> </font>
</para>
<section>
<para style="P2">[[repeatIn(get_payslip_lines(o),'r') ]]</para>
<blockTable colWidths="194.0,35.0,126.0,72.0,43.0,68.0" style="Table16">
<tr>
<td>
<para style="P12">[[ r.get('payslip_name', False) ]]<font face="Helvetica">[[ r.get('payslip_name', False) and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]]</font></para>
</td>
<td>
<para style="P2">[[ r['code'] ]]</para>
</td>
<td>
<para style="P2">[[ r['name'] ]]</para>
</td>
<td>
<para style="P2">[[ formatLang(r['quantity']) ]]</para>
</td>
<td>
<para style="P2">[[ formatLang(r['amount']) ]]</para>
</td>
<td>
<para style="P3">[[ formatLang(r['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']]</para>
</td>
</tr>
</blockTable>
</section>
<blockTable colWidths="397.0,31.0,111.0" style="Table5">
<tr>
<td>
<para style="P15">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P15">Total:</para>
</td>
<td>
<para style="P11">[[ formatLang(abs(sum_total())) ]] [[o.company_id and o.company_id.currency_id.symbol or '']]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,98 +0,0 @@
#!/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 Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
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,
'get_line_amount_symbol':self.get_line_amount_symbol
})
# def get_contract(self,emp):
# curr_date = "'"+time.strftime("%Y-%m-%d")+"'"
# sql_req= '''
# SELECT c.id as id, c.wage as wage, struct_id as struct
# 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_amount_symbol(self,amount_type):
if amount_type != 'per':
return self.pool.get('res.users').browse(self.cr, self.uid,self.uid).company_id.currency_id.symbol
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)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,578 +0,0 @@
<?xml version="1.0"?>
<document filename="Salary Structure.pdf">
<template pageSize="(595.0,842.0)" title="Salary Structure" author="OpenERP S.A.(sales@openerp.com)" 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="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="Table14">
<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="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="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"/>
</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"/>
</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"/>
</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"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" 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="15.0" leading="19" 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="Helvetica"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica"/>
<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="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" 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="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" 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"/>
<images/>
</stylesheet>
<story>
<pto>
<pto_header>
<blockTable colWidths="34.0,341.0,80.0,83.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_Right">Amount</para>
</td>
<td>
<para style="terp_tblheader_Details">Amount Type</para>
</td>
</tr>
</blockTable>
</pto_header>
<para style="terp_default_8">[[repeatIn(objects,'employee')]]</para>
<para style="terp_default_1">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_9">[[ not employee.contract_id and removeParentNode('section') ]]</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">Other No.</para>
</td>
<td>
<para style="terp_default_9">[[ employee.otherid 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">[[ employee.contract_id.job_id and employee.contract_id.job_id.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_9">
<font color="white"> </font>
</para>
<blockTable colWidths="539.0" style="Table13">
<tr>
<td>
<para style="terp_default_Bold_9">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(employee.contract_id.date_start,date=True) or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details">End Date</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(employee.contract_id.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(employee.contract_id.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(employee.contract_id.wage) or '' ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details">Notes:</para>
</td>
<td>
<para style="terp_default_9">[[ employee.contract_id.notes or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="68.0,111.0,63.0,111.0,71.0,115.0" style="Table14">
<tr>
<td>
<para style="terp_tblheader_Details">Basic</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(employee.basic) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details">Allowances</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(employee.advantages_gross) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details">Gross Salary</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(employee.gross) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="68.0,111.0,63.0,297.0" style="Table15">
<tr>
<td>
<para style="terp_tblheader_Details">Deductions</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(employee.advantages_net) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details">Net Salary</para>
</td>
<td>
<para style="terp_default_9">[[ formatLang(employee.net) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="539.0" style="Table9">
<tr>
<td>
<para style="terp_default_Bold_9">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,341.0,80.0,83.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_Right">Amount</para>
</td>
<td>
<para style="terp_tblheader_Details">Amount Type</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_9">[[repeatIn(employee.contract_id.struct_id and employee.contract_id.struct_id.line_ids or [],'line')]]</para>
<blockTable colWidths="34.0,340.0,80.0,84.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_Right_9">[[ line.amount_type =='per' and formatLang(line.amount*100) or formatLang(line.amount)]] [[ get_line_amount_symbol(line.amount_type) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ get_line_amount_type(line.amount_type) ]]</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_9">
<font color="white"> </font>
</para>
<blockTable colWidths="539.0" style="Table10">
<tr>
<td>
<para style="terp_default_Bold_9">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,338.0,82.0,84.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_Right">Amount</para>
</td>
<td>
<para style="terp_tblheader_Details">Amount Type</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,338.0,81.0,86.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_Right_9">[[ line1.amount_type =='per' and formatLang(line1.amount*100) or formatLang(line1.amount) ]] [[ get_line_amount_symbol(line1.amount_type) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ get_line_amount_type(line1.amount_type) ]]</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>
</pto>
</story>
</document>

View File

@ -1,252 +0,0 @@
#!/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 Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import locale
import datetime
from report import report_sxw
import time
import pooler
class employees_salary_report(report_sxw.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_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.total=0.00
def get_periods(self,form):
self.mnths =[]
# Get start year-month-date and end year-month-date
fy = int(form['date_from'][0:4])
ly = int(form['date_to'][0:4])
fm = int(form['date_from'][5:7])
lm = int(form['date_to'][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
for c in range(0,(12-no_months)):
mnth_name.append('None')
self.mnths.append('None')
return [mnth_name]
def get_employee(self,form):
result = []
periods = []
emp = pooler.get_pool(self.cr.dbname).get('hr.employee')
emp_ids = form['employee_ids']
result = emp.browse(self.cr,self.uid, emp_ids)
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','=','allowance')])
deduction_cat_ids = payment_category.search( self.cr, self.uid, [('type','=','deduction')])
other_cat_ids = payment_category.search( self.cr, self.uid, [('type','in',('advance','loan','installment','otherpay','otherdeduct'))])
#for Basic Salary
res = []
res = self.cal_monthly_amt(obj.id,False)
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 mnth <> 'None':
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' "
self.cr.execute(query)
payslip_id = self.cr.dictfetchone()
else:
payslip_id = False
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'] == 'allowance':
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'] == 'deduction':
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'] in ('advance','loan','installment','otherpay','otherdeduct'):
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:
if mnth == 'None':
result.append('')
res[mnth] = ''
self.month_total_list[cnt] = ''
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,header='internal landscape')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,730 +0,0 @@
<?xml version="1.0"?>
<document filename="Employees Salary Details.pdf">
<template pageSize="(842.0,595.0)" title="Employees Salary Details" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="28.0" y1="57.0" width="786" height="481"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table12">
<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="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</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="Table10">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</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="Table11">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</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"/>
<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="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Contents" fontName="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
<paraStyle name="Drawing" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Helvetica"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica"/>
<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="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" 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="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" 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"/>
<images/>
</stylesheet>
<story>
<pto>
<pto_header>
<blockTable colWidths="180.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,52.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Title</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[0] != 'None' and m[0] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[1] != 'None' and m[1] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[2] != 'None' and m[2] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[3] != 'None' and m[3] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[4] != 'None' and m[4] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[5] != 'None' and m[5] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[6] != 'None' and m[6] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[7] != 'None' and m[7] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[8] != 'None' and m[8] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[9] != 'None' and m[9] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[10] != 'None' and m[10] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[11] != 'None' and m[11] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total</para>
</td>
</tr>
</blockTable>
</pto_header>
<para style="terp_default_8">[[ repeatIn(get_employee(data['form']), 'o') ]] </para>
<blockTable colWidths="785.0" style="Table12">
<tr>
<td>
<para style="terp_header_Centre">Employees Salary Details </para>
<para style="terp_default_Centre_9">From [[ formatLang(data['form']['date_from'], date=True) ]] To [[ formatLang(data['form']['date_to'], date=True) ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_Centre_9">
<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">Other No.</para>
</td>
<td>
<para style="terp_default_9">[[ o.otherid 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].job_id.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_1">[[ repeatIn(get_periods(data['form']),'m') ]] [[ get_employee_detail(o) ]]</para>
<blockTable colWidths="180.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,52.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Title</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[0] != 'None' and m[0] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[1] != 'None' and m[1] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[2] != 'None' and m[2] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[3] != 'None' and m[3] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[4] != 'None' and m[4] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[5] != 'None' and m[5] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[6] != 'None' and m[6] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[7] != 'None' and m[7] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[8] != 'None' and m[8] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[9] != 'None' and m[9] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[10] != 'None' and m[10] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[11] != 'None' and m[11] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total</para>
</td>
</tr>
</blockTable>
<section>
<blockTable colWidths="785.0" style="Table7">
<tr>
<td>
<para style="terp_tblheader_Details">Allowances with Basic: </para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_1">[[ repeatIn(get_allow(),'e1') ]]</para>
<blockTable colWidths="180.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,52.0" style="Table6">
<tr>
<td>
<para style="terp_default_9">[[ e1[0] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[1]!='' and formatLang(e1[1])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[2]!='' and formatLang(e1[2])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[3]!='' and formatLang(e1[3])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[4]!='' and formatLang(e1[4])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[5]!='' and formatLang(e1[5])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[6]!='' and formatLang(e1[6])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[7]!='' and formatLang(e1[7])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[8]!='' and formatLang(e1[8])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[9]!='' and formatLang(e1[9])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[10]!='' and formatLang(e1[10])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[11]!='' and formatLang(e1[11])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e1[12]!='' and formatLang(e1[12])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(e1[13]) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
<blockTable colWidths="785.0" style="Table10">
<tr>
<td>
<para style="terp_tblheader_Details">Deductions: </para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_1">[[ repeatIn(get_deduct(),'e2') ]]</para>
<blockTable colWidths="180.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,52.0" style="Table8">
<tr>
<td>
<para style="terp_default_9">[[ e2[0] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[1]!='' and formatLang(e2[1])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[2]!='' and formatLang(e2[2])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[3]!='' and formatLang(e2[3])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[4]!='' and formatLang(e2[4])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[5]!='' and formatLang(e2[5])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[6]!='' and formatLang(e2[6])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[7]!='' and formatLang(e2[7])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[8]!='' and formatLang(e2[8])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[9]!='' and formatLang(e2[9])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[10]!='' and formatLang(e2[10])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[11]!='' and formatLang(e2[11])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e2[12]!='' and formatLang(e2[12])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(e2[13]) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
<blockTable colWidths="785.0" style="Table11">
<tr>
<td>
<para style="terp_tblheader_Details">Others: </para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_1">[[ repeatIn(get_other(),'e3') ]]</para>
<blockTable colWidths="180.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,52.0" style="Table9">
<tr>
<td>
<para style="terp_default_9">[[ e3[0] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[1]!='' and formatLang(e3[1])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[2]!='' and formatLang(e3[2])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[3]!='' and formatLang(e3[3])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[4]!='' and formatLang(e3[4])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[5]!='' and formatLang(e3[5])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[6]!='' and formatLang(e3[6])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[7]!='' and formatLang(e3[7])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[8]!='' and formatLang(e3[8])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[9]!='' and formatLang(e3[9])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[10]!='' and formatLang(e3[10])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[11]!='' and formatLang(e3[11])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e3[12]!='' and formatLang(e3[12])) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(e3[13]) ]] [[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
</section>
<blockTable colWidths="180.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,46.0,52.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], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[2], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[3], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[4], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[5], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[6], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[7], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[8], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[9], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[10], dp='Account']) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[11], dp='Account']) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[12], dp='Account']) or removeParentNode('para') ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(get_total(), dp='Account') ]][[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
</section>
</pto>
</story>
</document>

View File

@ -1,81 +0,0 @@
#!/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 Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from datetime import 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 = 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)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,364 +0,0 @@
<?xml version="1.0"?>
<document filename="Payment Advice.pdf">
<template pageSize="(595.0,842.0)" title="Payment Advice" author="OpenERP S.A.(sales@openerp.com)" 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"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
</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"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica"/>
<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="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" 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="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<images/>
</stylesheet>
<story>
<pto>
<pto_header>
<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 Salary</para>
</td>
<td>
<para style="terp_tblheader_Details">Bank Account</para>
</td>
<td>
<para style="terp_tblheader_Details">D/C</para>
</td>
</tr>
</blockTable>
</pto_header>
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
<blockTable colWidths="269.0,269.0" style="Table1">
<tr>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Right_9">
<font color="white"> </font>
</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">[[ o.bank_id and o.bank_id.name or '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">Payment Advice: [[ o.name ]] for period [[ get_month(o.date)['mname'] ]]</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 Salary</para>
</td>
<td>
<para style="terp_tblheader_Details">Bank Account</para>
</td>
<td>
<para style="terp_tblheader_Details">D/C</para>
</td>
</tr>
</blockTable>
<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><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'], dp='Account') ]] [[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['bysal'], dp='Account') ]] [[ company.currency_id.symbol ]]</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>
</section>
<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(), dp='Account') ]] [[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(get_bysal_total(), dp='Account') ]] [[ company.currency_id.symbol ]]</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>
</pto>
</story>
</document>

View File

@ -1,109 +0,0 @@
#!/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 Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from datetime import datetime
from report import report_sxw
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,obj):
for line in obj.line_ids:
self.basic += line.basic
return self.basic
def get_other(self,obj):
for line in obj.line_ids:
self.other += line.other_pay
return self.other
def get_allow(self,obj):
for line in obj.line_ids:
self.allow += line.allounce
return self.allow
def get_grows(self,obj):
for line in obj.line_ids:
self.grows += line.grows
return self.grows
def get_deduct(self,obj):
for line in obj.line_ids:
self.deduct += line.deduction
return self.deduct
def get_net(self,obj):
for line in obj.line_ids:
self.net += line.net
return self.net
def get_month(self, indate):
new_date = 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
)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -93,30 +93,23 @@
<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="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<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"/>
</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="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table13">
<blockAlignment value="LEFT"/>
@ -133,21 +126,14 @@
<paraStyle name="P6" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<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" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P21" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P22" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P23" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P15" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
@ -190,20 +176,20 @@
<blockTable colWidths="63.0,206.0,89.0,181.0" style="Table2">
<tr>
<td>
<para style="P18">Name</para>
<para style="P15">Name</para>
</td>
<td>
<para style="P18">[[o.employee_id.name]]</para>
<para style="P15">[[o.employee_id.name]]</para>
</td>
<td>
<para style="P18">Designation </para>
<para style="P15">Designation </para>
</td>
<td>
<para style="P4">[[ o.employee_id.job_id.name or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="63.0,475.0" style="Table3">
<blockTable colWidths="63.0,476.0" style="Table3">
<tr>
<td>
<para style="terp_default_Bold_8">
@ -218,7 +204,7 @@
<blockTable colWidths="63.0,206.0,89.0,181.0" style="Table4">
<tr>
<td>
<para style="P18">Email</para>
<para style="P15">Email</para>
</td>
<td>
<para style="P4">[[ o.employee_id.work_email or '' ]]</para>
@ -233,26 +219,26 @@
</td>
</tr>
</blockTable>
<blockTable colWidths="63.0,205.0,89.0,181.0" style="Table5">
<blockTable colWidths="63.0,206.0,89.0,181.0" style="Table5">
<tr>
<td>
<para style="P18">Reference</para>
<para style="P15">Reference</para>
</td>
<td>
<para style="P4">[[ o.number or '' ]]</para>
</td>
<td>
<para style="P18">Bank Account</para>
<para style="P15">Bank Account</para>
</td>
<td>
<para style="P4">[[ o.employee_id.otherid or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="63.0,205.0,89.0,181.0" style="Table6">
<blockTable colWidths="63.0,206.0,89.0,181.0" style="Table6">
<tr>
<td>
<para style="P18">Date From</para>
<para style="P15">Date From</para>
</td>
<td>
<para style="P4">[[ o.date_from or '']]</para>
@ -271,32 +257,28 @@
<font color="white"> </font>
</para>
<para style="P6"/>
<blockTable colWidths="539.0" style="Table7">
<blockTable colWidths="67.0,218.0,88.0,85.0,81.0" style="Table8">
<tr>
<td>
<para style="P9">Payslip Lines: </para>
<para style="P13">Code</para>
</td>
<td>
<para style="P13">Name</para>
</td>
<td>
<para style="P13">Quantity/Rate</para>
</td>
<td>
<para style="P13">Amount</para>
</td>
<td>
<para style="P14">Total</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="54.0,387.0,97.0" style="Table8">
<tr>
<td>
<para style="P14">Code</para>
</td>
<td>
<para style="P14">Name</para>
</td>
<td>
<para style="P15">Amount (in [[o.company_id and o.company_id.currency_id.symbol or '']])</para>
</td>
</tr>
</blockTable>
<para style="P11">
<font color="white"> </font>
</para>
<section>
<para style="P4">[[repeatIn(get_payslip_lines(o.line_ids),'p') ]]</para>
<blockTable colWidths="54.0,387.0,97.0" style="Table9">
<blockTable colWidths="67.0,218.0,88.0,85.0,81.0" style="Table9">
<tr>
<td>
<para style="P4">[[ p.code ]]</para>
@ -305,18 +287,21 @@
<para style="P4">[[ p.name ]]</para>
</td>
<td>
<para style="P5">[[ p.total or '0.0']]</para>
<para style="P4">[[ formatLang(p.quantity) ]]</para>
</td>
<td>
<para style="P4">[[ formatLang(p.amount) ]]</para>
</td>
<td>
<para style="P5">[[ formatLang(p.total) ]] [[o.company_id and o.company_id.currency_id.symbol or '']]</para>
</td>
</tr>
</blockTable>
<para style="P12">
<font color="white"> </font>
</para>
</section>
<para style="P23">
<para style="P10">
<font color="white"> </font>
</para>
<para style="P22">
<para style="P16">
<font color="white"> </font>
</para>
<para style="P6">
@ -333,16 +318,16 @@
</para>
</td>
<td>
<para style="P13">
<para style="P12">
<font color="white"> </font>
</para>
<para style="P13">
<para style="P12">
<font color="white"> </font>
</para>
<para style="P13">
<para style="P12">
<font color="white"> </font>
</para>
<para style="P13">Authorized Signature </para>
<para style="P12">Authorized Signature </para>
</td>
</tr>
</blockTable>

View File

@ -97,13 +97,19 @@ class payslip_details_report(report_sxw.rml_parse):
result.setdefault(obj[id].register_id.name, [])
result[obj[id].register_id.name].append(obj[id].id)
for key, value in result.iteritems():
register_total = 0
for line in payslip_line.browse(self.cr, self.uid, value):
register_total += line.total
res.append({
'register_name': key,
'total': register_total,
})
for line in payslip_line.browse(self.cr, self.uid, value):
res.append({
'name': line.name,
'code': line.code,
'quantity': line.quantity,
'amount': line.amount,
'total': line.total,
})
return res

View File

@ -100,56 +100,42 @@
<blockTableStyle id="Table11">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-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="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Table14">
<blockTableStyle id="Table8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table15">
<blockTableStyle id="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<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"/>
</blockTableStyle>
<blockTableStyle id="Table16">
<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="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<blockTableStyle id="Table13">
<blockAlignment value="LEFT"/>
@ -159,28 +145,31 @@
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica" fontSize="2.0" leading="3"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="2.0" leading="3"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="2.0" leading="3"/>
<paraStyle name="P3" rightIndent="-56.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" rightIndent="-56.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" rightIndent="-56.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P16" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
<paraStyle name="P18" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P21" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P22" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P23" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
<paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT"/>
<paraStyle name="P20" fontName="Helvetica" fontSize="2.0" leading="3"/>
<paraStyle name="P21" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P22" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P23" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P24" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P25" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P26" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
@ -196,7 +185,7 @@
<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_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_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_10" 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_10" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Table Contents" fontName="Helvetica"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" 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"/>
@ -206,11 +195,11 @@
<images/>
</stylesheet>
<story>
<para style="P4">[[repeatIn(objects,'o')]]</para>
<para style="P3">[[repeatIn(objects,'o')]]</para>
<blockTable colWidths="539.0" style="Table1">
<tr>
<td>
<para style="P9">Pay Slip Details</para>
<para style="P8">Pay Slip Details</para>
</td>
</tr>
</blockTable>
@ -220,24 +209,24 @@
<font face="Helvetica" size="14.0"/>
<font face="Helvetica-Bold" size="14.0">Note</font>
</para>
<para style="P10">([[o.name or removeParentNode('para') ]])</para>
<para style="P9">([[o.name or removeParentNode('para')]])</para>
<blockTable colWidths="63.0,206.0,89.0,181.0" style="Table2">
<tr>
<td>
<para style="P19">Name</para>
<para style="P16">Name</para>
</td>
<td>
<para style="P19">[[o.employee_id.name]]</para>
<para style="P16">[[o.employee_id.name]]</para>
</td>
<td>
<para style="P19">Designation </para>
<para style="P16">Designation </para>
</td>
<td>
<para style="P6">[[ o.employee_id.job_id.name or '' ]]</para>
<para style="P5">[[ o.employee_id.job_id.name or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="63.0,475.0" style="Table3">
<blockTable colWidths="63.0,476.0" style="Table3">
<tr>
<td>
<para style="terp_default_Bold_8">
@ -245,17 +234,17 @@
</para>
</td>
<td>
<para style="P6">[[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>
<para style="P5">[[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="63.0,206.0,89.0,181.0" style="Table4">
<tr>
<td>
<para style="P19">Email</para>
<para style="P16">Email</para>
</td>
<td>
<para style="P6">[[ o.employee_id.work_email or '' ]]</para>
<para style="P5">[[ o.employee_id.work_email or '' ]]</para>
</td>
<td>
<para style="terp_default_Bold_8">
@ -263,33 +252,33 @@
</para>
</td>
<td>
<para style="P6">[[ o.employee_id.identification_id or '' ]]</para>
<para style="P5">[[ o.employee_id.identification_id or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="63.0,205.0,89.0,181.0" style="Table5">
<blockTable colWidths="63.0,206.0,89.0,181.0" style="Table5">
<tr>
<td>
<para style="P19">Reference</para>
<para style="P16">Reference</para>
</td>
<td>
<para style="P6">[[ o.number or '' ]]</para>
<para style="P5">[[ o.number or '' ]]</para>
</td>
<td>
<para style="P19">Bank Account</para>
<para style="P16">Bank Account</para>
</td>
<td>
<para style="P6">[[ o.employee_id.otherid or '' ]]</para>
<para style="P5">[[ o.employee_id.otherid or '' ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="63.0,205.0,89.0,181.0" style="Table6">
<blockTable colWidths="63.0,206.0,89.0,181.0" style="Table6">
<tr>
<td>
<para style="P19">Date From</para>
<para style="P16">Date From</para>
</td>
<td>
<para style="P6">[[ o.date_from or '']]</para>
<para style="P5">[[ o.date_from or '']]</para>
</td>
<td>
<para style="terp_default_Bold_8">
@ -297,37 +286,34 @@
</para>
</td>
<td>
<para style="P6">[[ o.date_to or '' ]]</para>
<para style="P5">[[ o.date_to or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="P8"/>
<para style="P13">
<para style="P7"/>
<para style="P11">
<font color="white"> </font>
</para>
<para style="P6">
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="539.0" style="Table10">
<tr>
<td>
<para style="P12">Details by Salary Rule Category: </para>
<para style="P10">Details by Salary Rule Category: </para>
</td>
</tr>
</blockTable>
<blockTable colWidths="54.0,215.0,173.0,97.0" style="Table11">
<blockTable colWidths="54.0,388.0,97.0" style="Table11">
<tr>
<td>
<para style="P17">Code</para>
<para style="P15">Code</para>
</td>
<td>
<para style="P17">Salary Rule Category</para>
<para style="P15">Salary Rule Category</para>
</td>
<td>
<para style="P17">Name</para>
</td>
<td>
<para style="P18">Amount<font face="Helvetica">(in [[o.company_id and o.company_id.currency_id.symbol or '']])</font></para>
<para style="P14">Total</para>
</td>
</tr>
</blockTable>
@ -335,69 +321,77 @@
<font color="white"> </font>
</para>
<section>
<para style="P19">[[repeatIn(get_details_by_rule_category(o.details_by_salary_rule_category),'h') ]]</para>
<blockTable colWidths="54.0,215.0,173.0,97.0" style="Table12">
<para style="P16">[[repeatIn(get_details_by_rule_category(o.details_by_salary_rule_category),'h') ]]</para>
<blockTable colWidths="54.0,388.0,97.0" style="Table12">
<tr>
<td>
<para style="P19">
<para style="P16">
<font face="Helvetica">[[ h['code'] ]]</font>
<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]]</font>
</para>
</td>
<td>
<para style="P20"><font face="Helvetica" color="white">[[ '..'*h['level'] ]]</font>[[ h['rule_category'] ]]<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]]</font></para>
<para style="P17"><font face="Helvetica" color="white">[[ '..'*h['level'] ]]</font>[[ h['rule_category'] ]]<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="P21">[[ h['name'] ]]<font face="Helvetica">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]]</font></para>
</td>
<td>
<para style="P7">[[ h['total'] ]] <font face="Helvetica" size="8.0">[[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]]</font></para>
<para style="P6">[[ formatLang(h['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] <font face="Helvetica" size="8.0">[[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]]</font></para>
</td>
</tr>
</blockTable>
</section>
<para style="P8">
<para style="P7">
<font color="white"> </font>
</para>
<condPageBreak height="2cm"/>
<blockTable colWidths="539.0" style="Table14">
<blockTable colWidths="539.0" style="Table8">
<tr>
<td>
<para style="P12">Payslip Lines by Contribution Register:</para>
<para style="P10">Payslip Lines by Contribution Register:</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="115.0,46.0,289.0,88.0" style="Table15">
<blockTable colWidths="114.0,42.0,170.0,85.0,56.0,71.0" style="Table7">
<tr>
<td>
<para style="P15">Register Name</para>
<para style="P13">Register Name</para>
</td>
<td>
<para style="P15">Code</para>
<para style="P13">Code</para>
</td>
<td>
<para style="P15">Name</para>
<para style="P13">Name</para>
</td>
<td>
<para style="P16">Amount (in [[o.company_id and o.company_id.currency_id.symbol or '']])</para>
<para style="P13">Quantity/Rate</para>
</td>
<td>
<para style="P13">Amount</para>
</td>
<td>
<para style="P14">Total</para>
</td>
</tr>
</blockTable>
<section>
<para style="P19">[[repeatIn(get_lines_by_contribution_register(o.details_by_salary_rule_category),'r')]]</para>
<blockTable colWidths="116.0,46.0,289.0,88.0" style="Table16">
<para style="P16">[[repeatIn(get_lines_by_contribution_register(o.details_by_salary_rule_category),'r') ]]</para>
<blockTable colWidths="113.0,44.0,169.0,85.0,56.0,72.0" style="Table16">
<tr>
<td>
<para style="P19">[[ r.get('register_name', False) ]]<font face="Helvetica">[[ h.get('register_name', False) and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]]</font></para>
<para style="P16">[[ r.get('register_name', False) ]]<font face="Helvetica">[[ h.get('register_name', False) and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]]</font></para>
</td>
<td>
<para style="P6">[[ r['code'] ]]</para>
<para style="P5">[[ r['code'] ]]</para>
</td>
<td>
<para style="P6">[[ r['name'] ]]</para>
<para style="P5">[[ r['name'] ]]</para>
</td>
<td>
<para style="P7">[[ r['total'] or '0.0']]</para>
<para style="P5">[[ formatLang(r['quantity']) ]]</para>
</td>
<td>
<para style="P5">[[ formatLang(r['amount']) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(r['total']) ]] [[ o.company_id and o.company_id.currency_id.symbol or '']]<font face="Helvetica">[[ r.get('register_name', False) and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font')]]</font></para>
</td>
</tr>
</blockTable>
@ -405,25 +399,25 @@
<blockTable colWidths="269.0,269.0" style="Table13">
<tr>
<td>
<para style="P6">
<para style="P5">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P14">
<para style="P12">
<font color="white"> </font>
</para>
<para style="P14">
<para style="P12">
<font color="white"> </font>
</para>
<para style="P14">
<para style="P12">
<font color="white"> </font>
</para>
<para style="P14">Authorized Signature </para>
<para style="P12">Authorized Signature </para>
</td>
</tr>
</blockTable>
<para style="P5">
<para style="P4">
<font color="white"> </font>
</para>
</story>

View File

@ -1,367 +0,0 @@
<?xml version="1.0"?>
<document filename="Yearly Salary Details.pdf">
<template pageSize="(842.0,595.0)" title="Yearly Salary Details" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="28.0" y1="57.0" width="786" height="481"/>
</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"/>
<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="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Contents" fontName="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
<paraStyle name="Drawing" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Helvetica"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica"/>
<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="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" 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="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" 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="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" 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"/>
<images/>
</stylesheet>
<story>
<pto>
<pto_header>
<blockTable colWidths="117.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,57.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Name</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[0] != 'None' and m[0] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[1] != 'None' and m[1] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[2] != 'None' and m[2] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[3] != 'None' and m[3] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[4] != 'None' and m[4] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[5] != 'None' and m[5] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[6] != 'None' and m[6] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[7] != 'None' and m[7] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[8] != 'None' and m[8] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[9] != 'None' and m[9] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[10] != 'None' and m[10] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[11] != 'None' and m[11] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total</para>
</td>
</tr>
</blockTable>
</pto_header>
<para style="terp_header_Centre">Yearly Salary Details </para>
<para style="terp_default_Centre_9">From [[ formatLang(data['form']['date_from'], date=True) ]] To [[ formatLang(data['form']['date_to'], date=True) ]]</para>
<para style="terp_default_space">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_1">[[ repeatIn(get_periods(data['form']),'m') ]]</para>
<blockTable colWidths="117.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,57.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Name</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[0] != 'None' and m[0] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[1] != 'None' and m[1] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[2] != 'None' and m[2] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[3] != 'None' and m[3] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[4] != 'None' and m[4] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[5] != 'None' and m[5] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[6] != 'None' and m[6] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[7] != 'None' and m[7] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[8] != 'None' and m[8] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[9] != 'None' and m[9] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[10] != 'None' and m[10] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ m[11] != 'None' and m[11] or '' ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_1">[[ repeatIn(get_employee(data['form']),'e') ]]</para>
<blockTable colWidths="117.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,57.0" style="Table1">
<tr>
<td>
<para style="terp_default_9">[[ e[0] ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[1]!='' and formatLang(e[1], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[2]!='' and formatLang(e[2], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[3]!='' and formatLang(e[3], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[4]!='' and formatLang(e[4], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[5]!='' and formatLang(e[5], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[6]!='' and formatLang(e[6], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[7]!='' and formatLang(e[7], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[8]!='' and formatLang(e[8], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[9]!='' and formatLang(e[9], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[10]!='' and formatLang(e[10], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[11]!='' and formatLang(e[11], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_8">
<font face="Helvetica" size="9.0">[[ (e[12]!='' and formatLang(e[12], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(e[13], dp='Account') ]] [[company.currency_id.symbol]]</para>
</td>
</tr>
</blockTable>
</section>
</section>
<section>
<para style="terp_default_1">[[ repeatIn(get_months_tol(),'t') ]]</para>
<blockTable colWidths="117.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,51.0,57.0" style="Table6">
<tr>
<td>
<para style="terp_tblheader_Details">Total</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[1], dp='Account') or removeParentNode('para') ]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[2], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[3], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[4], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[5], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[6], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[7], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[8], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[9], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[10], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[11], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(t[12], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]]</para>
</td>
<td>
<para style="terp_tblheader_General_Right">[[ formatLang(get_total(), dp='Account') ]] [[company.currency_id.symbol]]</para>
</td>
</tr>
</blockTable>
</section>
</pto>
</story>
</document>

View File

@ -1,122 +0,0 @@
#!/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 Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
from report import report_sxw
import time
import pooler
class year_salary_report(report_sxw.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_total': self.get_total,
})
self.mnths =[]
self.mnths_tol = []
self.total=0.0
def get_periods(self,form):
# Get start year-month-date and end year-month-date
fy = int(form['date_from'][0:4])
ly = int(form['date_to'][0:4])
fm = int(form['date_from'][5:7])
lm = int(form['date_to'][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
for c in range(0,(12-no_months)):
mnth_name.append('None')
self.mnths.append('None')
return [mnth_name]
def get_employee(self,form):
ls1=[]
ls = []
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']
empll = emp.browse(self.cr,self.uid, emp_ids)
cnt = 1
for emp_id in empll:
ls1.append(emp_id.name)
tol = 0.0
for mnth in self.mnths:
if mnth <> 'None':
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' "
self.cr.execute(query)
sal = self.cr.fetchall()
if sal:
ls1.append(sal[0][0])
tol += sal[0][0]
tol_mnths[cnt] = tol_mnths[cnt] + sal[0][0]
else:
ls1.append(0.00)
tol_mnths[cnt] = 0.0
else:
ls1.append('')
tol_mnths[cnt] = ''
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)):
if item[count] == '':
continue
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,header='internal landscape')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,12 +1,5 @@
-
In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure
-
!python {model: hr.employee}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-salary_structure.'+format), 'wb+').write(data)
-
Print HR Payslip
-
@ -14,28 +7,4 @@
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
-
Print Employee Salary Statement through wizard
-
!python {model: hr.payslip}: |
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_payroll_employees_detail',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
-
Print Salary Register through wizard
-
!python {model: hr.payslip}: |
import time
ctx={}
ctx.update({'model': 'hr.payslip','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_payroll_year_salary',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)

View File

@ -1,59 +0,0 @@
-
I test the 'Payment Advice' in order to check the hr_payroll in OpenERP
-
I create a new employee “Richie”
-
!record {model: hr.employee, id: hr_employee_richie0}:
address_home_id: base.res_partner_address_1
address_id: base.res_partner_address_9
birthday: '1984-05-01'
children: 0.0
contract_ids:
- advantages_gross: 0.0
advantages_net: 0.0
date_end: !eval "'%s-%s-%s' %(datetime.now().year+1,datetime.now().month,datetime.now().day)"
date_start: !eval time.strftime('%Y-%m-%d')
name: reference
wage: 5000.0
wage_type_id: hr_contract.hr_contract_monthly_gross
type_id: hr_contract.hr_contract_type_emp
country_id: base.in
department_id: hr.dep_it
gender: male
marital: hr.hr_employee_marital_status_single
name: Richie
vehicle_distance: 0.0
-
I create a new payment advice record
-
!record {model: hr.payroll.advice, id: hr_payroll_advice_advice0}:
line_ids:
- amount: 5500.0
bysal: 5000.0
employee_id: 'hr_employee_richie0'
flag: C
name: Axis Bank
name: advice1
-
I confirmed the sheet by click on "Confirm Sheet" button.
-
!python {model: hr.payroll.advice}: |
self.confirm_sheet(cr, uid, [ref("hr_payroll_advice_advice0")], {"lang": "en_US",
"active_model": "ir.ui.menu", "active_ids": [ref("hr_payroll.hr_menu_payment_advice")],
"tz": False, "active_id": ref("hr_payroll.hr_menu_payment_advice")})
-
I check that a state is "Confirm"
-
!python {model: hr.payroll.advice}: |
from tools.translate import _
advice_id=self.browse(cr, uid, ref("hr_payroll_advice_advice0"))
assert(advice_id.state == 'confirm'), _('State not changed!')
-
Print Payroll Advice
-
!python {model: hr.payroll.advice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payroll.advice').create(cr, uid, [ref('hr_payroll_advice_advice0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payroll-advice.'+format), 'wb+').write(data)

View File

@ -1,64 +0,0 @@
-
I test the 'Payroll Register' in order to check the hr_payroll in OpenERP
I create a new employee “Keith”
-
!record {model: hr.employee, id: hr_employee_keith0}:
address_home_id: base.res_partner_address_3
address_id: base.res_partner_address_9
birthday: '1984-05-01'
children: 0.0
contract_ids:
- advantages_gross: 0.0
advantages_net: 0.0
date_end: !eval "'%s-%s-%s' %(datetime.now().year+1,datetime.now().month,datetime.now().day)"
date_start: !eval time.strftime('%Y-%m-%d')
name: reference
wage: 5000.0
wage_type_id: hr_contract.hr_contract_monthly_gross
type_id: hr_contract.hr_contract_type_emp
country_id: base.in
department_id: hr.dep_it
gender: male
marital: hr.hr_employee_marital_status_single
name: Keith
vehicle_distance: 0.0
-
I create a payroll register record.
-
!record {model: hr.payroll.register, id: hr_payroll_register_payroll0}:
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d')"
line_ids:
- employee_id: hr_payroll.hr_employee_keith0
name: payroll1
-
I click on Compute button.
-
!python {model: hr.payroll.register}: |
self.compute_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
"tz": False, "active_model": "ir.ui.menu", "department_id": False, "active_ids":
[ref("hr_payroll.hr_menu_payroll_register")], "section_id": False, "active_id":
ref("hr_payroll.hr_menu_payroll_register"), })
-
Then I click on Verify Sheet button.
-
!python {model: hr.payroll.register}: |
self.verify_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
"tz": False, "active_model": "ir.ui.menu", "department_id": False, "active_ids":
[ref("hr_payroll.hr_menu_payroll_register")], "section_id": False, "active_id":
ref("hr_payroll.hr_menu_payroll_register"), })
-
I check that a state has transferred from 'Wating for Verification' to 'Wating for HR Verification'state
-
!python {model: hr.payroll.register}: |
from tools.translate import _
reg_brw=self.browse(cr, uid, ref("hr_payroll_register_payroll0"))
assert(reg_brw.state == 'hr_check'), _('State not changed!')
-
Print HR Payroll Register
-
!python {model: hr.payroll.register}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.hr.payroll.register.sheet').create(cr, uid, [ref('hr_payroll_register_payroll0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-register_report.'+format), 'wb+').write(data)

View File

@ -20,10 +20,7 @@
#
##############################################################################
import hr_payroll_employees_detail
#import hr_payroll_create_analytic
import hr_payroll_year_salary
import hr_payroll_payslips_by_employees
import hr_payroll_contribution_register_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from datetime import datetime
from dateutil import relativedelta
from osv import osv, fields
class payslip_lines_contribution_register(osv.osv_memory):
_name = 'payslip.lines.contribution.register'
_description = 'PaySlip Lines by Contribution Registers'
_columns = {
'date_from': fields.date('Date From', required=True),
'date_to': fields.date('Date To', required=True),
}
_defaults = {
'date_from': lambda *a: time.strftime('%Y-%m-01'),
'date_to': lambda *a: str(datetime.now() + relativedelta.relativedelta(months=+1, day=1, days=-1))[:10],
}
def print_report(self, cr, uid, ids, context=None):
datas = {
'ids': context.get('active_ids', []),
'model': 'hr.contribution.register',
'form': self.read(cr, uid, ids, [], context=context)[0]
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'contribution.register.lines',
'datas': datas,
}
payslip_lines_contribution_register()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_payslip_lines_contribution_register" model="ir.ui.view">
<field name="name">payslip.lines.contribution.register</field>
<field name="model">payslip.lines.contribution.register</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Contribution Register's Payslip Lines">
<group col="4" colspan="6">
<field name="date_from"/>
<newline/>
<field name="date_to"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="print_report" string="Print" colspan="1" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>
<record id="action_payslip_lines_contribution_register" model="ir.actions.act_window">
<field name="name">PaySlip Lines</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">payslip.lines.contribution.register</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record model="ir.values" id="payslip_lines_contribution_register_value">
<field name="model_id" ref="model_hr_contribution_register" />
<field name="object" eval="1" />
<field name="name">PaySlip Lines</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_payslip_lines_contribution_register'))" />
<field name="key">action</field>
<field name="model">hr.contribution.register</field>
</record>
</data>
</openerp>

View File

@ -1,74 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import fields, osv
class hr_payroll_employees_detail(osv.osv_memory):
_name ='hr.payroll.employees.detail'
_columns = {
'employee_ids': fields.many2many('hr.employee', 'payroll_emp_rel','payroll_id','emp_id', 'Employees',required=True),
'date_from': fields.date('Start Date', required=True),
'date_to': fields.date('End Date', required=True),
#'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True)
}
# def _get_fiscalyear(self, cr, uid, ids, context=None):
# if context is None:
# context = {}
# fiscal_ids = self.pool.get('account.fiscalyear').search(cr,uid,[], context=context)
# if fiscal_ids:
# return fiscal_ids[0]
# return False
_defaults = {
# 'fiscalyear_id':_get_fiscalyear,
'date_from': lambda *a: time.strftime('%Y-01-01'),
'date_to': lambda *a: time.strftime('%Y-%m-%d'),
}
def print_report(self, cr, uid, ids, context=None):
"""
To get the date and print the report
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param context: A standard dictionary
@return: return report
"""
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to'], context=context)
res = res and res[0] or {}
datas['form'] = res
datas['ids'] = res.get('employee_ids',[])
return {
'type': 'ir.actions.report.xml',
'report_name': 'employees.salary',
'datas': datas,
}
hr_payroll_employees_detail()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_hr_payroll_employees_detail" model="ir.ui.view">
<field name="name">Employee Salary Statement</field>
<field name="model">hr.payroll.employees.detail</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Year Salary">
<group col="4" colspan="4">
<group colspan="4">
<field name="date_from" colspan="2"/>
<field name="date_to" colspan="2"/>
<newline/>
<separator string="Employees" colspan="4"/>
<field name="employee_ids" nolabel="1" colspan="4" />
</group>
<newline/>
<group col="2" colspan="1">
<button icon='gtk-cancel' special="cancel"
string="Close" />
<button name="print_report" string="Print Report"
type="object" icon="gtk-print" />
</group>
</group>
</form>
</field>
</record>
<record id="action_hr_payroll_employees_detail" model="ir.actions.act_window">
<field name="name">Employee Salary Statement</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.payroll.employees.detail</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="menu_hr_payroll_employees_detail"
icon="STOCK_PRINT"
action="action_hr_payroll_employees_detail"
parent="menu_hr_payroll_reporting"
name="Employee Salary Statement"/>
</data>
</openerp>

View File

@ -33,18 +33,25 @@ class hr_payslip_employees(osv.osv_memory):
_columns = {
'employee_ids': fields.many2many('hr.employee', 'hr_employee_group_rel', 'payslip_id', 'employee_id', 'Employees'),
}
def compute_sheet(self, cr, uid, ids, context=None):
emp_pool = self.pool.get('hr.employee')
slip_pool = self.pool.get('hr.payslip')
run_pool = self.pool.get('hr.payslip.run')
slip_ids = []
if context is None:
context = {}
data = self.read(cr, uid, ids, context=context)[0]
run_data = {}
if context and context.get('active_id', False):
run_data = run_pool.read(cr, uid, context['active_id'], ['date_start', 'date_end', 'credit_note'])
from_date = run_data.get('date_start', False)
to_date = run_data.get('date_end', False)
credit_note = run_data.get('credit_note', False)
if not data['employee_ids']:
raise osv.except_osv(_("Warning !"), _("You must select employee(s) to generate payslip(s)"))
for emp in emp_pool.browse(cr, uid, data['employee_ids'], context=context):
slip_data = slip_pool.onchange_employee_id(cr, uid, [], time.strftime('%Y-%m-01'), str(datetime.now() + relativedelta.relativedelta(months=+1, day=1, days=-1))[:10], emp.id, contract_id=False, context=context)
slip_data = slip_pool.onchange_employee_id(cr, uid, [], from_date, to_date, emp.id, contract_id=False, context=context)
res = {
'employee_id': emp.id,
'name': slip_data['value'].get('name', False),
@ -52,7 +59,10 @@ class hr_payslip_employees(osv.osv_memory):
'contract_id': slip_data['value'].get('contract_id', False),
'payslip_run_id': context.get('active_id', False),
'input_line_ids': [(0, 0, x) for x in slip_data['value'].get('input_line_ids', False)],
'worked_days_line_ids': [(0, 0, x) for x in slip_data['value'].get('worked_days_line_ids', False)]
'worked_days_line_ids': [(0, 0, x) for x in slip_data['value'].get('worked_days_line_ids', False)],
'date_from': from_date,
'date_to': to_date,
'credit_note': credit_note,
}
slip_ids.append(slip_pool.create(cr, uid, res, context=context))
slip_pool.compute_sheet(cr, uid, slip_ids, context=context)
@ -60,4 +70,4 @@ class hr_payslip_employees(osv.osv_memory):
hr_payslip_employees()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -8,9 +8,9 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payslips by Employees">
<label colspan="4" nolabel="1" string="This wizard will generate payslips for all selected employee(s) based on the dates and credit note specified on Payslips Run." />
<group colspan="4" >
<separator string="Payslips by Employees" colspan="4"/>
<label colspan="4" nolabel="1" string="This wizard will generate payslips for all selected employee(s)" />
<separator string="Employees" colspan="4"/>
<newline/>
<field name="employee_ids" nolabel="1"/>
</group>

View File

@ -1,76 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import fields, osv
class hr_payroll_year_salary(osv.osv_memory):
_name = "hr.payroll.year.salary"
_columns = {
'employee_ids': fields.many2many('hr.employee', 'payroll_year_rel','payroll_year_id','emp_id', 'Employees',required=True),
'date_from': fields.date('Start Date', required=True),
'date_to': fields.date('End Date', required=True),
#'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True) ,
'salary_on': fields.selection([('current_month','Current Month Date'),('next_month','Next Month Date')],'Salary On'),
}
# def _get_fiscalyear(self, cr, uid, ids, context=None):
# if context is None:
# context = {}
# fiscal_ids=self.pool.get('account.fiscalyear').search(cr, uid, [], context=context)
# if fiscal_ids:
# return fiscal_ids[0]
# return False
_defaults = {
# 'fiscalyear_id':_get_fiscalyear,
'date_from': lambda *a: time.strftime('%Y-01-01'),
'date_to': lambda *a: time.strftime('%Y-%m-%d'),
'salary_on': 'current_month'
}
def print_report(self, cr, uid, ids, context=None):
"""
To get the date and print the report
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param context: A standard dictionary
@return: return report
"""
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to', 'salary_on'], context=context)
res = res and res[0] or {}
datas['form'] = res
datas['ids'] = res.get('employee_ids',[])
return {
'type': 'ir.actions.report.xml',
'report_name': 'year.salary',
'datas': datas,
}
hr_payroll_year_salary()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_hr_payroll_year_salary" model="ir.ui.view">
<field name="name">Salary Register</field>
<field name="model">hr.payroll.year.salary</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Year Salary">
<group col="4" colspan="4" >
<group colspan="4">
<field name="date_from" colspan="2"/>
<field name="date_to" colspan="2"/>
<newline/>
<separator string="Employees" colspan="4"/>
<field name="employee_ids" nolabel="1" colspan="4"/>
<newline/>
</group>
<newline/>
<group>
<button icon='gtk-cancel' special="cancel"
string="Close" />
<button name="print_report" string="Print Report"
type="object" icon="gtk-print" />
</group>
</group>
</form>
</field>
</record>
<record id="action_hr_payroll_year_salary" model="ir.actions.act_window">
<field name="name">Salary Register</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.payroll.year.salary</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="menu_wizard_print_year_salary"
icon="STOCK_PRINT"
action="action_hr_payroll_year_salary"
parent="menu_hr_payroll_reporting"
name="Salary Register"
/>
</data>
</openerp>