[IMP] hr_payroll: improved Salary Head,added 'salary.head.type' object and 'salary rule' as m2m on employee,removed one2many 'Child Salary Structure'

bzr revid: mtr@mtr-20110225130726-5bc1b5hf2cgefeo3
This commit is contained in:
mtr 2011-02-25 18:37:26 +05:30
parent a59188e080
commit deec616aa5
4 changed files with 136 additions and 204 deletions

View File

@ -97,8 +97,7 @@ class hr_payroll_structure(osv.osv):
'line_ids':fields.one2many('hr.payslip.line', 'function_id', 'Salary Structure', required=False),
'company_id':fields.many2one('res.company', 'Company', required=False),
'note': fields.text('Description'),
'struct_id':fields.many2one('hr.payroll.structure', 'Parent Salary Structure', select=True),
'child_ids':fields.one2many('hr.payroll.structure', 'struct_id', 'Child Salary Sructure'),
'struct_id':fields.many2one('hr.payroll.structure', 'Parent Structure'),
}
_defaults = {
'company_id': lambda self, cr, uid, context: \
@ -160,10 +159,6 @@ class hr_contract(osv.osv):
sal_type = contract.wage_type_id.type
# function = contract.struct_id.id
lines = contract.struct_id.rule_ids
if contract.struct_id.child_ids:
for child in contract.struct_id.child_ids:
for rule in self.pool.get('hr.payroll.structure').browse(cr, uid, [child.id]):
lines = rule.rule_ids
if not contract.struct_id:
res[contract.id] = obj['basic']
continue
@ -220,10 +215,10 @@ class hr_contract(osv.osv):
elif line.amount_type == 'func':
value = slip_line_pool.execute_function(cr, uid, line.id, amt, context)
line.amount = value
if line.type == 'allowance':
if line.type.name == 'allowance':
all_per += percent
all_fix += value
elif line.type == 'deduction':
elif line.type.name == 'deduction':
ded_per += percent
ded_fix += value
if sal_type in ('gross', 'net'):
@ -282,10 +277,6 @@ class hr_contract(osv.osv):
vals[rs.id] = record
continue
lines = rs.struct_id.rule_ids
if rs.struct_id.child_ids:
for child in rs.struct_id.child_ids:
for rule in self.pool.get('hr.payroll.structure').browse(cr, uid, [child.id]):
lines = rule.rule_ids
for line in lines:
amount = 0.0
if line.amount_type == 'per':
@ -298,16 +289,10 @@ class hr_contract(osv.osv):
cd = line.category_id.code.lower()
obj[cd] = amount
if line.type == 'allowance':
if line.type.name == 'allowance':
allow += amount
elif line.type == 'deduction':
elif line.type.name == 'deduction':
deduct += amount
elif line.type == 'advance':
others += amount
elif line.type == 'loan':
others += amount
elif line.type == 'otherpay':
others += amount
record = {
'advantages_gross':round(allow),
'advantages_net':round(deduct),
@ -481,7 +466,7 @@ class payroll_register(osv.osv):
'advice_id':pid,
'name':slip.employee_id.bank_account_id.acc_number,
'employee_id':slip.employee_id.id,
'amount':slip.other_pay + slip.net,
'amount':slip.net,
'bysal':slip.net
}
id = advice_line_pool.create(cr, uid, pline, context=context)
@ -585,7 +570,7 @@ class payroll_advice_line(osv.osv):
if sids:
slip = slip_pool.browse(cr, uid, sids[0], context=context)
vals['name'] = slip.employee_id.identification_id
vals['amount'] = slip.net + slip.other_pay
vals['amount'] = slip.net
vals['bysal'] = slip.net
return {
'value':vals
@ -661,6 +646,19 @@ class contrib_register_line(osv.osv):
}
contrib_register_line()
class salary_head_type(osv.osv):
"""
Salary Head Type
"""
_name = 'salary.head.type'
_description = 'Salary Head Type'
_columns = {
'name':fields.char('Type Name', size=64, required=True, readonly=False),
}
salary_head_type()
class payment_category(osv.osv):
"""
Allowance, Deduction Heads
@ -673,16 +671,7 @@ class payment_category(osv.osv):
_columns = {
'name':fields.char('Category Name', size=64, required=True, readonly=False),
'code':fields.char('Category Code', size=64, required=True, readonly=False),
'type':fields.selection([
('allowance','Allowance'),
('deduction','Deduction'),
('leaves','Leaves'),
('advance','Advance'),
('loan','Loan'),
('installment','Loan Installment'),
('otherpay','Other Payment'),
('otherdeduct','Other Deduction'),
],'Type', select=True, required=True),
'type':fields.many2one('salary.head.type', 'Type', required=True),
'base':fields.text('Based on', required=True, readonly=False, help='This will use to computer the % fields values, in general its on basic, but You can use all heads code field in small letter as a variable name i.e. hra, ma, lta, etc...., also you can use, static varible basic'),
'condition':fields.char('Condition', size=1024, required=True, readonly=False, help='Applied this head for calculation if condition is true'),
'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'),
@ -690,7 +679,11 @@ class payment_category(osv.osv):
'user_id':fields.char('User', size=64, required=False, readonly=False),
'state':fields.char('Label', size=64, required=False, readonly=False),
'company_id':fields.many2one('res.company', 'Company', required=False),
# 'contribute_ids':fields.one2many('company.contribution', 'category_id', 'Contributions', required=False),
'active': fields.boolean('Active'),
'computation_based':fields.selection([
('rules','List of Rules'),
('exp','Expression'),
],'Computation Based On', select=True, required=True),
}
_defaults = {
'condition': lambda *a: 'True',
@ -699,6 +692,8 @@ class payment_category(osv.osv):
'company_id': lambda self, cr, uid, context: \
self.pool.get('res.users').browse(cr, uid, uid,
context=context).company_id.id,
'active': 1,
'computation_based':'rules',
}
payment_category()
@ -848,20 +843,14 @@ class hr_payslip(osv.osv):
cd = line.category_id.code.lower()
obj[cd] = amount
contrib = 0.0
if line.type == 'allowance':
if line.type.name == 'allowance':
allow += amount
others += contrib
amount -= contrib
elif line.type == 'deduction':
elif line.type.name == 'deduction':
deduct += amount
others -= contrib
amount += contrib
elif line.type == 'advance':
others += amount
elif line.type == 'loan':
others += amount
elif line.type == 'otherpay':
others += amount
slip_line_obj.write(cr, uid, [line.id], {'total':amount}, context=context)
record = {
@ -976,10 +965,6 @@ class hr_payslip(osv.osv):
'gross':slip.grows,
}
rules = slip.contract_id.struct_id.rule_ids
if slip.contract_id.struct_id.child_ids:
for child in slip.contract_id.struct_id.child_ids:
for rule in self.pool.get('hr.payroll.structure').browse(cr, uid, [child.id]):
rules = rule.rule_ids
if rules:
for rl in rules:
if rl.contribute_ids:
@ -1087,9 +1072,6 @@ class hr_payslip(osv.osv):
contract = slip.employee_id.contract_id
sal_type = contract.wage_type_id.type
function = contract.struct_id.id
if contract.struct_id.child_ids:
for child in contract.struct_id.child_ids:
function = child.id
lines = []
if function:
func = func_pool.read(cr, uid, function, ['rule_ids'], context=context)
@ -1165,10 +1147,10 @@ class hr_payslip(osv.osv):
elif line.amount_type == 'func':
value = self.pool.get('hr.salary.rule').execute_function(cr, uid, line.id, amt, context)
line.amount = value
if line.type == 'allowance':
if line.type.name == 'allowance':
all_per += percent
all_fix += value
elif line.type == 'deduction':
elif line.type.name == 'deduction':
ded_per += percent
ded_fix += value
# vals = {
@ -1182,7 +1164,7 @@ class hr_payslip(osv.osv):
res = {
'name':line.name,
'code':line.code,
'type':line.type,
'type':line.type.id,
'amount_type':line.amount_type,
'category_id':line.category_id.id,
'sequence':line.sequence,
@ -1192,8 +1174,11 @@ class hr_payslip(osv.osv):
'function_id':False,
'base':base
}
if not((line.amount < line.min_range) or (line.amount > line.max_range)):
slip_line_pool.create(cr, uid, res, context=context)
if line.min_range or line.max_range:
if not((line.amount < line.min_range) or (line.amount > line.max_range)):
slip_line_pool.create(cr, uid, res, context=context)
else:
slip_line_pool.create(cr, uid, res, context=context)
if sal_type in ('gross', 'net'):
sal = contract.wage
if sal_type == 'net':
@ -1326,7 +1311,7 @@ class hr_payslip_line(osv.osv):
'sequence':category.sequence,
'name':category.name,
'code':category.code,
'type':category.type
'type':category.type.id
})
return {'value':res}
@ -1345,18 +1330,7 @@ class hr_payslip_line(osv.osv):
'base':fields.char('Formula', size=1024, required=False, readonly=False),
'code':fields.char('Code', size=64, required=False, readonly=False),
'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Category', required=True),
'type':fields.selection([
('allowance','Allowance'),
('deduction','Deduction'),
('leaves','Leaves'),
('advance','Advance'),
('loan','Loan'),
('installment','Loan Installment'),
('otherpay','Other Payment'),
('otherdeduct','Other Deduction'),
],'Type', select=True, required=True),
#TODO: link type to the category_id instead of define again
#'type': fields.related('category_id','type', type='selection', size=64, relation='hr.allounce.deduction.categoty', string='Type', store=True),
'type':fields.many2one('salary.head.type', 'Type', required=True),
'amount_type':fields.selection([
('per','Percentage (%)'),
('fix','Fixed Amount'),
@ -1429,7 +1403,7 @@ class hr_payroll_structure(osv.osv):
_inherit = 'hr.payroll.structure'
_columns = {
'rule_ids':fields.many2many('hr.salary.rule', 'structure_salary_rule_rel', 'struct_id', 'rule_id', 'Salary Rules', readonly=False),
'rule_ids':fields.many2many('hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id', 'Salary Rules', readonly=False),
}
hr_payroll_structure()
@ -1485,9 +1459,9 @@ class hr_employee(osv.osv):
elif line.amount_type == 'fix':
amount = line.amount
if line.type == 'allowance':
if line.type.name == 'allowance':
allowance += amount
elif line.type == 'deduction':
elif line.type.name == 'deduction':
deduction += amount
vals[employee.id] = {
@ -1510,6 +1484,7 @@ class hr_employee(osv.osv):
'net': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Net Salary', digits=(14,2)),
'advantages_net': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Deductions', digits=(14,2)),
'advantages_gross': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Allowances', digits=(14,2)),
'emp_sal_rule_ids':fields.many2many('hr.salary.rule', 'hr_emp_salary_rule_rel', 'employee_id', 'rule_id', 'Salary Rules', readonly=False),
}
hr_employee()

View File

@ -1,119 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="AL" model="salary.head.type">
<field name="name">allowance</field>
</record>
<record id="DED" model="salary.head.type">
<field name="name">deduction</field>
</record>
<record id="HRA" model="hr.allounce.deduction.categoty">
<field name="code">HRA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">House Rent Allowance</field>
<field name="sequence" eval="5"/>
</record>
<record id="CA" model="hr.allounce.deduction.categoty">
<field name="code">CA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Conveyance Allowance</field>
<field name="sequence" eval="10"/>
</record>
<record id="MA" model="hr.allounce.deduction.categoty">
<field name="code">MA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Medical Allowance</field>
<field name="sequence" eval="15"/>
</record>
<record id="TELA" model="hr.allounce.deduction.categoty">
<field name="code">TELA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Telephone Allowance</field>
<field name="sequence" eval="20"/>
</record>
<record id="LTA" model="hr.allounce.deduction.categoty">
<field name="code">LTA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Leave Travel Allowance</field>
<field name="sequence" eval="25"/>
</record>
<record id="NA" model="hr.allounce.deduction.categoty">
<field name="code">NA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Newspaper Allowance</field>
<field name="sequence" eval="30"/>
</record>
<record id="TA" model="hr.allounce.deduction.categoty">
<field name="code">TA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Traveling Allowance</field>
<field name="sequence" eval="35"/>
</record>
<record id="FA" model="hr.allounce.deduction.categoty">
<field name="code">FA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Food Allowance</field>
<field name="sequence" eval="40"/>
</record>
<record id="DA" model="hr.allounce.deduction.categoty">
<field name="code">DA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="name">Dearness Allowance</field>
<field name="sequence" eval="45"/>
</record>
<record id="PF" model="hr.allounce.deduction.categoty">
<field name="code">PF</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="name">Provident Fund</field>
<field name="sequence" eval="50"/>
</record>
<record id="PT" model="hr.allounce.deduction.categoty">
<field name="code">PT</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="name">Professional Tax</field>
<field name="sequence" eval="55"/>
</record>
<record id="WF" model="hr.allounce.deduction.categoty">
<field name="code">WF</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="name">Welfare</field>
<field name="sequence" eval="60"/>
</record>
<record id="TDS" model="hr.allounce.deduction.categoty">
<field name="code">TDS</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="name">Tax Deduct at Source</field>
<field name="sequence" eval="65"/>
</record>
<record id="LWP" model="hr.allounce.deduction.categoty">
<field name="code">LWP</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="name">Leave without pay</field>
<field name="sequence" eval="70"/>
</record>
<record id="FC" model="hr.allounce.deduction.categoty">
<field name="code">FC</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="name">Food Coupons</field>
<field name="sequence" eval="75"/>
</record>
<record id="ESI" model="hr.allounce.deduction.categoty">
<field name="code">ESI</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="name">Employee's State Insurance</field>
<field name="sequence" eval="80"/>
</record>
<record id="OTHERD" model="hr.allounce.deduction.categoty">
<!-- <record id="OTHERD" model="hr.allounce.deduction.categoty">
<field name="code">OTHERD</field>
<field name="type">otherdeduct</field>
<field name="name">Other Deduction</field>
@ -125,7 +134,7 @@
<field name="type">otherpay</field>
<field name="name">Other Taxable Allowance</field>
<field name="sequence" eval="90"/>
</record>
</record>-->
<!-- Contract Wage Types -->
<record id="hr_contract_monthly_basic" model="hr.contract.wage.type">

View File

@ -14,7 +14,7 @@
<field eval="5" name="sequence"/>
<field eval="0.4" name="amount"/>
<field name="code">HRA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="category_id" ref="hr_payroll.HRA"/>
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">House Rent Allowance</field>
@ -25,7 +25,7 @@
<field eval="10" name="sequence"/>
<field eval="800.0" name="amount"/>
<field name="code">CA</field>
<field name="type">allowance</field>
<field name="type" ref="AL"/>
<field name="category_id" ref="hr_payroll.CA"/>
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">Conveyance Allowance</field>
@ -36,7 +36,7 @@
<field eval="15" name="sequence"/>
<field eval="200.0" name="amount"/>
<field name="code">PT</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="category_id" ref="hr_payroll.PT"/>
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">Professional Tax</field>
@ -47,7 +47,7 @@
<field eval="20" name="sequence"/>
<field eval="0.125" name="amount"/>
<field name="code">PF</field>
<field name="type">deduction</field>
<field name="type" ref="DED"/>
<field name="category_id" ref="hr_payroll.PF"/>
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">Provident Fund</field>

View File

@ -107,6 +107,11 @@
</group>
</page>
</xpath>
<xpath expr="/form/notebook/page[@string='Categories']" position="after">
<page string="Salary Rules">
<field name="emp_sal_rule_ids" nolabel="1" widget="one2many_list"/>
</page>
</xpath>
</data>
</field>
</record>
@ -190,7 +195,6 @@
<tree string="Employee Function">
<field name="name"/>
<field name="code"/>
<!--<field name="line_ids"/>-->
<field name="rule_ids"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</tree>
@ -206,63 +210,14 @@
<group col="6" colspan="4">
<field name="name" colspan="4" select="1"/>
<field name="code" select="1"/>
<field name="struct_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<!--<notebook colspan="4">
<page string="Salary Structure">
<field name="line_ids" nolabel="1" colspan="4">
<form string="Payslip Line">
<group col="6" colspan="4">
<field name="name" colspan="4" select="1"/>
<field name="code" select="1"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Calculations"/>
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<field name="amount_type"/>
<field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
<field name="sequence" groups="base.group_extended"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Company contribution"/>
<field name="company_contrib"/>
</group>
<notebook colspan="4">
<page string="Function">
<field name="line_ids" colspan="4" nolabel="1" attrs="{'readonly':[('amount_type','!=','func')]}">
<tree string="Function Arguments" editable="bottom">
<field name="name"/>
<field name="sequence" groups="base.group_extended"/>
<field name="from_val"/>
<field name="to_val"/>
<field name="amount_type"/>
<field name="value"/>
</tree>
</field>
</page>
<page string="Description">
<separator colspan="4" string="Description"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</page>
</notebook>-->
<notebook colspan="4">
<page string="Salary Rules" groups="base.group_extended">
<field colspan="4" name="rule_ids" nolabel="1"/>
</page>
<page string="Child Salary Structure">
<field groups="base.group_extended" colspan="4" name="child_ids" nolabel="1">
<tree string="Child Salary Structure">
<field name="name"/>
<field name="code"/>
</tree>
</field>
</page>
</notebook>
<page string="Salary Rules">
<field colspan="4" name="rule_ids" nolabel="1" />
</page>
</notebook>
</form>
</field>
</record>
@ -462,7 +417,6 @@
<field name="basic"/>
<field name="allounce"/>
<field name="deduction"/>
<field name="other_pay"/>
<field name="grows"/>
<field name="net"/>
<field name="total_pay"/>
@ -544,59 +498,23 @@
<group col="6" colspan="6">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="active" />
<field name="type" select="1"/>
<field name="sequence"/>
<group col="2" colspan="4">
<separator colspan="4" string="Based on"/>
<separator colspan="4" string="Expression"/>
<field name="base" colspan="4" nolabel="1"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Dynamic Computation"/>
<field name="computation_based" select="1"/>
<field name="condition"/>
<field name="sequence"/>
</group>
</group>
<notebook colspan="4">
<page string="Description">
<field name="note" colspan="4" nolabel="1"/>
</page>
<!-- <page string="Contribution">
<field name="contribute_ids" colspan="4" nolabel="1" height="300">
<form string="Company Contribution">
<group col="6" colspan="6">
<field name="name" select="1"/>
<field name="code" select="1"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Contributions"/>
<field name="amount_type" attrs="{'required': [('contribute','=',True)]}"/>
<field name="contribute_per" attrs="{'required': [('contribute','=',True)], 'readonly':[(('amount_type','=','func'))]}"/>
<field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Other Information"/>
<field name="company_id" groups="base.group_multi_company" widget="selection" select="1"/>
<field name="active" select="1"/>
</group>
<notebook colspan="4">
<page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">
<field name="line_ids" colspan="4" nolabel="1">
<tree string="Function Arguments" editable="bottom">
<field name="name"/>
<field name="sequence"/>
<field name="from_val"/>
<field name="to_val"/>
<field name="amount_type"/>
<field name="value"/>
</tree>
</field>
</page>
<page string="Description">
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</page>-->
</notebook>
</form>
</field>
@ -1004,10 +922,10 @@
<form string="Salary Rules">
<group col="3" colspan="6">
<field name="name"/>
<field name="active"/>
<field name="code" select="1"/>
<field name="min_range"/>
<field name="max_range"/>
<field name="active"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Calculations"/>
@ -1034,12 +952,8 @@
</tree>
</field>
</page>
<page string="Description">
<separator colspan="4" string="Description"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
<page string="Contribution">
<field name="contribute_ids" colspan="4" nolabel="1" height="300">
<field name="contribute_ids" colspan="4" nolabel="1" >
<form string="Company Contribution">
<group col="6" colspan="6">
<field name="name" select="1"/>
@ -1076,22 +990,56 @@
</form>
</field>
</page>
<page string="Description">
<separator colspan="4" string="Description"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="action_salary_rule_form" model="ir.actions.act_window">
<field name="name">Salary Rules</field>
<field name="res_model">hr.salary.rule</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_salary_rule_tree"/>
</record>
<menuitem
id="menu_action_hr_salary_rule_form"
action="action_salary_rule_form"
parent="payroll_configure"
/>
<record id="action_salary_rule_form" model="ir.actions.act_window">
<field name="name">Salary Rules</field>
<field name="res_model">hr.salary.rule</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_salary_rule_tree"/>
</record>
<menuitem id="menu_action_hr_salary_rule_form" action="action_salary_rule_form" parent="payroll_configure"/>
<!-- Salary Head Type -->
<record id="salary_head_type_tree" model="ir.ui.view">
<field name="name">salary.head.type.tree</field>
<field name="model">salary.head.type</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Salary Head Type">
<field name="name"/>
</tree>
</field>
</record>
<record id="salary_head_type_form" model="ir.ui.view">
<field name="name">salary.head.type.form</field>
<field name="model">salary.head.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Salary Head Type">
<field name="name"/>
</form>
</field>
</record>
<record id="action_salary_head_type" model="ir.actions.act_window">
<field name="name">Salary Head Type</field>
<field name="res_model">salary.head.type</field>
<field name="view_type">form</field>
<field name="view_id" ref="salary_head_type_tree"/>
</record>
<menuitem id="menu_action_salary_head_type" action="action_salary_head_type" parent="payroll_configure"/>
</data>
</openerp>