[IMP]: improved the employee object and view

bzr revid: mga@tinyerp.com-20100607132659-6lzu9mws93uvobd2
This commit is contained in:
Mantavya Gajjar 2010-06-07 18:56:59 +05:30
parent fcc0296fff
commit 3f8867daf4
2 changed files with 31 additions and 18 deletions

View File

@ -29,7 +29,7 @@ from tools.translate import _
class hr_contract_wage_type(osv.osv):
"""
Wages types
Wage types
Basic = Basic Salary
Grows = Basic + Allowances
New = Grows - Deductions
@ -578,9 +578,9 @@ class payment_category(osv.osv):
def execute_function(self, cr, uid, id, value, context):
"""
self: pointer to self object
cr: cursor to database
uid: user id of current executer
self: pointer to self object
cr: cursor to database
uid: user id of current executer
"""
line_pool = self.pool.get('hr.allounce.deduction.categoty.line')
@ -628,10 +628,10 @@ class hr_holidays_status(osv.osv):
('unpaid','Un-Paid Holiday'),
('halfpaid','Half-Pay Holiday')
], string='Payment'),
'account_id': fields.many2one('account.account', 'Account', required=True),
'account_id': fields.many2one('account.account', 'Account', required=False),
'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=False),
'head_id': fields.many2one('hr.allounce.deduction.categoty', 'Payroll Head', domain=[('type','=','deduct')]),
'code':fields.char('Code', size=64, required=True, readonly=False),
'code':fields.char('Code', size=64, required=False, readonly=False),
}
_defaults = {
'type': lambda *args: 'unpaid',

View File

@ -66,7 +66,7 @@
/>
<!-- End Passport Views -->
<!-- Contract View -->
<!-- Employee View -->
<record id="hr_contract.hr_hr_employee_view_form2" model="ir.ui.view">
<field name="name">hr.hr.employee.view.form2</field>
<field name="model">hr.employee</field>
@ -157,31 +157,44 @@
</page>
<page string="Salary Structure">
<field name="line_ids" nolabel="1" colspan="4" string="Salary Structure">
<tree string="Slip/Salary Lines" editable="bottom">
<tree string="Salary Structure" editable="bottom">
<field name="sequence"/>
<field name="analytic_account_id"/>
<field name="name"/>
<field name="code"/>
<field name="amount_type"/>
<field name="amount" on_change="onchange_amount(amount, amount_type)"/>
<!-- <field name="condition_id">-->
<!-- <form string="Condition">-->
<!-- <field name="name"/>-->
<!-- <field name="date_start"/>-->
<!-- <field name="date_end"/>-->
<!-- <field name="state"/>-->
<!-- </form>-->
<!-- </field>-->
<field name="type"/>
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="account_id"/>
</tree>
</field>
</page>
<page string="Accounting">
<field name="property_bank_account"/>
<field name="salary_account"/>
<field name="employee_account"/>
<field name="analytic_account"/>
<field name="slip_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
</field>
</record>
<record id="view_employee_passport_form" model="ir.ui.view">
<field name="name">hr.employee.passport.form</field>
<field name="model">hr.employee</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="otherid" position="after">
<field name="passport_id"/>
</field>
</field>
</record>
<!-- End Employee View -->
<!-- Contract View -->
<record id="hr_contract.hr_contract_view_form" model="ir.ui.view">
<field name="name">hr.contract.view.form</field>
<field name="model">hr.contract</field>
@ -303,7 +316,7 @@
</group>
<separator colspan="4" string="Special Allowance and Deductions for Employee"/>
<field name="line_ids" nolabel="1" colspan="4">
<tree string="Slip/Salary Lines" editable="bottom">
<tree string="Salary Structure" editable="bottom">
<field name="sequence"/>
<field name="analytic_account_id"/>
<field name="name"/>
@ -402,7 +415,7 @@
<field name="model">hr.payslip.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Slip/Salary Lines" editable="bottom">
<tree string="Salary Structure" editable="bottom">
<field name="sequence"/>
<field name="analytic_account_id"/>
<field name="name"/>