[FIX] l10n_in_hr_payroll: Fix access rights

[IMP] l10n_in_hr_payroll: Code clean

bzr revid: mra@tinyerp.com-20120726062917-2l6hb3y0nh9svda1
This commit is contained in:
Mustufa Rangwala (OpenERP) 2012-07-26 11:59:17 +05:30
parent c77fecd8f7
commit 286cb1fdb9
3 changed files with 6 additions and 7 deletions

View File

@ -40,8 +40,8 @@ Indian Payroll Salary Rules.
* Integrated with Holiday Management
* Medical Allowance, Travel Allowance, Child Allowance, ...
- Payroll Advice and Report
- Payroll Statement and Payroll Register Report
""",
'active': False,
'update_xml': [
'l10n_in_hr_payroll_view.xml',

View File

@ -42,7 +42,7 @@ class hr_contract(osv.osv):
_columns = {
'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll'), help="Amount for Tax Deduction at Source"),
'driver_salay': fields.boolean('Driver Salary', help=" Allowance for company provided driver"),
'driver_salay': fields.boolean('Driver Salary', help="Check this box if you provide allowance for driver"),
'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(%)"),
'city_type': fields.selection([
@ -218,9 +218,10 @@ class hr_payslip_run(osv.osv):
}
def draft_payslip_run(self, cr, uid, ids, context=None):
res = super(hr_payslip_run, self).draft_payslip_run(cr, uid, ids, context=context)
self.write(cr, uid, ids, {'available_advice': False}, context=context)
return super(hr_payslip_run, self).draft_payslip_run(cr, uid, ids, context=context)
return res
def create_advice(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
payslip_pool = self.pool.get('hr.payslip')
@ -284,7 +285,6 @@ class payroll_advice_line(osv.osv):
'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Payroll')),
'debit_credit': fields.char('C/D', size=3, required=False),
'company_id': fields.related('advice_id', 'company_id', type='many2one', required=False, relation='res.company', string='Company', store=True),
# used to set attrs on ifsc_code
'ifsc': fields.related('advice_id', 'neft', type='boolean', string='IFSC'),
}
_defaults = {

View File

@ -1,5 +1,4 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_payroll_advice","hr.payroll.advice","model_hr_payroll_advice","base.group_hr_manager",1,1,1,1
"access_hr_payroll_advice_line","hr.payroll.advice.line","model_hr_payroll_advice_line","base.group_hr_manager",1,1,1,1
"access_hr_payroll_advice_user","hr.payroll.advice","model_hr_payroll_advice","base.group_hr_user",1,1,1,1
"access_hr_payroll_advice_line_user","hr.payroll.advice.line","model_hr_payroll_advice_line","base.group_hr_user",1,1,1,1
"access_hr_payroll_advice_report_user","payment.advice.report","model_payment_advice_report","base.group_hr_manager",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
access_hr_payroll_advice hr.payroll.advice model_hr_payroll_advice base.group_hr_manager 1 1 1 1
access_hr_payroll_advice_line hr.payroll.advice.line model_hr_payroll_advice_line base.group_hr_manager 1 1 1 1
2 access_hr_payroll_advice_user hr.payroll.advice model_hr_payroll_advice base.group_hr_user 1 1 1 1
3 access_hr_payroll_advice_line_user hr.payroll.advice.line model_hr_payroll_advice_line base.group_hr_user 1 1 1 1
4 access_hr_payroll_advice_report_user payment.advice.report model_payment_advice_report base.group_hr_manager 1 1 1 1