[IMP]l10n_in_hr_payroll:batch_id field added on advice and use it as batch reference

bzr revid: kbh@tinyerp.com-20120807061329-jtrwqgpzs4fg0kir
This commit is contained in:
Khushboo Bhatt (Open ERP)
2012-08-07 11:43:29 +05:30
parent 898bc7cf03
commit 2a7f04c40c
2 changed files with 3 additions and 0 deletions
@@ -122,6 +122,7 @@ class payroll_advice(osv.osv):
'neft': fields.boolean('NEFT Transaction', help="Check this box if your company use online transfer for salary"),
'company_id':fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'bank_id':fields.many2one('res.bank', 'Bank', readonly=True, states={'draft': [('readonly', False)]}, help="Select the Bank from which the salary is going to be paid"),
'batch_id': fields.many2one('hr.payslip.run', 'Batch', readonly=True)
}
_defaults = {
@@ -238,6 +239,7 @@ class hr_payslip_run(osv.osv):
if run.available_advice:
raise osv.except_osv(_('Error !'), _("Payment advice already exists for %s, 'Set to Draft' to create a new advice.") %(run.name))
advice_data = {
'batch_id': run.id,
'company_id': users[0].company_id.id,
'name': run.name,
'date': run.date_end,
@@ -136,6 +136,7 @@
<field name="chaque_nos"/>
<newline/>
<field name="neft"/>
<field name="batch_id"/>
</group>
<separator colspan="4" string="Letter Details"/>
<field name="note" colspan="4" nolabel="1"/>