[MERGE] Add batch reference on advice object

bzr revid: mra@tinyerp.com-20120807085150-p59onqyzbtfobapj
This commit is contained in:
Mustufa Rangwala (OpenERP)
2012-08-07 14:21:50 +05:30
2 changed files with 4 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"/>
@@ -160,6 +161,7 @@
<field name="number"/>
<field name="name"/>
<field name="bank_id"/>
<field name="batch_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">