[FIX] hr_payroll_account: Payslip approval crashes without notification if Property accounts are not configured

bzr revid: ara@tinyerp.com-20110302104441-ka6xesr5qiyjmzpd
This commit is contained in:
ARA (OpenERP) 2011-03-02 16:14:41 +05:30
parent 70440c85bb
commit 36710d30c8
2 changed files with 3 additions and 3 deletions

View File

@ -148,7 +148,7 @@ class hr_employee(osv.osv):
'address_id': fields.many2one('res.partner.address', 'Working Address'),
'address_home_id': fields.many2one('res.partner.address', 'Home Address'),
'partner_id': fields.related('address_home_id', 'partner_id', type='many2one', relation='res.partner', readonly=True, help="Partner that is related to the current employee. Accounting transaction will be written on this partner belongs to employee."),
'bank_account_id':fields.many2one('res.partner.bank', 'Bank Account', domain="[('partner_id','=',partner_id)]", help="Employee bank salary account"),
'bank_account_id':fields.many2one('res.partner.bank', 'Bank Account Number', domain="[('partner_id','=',partner_id)]", help="Employee bank salary account"),
'work_phone': fields.char('Work Phone', size=32, readonly=False),
'mobile_phone': fields.char('Mobile', size=32, readonly=False),
'work_email': fields.char('Work E-mail', size=240),

View File

@ -64,7 +64,7 @@ class hr_employee(osv.osv):
method=True,
domain="[('type', '=', 'liquidity')]",
view_load=True,
help="Select Bank Account from where Salary Expense will be Paid,to be used for payslip verification."),
help="Select Bank Account from where Salary Expense will be Paid, to be used for payslip verification."),
'salary_account':fields.property(
'account.account',
type='many2one',
@ -497,7 +497,7 @@ class hr_payslip(osv.osv):
line = {
'move_id':move_id,
'name': "To Basic Paysble Salary / " + slip.employee_id.name,
'name': "To Basic Payble Salary / " + slip.employee_id.name,
'partner_id': partner_id,
'date': slip.date,
'account_id': slip.employee_id.employee_account.id,