[FIX]error message imporved and remove unnecessary access right.

bzr revid: kbh@tinyerp.com-20120613122605-ge147o1mps20wpdv
This commit is contained in:
Khushboo Bhatt (Open ERP) 2012-06-13 17:56:05 +05:30
parent 431ea57990
commit f7ccfee64d
2 changed files with 3 additions and 5 deletions

View File

@ -123,7 +123,7 @@ class payroll_advice(osv.osv):
'company_id': lambda self, cr, uid, context: \
self.pool.get('res.users').browse(cr, uid, uid,
context=context).company_id.id,
'note': "Bank Payment advice contain the payment amount, payment date, company name, bank and other information of the payment."
'note': "Please make the payroll transfer from above account number to the below mentioned account numbers towards employee salaries:"
}
@ -161,9 +161,8 @@ class payroll_advice(osv.osv):
def confirm_sheet(self, cr, uid, ids, context=None):
for advice in self.browse(cr, uid, ids, context=context):
if not advice.line_ids:
raise osv.except_osv(_('No Payment Advice Lines !'), _('Please create some advice lines.'))
else:
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
raise osv.except_osv(_('No Payment Advice Lines !'), _('You can not confirm Payment advice without advice lines.'))
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
def set_to_draft(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'draft'}, context=context)

View File

@ -1,4 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_salary_rule","hr.salary.rule","model_hr_salary_rule","base.group_hr_user",1,1,1,1
"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

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
access_hr_salary_rule hr.salary.rule model_hr_salary_rule base.group_hr_user 1 1 1 1
2 access_hr_payroll_advice hr.payroll.advice model_hr_payroll_advice base.group_hr_manager 1 1 1 1
3 access_hr_payroll_advice_line hr.payroll.advice.line model_hr_payroll_advice_line base.group_hr_manager 1 1 1 1