[IMP] add help on state field of hr.payslip and view improvement
bzr revid: psi@tinyerp.co.in-20110404062930-bf2onlnsmjb5mm43
This commit is contained in:
parent
6c5051fa38
commit
0c0ea31d9c
|
@ -535,23 +535,29 @@ class hr_payslip(osv.osv):
|
|||
return 0.0
|
||||
|
||||
_columns = {
|
||||
'struct_id':fields.related('contract_id', 'struct_id', readonly=True, type='many2one', relation='hr.payroll.structure', string='Structure', store=True, ),
|
||||
'register_id':fields.many2one('hr.payroll.register', 'Register', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'name':fields.char('Name', size=64, required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'number':fields.char('Number', size=64, required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'employee_id':fields.many2one('hr.employee', 'Employee', required=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'struct_id': fields.related('contract_id', 'struct_id', readonly=True, type='many2one', relation='hr.payroll.structure', string='Structure', store=True, ),
|
||||
'register_id': fields.many2one('hr.payroll.register', 'Register', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'name': fields.char('Description', size=64, required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'number': fields.char('Number', size=64, required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'employee_id': fields.many2one('hr.employee', 'Employee', required=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'date': fields.date('Date', readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'state':fields.selection([
|
||||
('draft','Waiting For Verification'),
|
||||
('hr_check','Waiting For HR Verification'),
|
||||
('accont_check','Waiting For Account Verification'),
|
||||
('confirm','Confirm Sheet'),
|
||||
('done','Paid Salary'),
|
||||
('cancel','Reject'),
|
||||
],'State', select=True, readonly=True),
|
||||
'state': fields.selection([
|
||||
('draft', 'Waiting for Verification'),
|
||||
('hr_check', 'Waiting for HR Verification'),
|
||||
('accont_check', 'Waiting for Account Verification'),
|
||||
('confirm', 'Confirm Sheet'),
|
||||
('done', 'Paid Salary'),
|
||||
('cancel', 'Reject'),
|
||||
], 'State', select=True, readonly=True,
|
||||
help=' * When the payslip is created the state is \'Waiting for verification\'.\
|
||||
\n* It is varified by the user and payslip is sent for HR varification, the state is \'Waiting for HR Verification\'. \
|
||||
\n* If HR varify the payslip, it is sent for account verification, the state is \'Waiting for Account Verification\'. \
|
||||
\n* It is confirmed by the accountant and the state set to \'Confirm Sheet\'.\
|
||||
\n* If the salary is paid then state is set to \'Paid Salary\'.\
|
||||
\n* The \'Reject\' state is used when user cancel payslip.'),
|
||||
'basic_before_leaves': fields.float('Basic Salary', readonly=True, digits_compute=dp.get_precision('Account')),
|
||||
'leaves': fields.float('Leave Deductions', readonly=True, digits_compute=dp.get_precision('Account')),
|
||||
'basic_amount':fields.related('contract_id', 'wage', type='float', relation='hr.contract', store=True, string='Basic Amount'),
|
||||
'basic_amount': fields.related('contract_id', 'wage', type='float', relation='hr.contract', store=True, string='Basic Amount'),
|
||||
'gross_amount': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', digits_compute=dp.get_precision('Account')),
|
||||
'net_amount': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits_compute=dp.get_precision('Account')),
|
||||
# 'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits_compute=dp.get_precision('Account')),
|
||||
|
@ -559,14 +565,14 @@ class hr_payslip(osv.osv):
|
|||
# 'other_pay': fields.function(_calculate, method=True, store=True, multi='dc', string='Others', digits_compute=dp.get_precision('Account')),
|
||||
'total_pay': fields.function(_calculate, method=True, store=True, multi='dc', string='Total Payment', digits_compute=dp.get_precision('Account')),
|
||||
# 'total_pay': fields.float('Total Payment', readonly=True, digits_compute=dp.get_precision('Account')),
|
||||
'line_ids':fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'company_id':fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'line_ids': fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'holiday_days': fields.float('No of Leaves', readonly=True),
|
||||
'worked_days': fields.float('Worked Day', readonly=True),
|
||||
'working_days': fields.float('Working Days', readonly=True),
|
||||
'paid':fields.boolean('Paid ? ', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'note':fields.text('Description'),
|
||||
'contract_id':fields.many2one('hr.contract', 'Contract', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'paid': fields.boolean('Made Payment Order ? ', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'note': fields.text('Description'),
|
||||
'contract_id': fields.many2one('hr.contract', 'Contract', required=False, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'igross': fields.float('Calculaton Field', readonly=True, digits=(16, 2), help="Calculation field used for internal calculation, do not place this on form"),
|
||||
'inet': fields.float('Calculaton Field', readonly=True, digits=(16, 2), help="Calculation field used for internal calculation, do not place this on form"),
|
||||
'holiday_ids': fields.function(_get_holidays, method=True, type='one2many', relation='hr.holidays', string='Holiday Lines', required=False),
|
||||
|
|
|
@ -229,7 +229,6 @@
|
|||
<form string="Payslip">
|
||||
<group col="6" colspan="4">
|
||||
<field name="employee_id" on_change="onchange_employee_id(date, employee_id, contract_id)"/>
|
||||
<field name="name"/>
|
||||
<field name="number"/>
|
||||
<field name="date"/>
|
||||
<field name="contract_id" groups="base.group_extended" domain="[('employee_id','=',employee_id)]" on_change="onchange_contract_id(date, employee_id, contract_id)"/>
|
||||
|
@ -237,6 +236,7 @@
|
|||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Salary Computation" >
|
||||
<field name="name"/>
|
||||
<field name="line_ids" colspan="4" nolabel="1">
|
||||
<tree string="Salary Structure" editable="bottom">
|
||||
<field name="category_id" on_change="onchange_category(category_id)"/>
|
||||
|
@ -330,7 +330,7 @@
|
|||
<field name="paid" readonly="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<separator colspan="4" string="Description"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
|
||||
|
|
Loading…
Reference in New Issue