[IMP]removed . from help,removed select attribute from view and added act window for payslips of advices.

bzr revid: kbh@tinyerp.com-20120626104858-z7htwjuid3p6e7mx
This commit is contained in:
Khushboo Bhatt (Open ERP)
2012-06-26 16:18:58 +05:30
parent f7278c6baf
commit 1461900731
2 changed files with 44 additions and 23 deletions
+26 -15
View File
@@ -41,18 +41,18 @@ class hr_contract(osv.osv):
_columns = {
'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll'), help="Amount for Tax Deduction at Source"),
'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll'), help="Income from house property."),
'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll'), help="Saving income for bank account."),
'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll'), help="Other income of employee."),
'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll'), help="Stocks/equity mutual funds are sold before one year."),
'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll'), help="Stocks/equity mutual funds are kept for more than a year."),
'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll'), help="Amount of food coupon per day."),
'driver_salay': fields.boolean('Driver Salary', help=" Allowance for company provided driver."),
'house_rent_income': fields.float('House Rent Income ', digits_compute=dp.get_precision('Payroll'), help="Income from house property"),
'saving_bank_account': fields.float('Saving Bank Account Income ', digits_compute=dp.get_precision('Payroll'), help="Saving income for bank account"),
'other_income': fields.float('Other Income ', digits_compute=dp.get_precision('Payroll'), help="Other income of employee"),
'short_term_gain':fields.float('Short Term Gain from Share Trading/Equity MFs ', digits_compute=dp.get_precision('Payroll'), help="Stocks/equity mutual funds are sold before one year"),
'long_term_gain':fields.float('Long Term Gain from Share Trading/Equity MFs', digits_compute=dp.get_precision('Payroll'), help="Stocks/equity mutual funds are kept for more than a year"),
'food_coupon_amount': fields.float('Food Coupons ', digits_compute=dp.get_precision('Payroll'), help="Amount of food coupon per day"),
'driver_salay': fields.boolean('Driver Salary', help=" Allowance for company provided driver"),
'professional_tax': fields.float('Professional Tax ', digits_compute=dp.get_precision('Payroll'), help="Professional tax deducted from salary"),
'leave_avail_dedution': fields.float('Leave Availed Deduction ', digits_compute=dp.get_precision('Payroll'), help="Deduction for emergency leave of employee."),
'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance."),
'voluntary_provident_fund': fields.float('Voluntary Provident Fund', digits_compute=dp.get_precision('Payroll'), help="VPF computed as percentage.(%)"),
'company_transport': fields.float('Company Provided Transport', digits_compute=dp.get_precision('Payroll'), help="Deduction for company provided transport."),
'leave_avail_dedution': fields.float('Leave Availed Deduction ', digits_compute=dp.get_precision('Payroll'), help="Deduction for emergency leave of employee"),
'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance"),
'voluntary_provident_fund': fields.float('Voluntary Provident Fund', digits_compute=dp.get_precision('Payroll'), help="VPF computed as percentage(%)"),
'company_transport': fields.float('Company Provided Transport', digits_compute=dp.get_precision('Payroll'), help="Deduction for company provided transport"),
}
hr_contract()
@@ -96,8 +96,8 @@ class hr_employee(osv.osv):
return res
_columns = {
'join_date': fields.date('Join Date', help="Joining date of employee "),
'number_of_year': fields.function(_compute_year, string='No. of Years of Service', type="float", store=True, help="Total years of work experience."),
'join_date': fields.date('Join Date', help="Joining date of employee"),
'number_of_year': fields.function(_compute_year, string='No. of Years of Service', type="float", store=True, help="Total years of work experience"),
}
hr_employee()
@@ -112,7 +112,7 @@ class payroll_advice(osv.osv):
_columns = {
'name':fields.char('Name', size=32, readonly=True, required=True, states={'draft': [('readonly', False)]},),
'note': fields.text('Description'),
'date': fields.date('Date', readonly=True, states={'draft': [('readonly', False)]}, help="Advice Date is used to search Payslips."),
'date': fields.date('Date', readonly=True, states={'draft': [('readonly', False)]}, help="Advice Date is used to search Payslips"),
'state':fields.selection([
('draft', 'Draft'),
('confirm', 'Confirm'),
@@ -171,6 +171,7 @@ class payroll_advice(osv.osv):
'bysal': line.total
}
advice_line_pool.create(cr, uid, advice_line, context=context)
payslip_pool.write(cr, uid, slip_ids, {'advice_id': advice.id}, context=context)
return True
def confirm_sheet(self, cr, uid, ids, context=None):
@@ -222,7 +223,7 @@ class payroll_advice_line(osv.osv):
_name = 'hr.payroll.advice.line'
_description = 'Bank Advice Lines'
_columns = {
'advice_id': fields.many2one('hr.payroll.advice', 'Bank Advice',),
'advice_id': fields.many2one('hr.payroll.advice', 'Bank Advice'),
'name': fields.char('Bank Account No.', size=32, required=True),
'employee_id': fields.many2one('hr.employee', 'Employee', required=True),
'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Payroll')),
@@ -231,4 +232,14 @@ class payroll_advice_line(osv.osv):
payroll_advice_line()
class hr_payslip(osv.osv):
'''
Employee Pay Slip
'''
_inherit = 'hr.payslip'
_description = 'Pay Slip'
_columns = {
'advice_id': fields.many2one('hr.payroll.advice', 'Bank Advice')
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -56,11 +56,11 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Bank Advice">
<field name="date" select="1"/>
<field name="number" select="1"/>
<field name="name" select="1"/>
<field name="date"/>
<field name="number"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="bank_id" select="1"/>
<field name="bank_id"/>
<field name="state"/>
</tree>
</field>
@@ -83,10 +83,10 @@
<div class="oe_clear"/>
</header>
<group col="6" colspan="4">
<field name="name" colspan="4" select="1"/>
<field name="number" select="1"/>
<field name="date" select="1"/>
<field name="bank_id" select="1"/>
<field name="name" colspan="4"/>
<field name="number"/>
<field name="date"/>
<field name="bank_id"/>
</group>
<notebook colspan="4">
<page string="Paymeny Lines">
@@ -153,5 +153,15 @@
parent="hr_payroll.menu_hr_root_payroll"
/>
<!-- Shortcuts -->
<act_window name="Payslips"
domain="[('advice_id', '=', active_id)]"
res_model="hr.payslip"
src_model="hr.payroll.advice"
view_id ="hr_payroll.view_hr_payslip_tree"
id="act_hr_emp_payslip_list"
groups="base.group_hr_manager"/>
</data>
</openerp>