Amit Dodiya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-16091-ado into 
lp:openobject-addons/6.0.

Requested reviews:
  Jay Vora (OpenERP) (jvo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-16091-ado/+merge/67541

Hello Sir,

I have add the warning message which appears while generating payslip of 
employee if employee doesn't set salary structure and doesn't have designation.

Thanks.
Amit
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-16091-ado/+merge/67541
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-16091-ado.
=== modified file 'hr_payroll_account/hr_payroll_account.py'
--- hr_payroll_account/hr_payroll_account.py	2011-03-02 13:23:18 +0000
+++ hr_payroll_account/hr_payroll_account.py	2011-07-11 12:33:27 +0000
@@ -532,7 +532,10 @@
                 if line.analytic_account_id:
                     rec['analytic_account_id'] = line.analytic_account_id.id
                 else:
-                    rec['analytic_account_id'] = slip.deg_id.account_id.id
+                    if not slip.deg_id:
+                        raise osv.except_osv(_('Warning !'), _('Please define salary structure for %s.') % slip.employee_id.name)
+                    else:
+                        rec['analytic_account_id'] = slip.deg_id.account_id.id
 
                 if line.type == 'allowance' or line.type == 'otherpay':
                     rec['debit'] = amount

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to