[FIX]prefix of sequence changed.
bzr revid: kbh@tinyerp.com-20120615104651-yyrys4pqgfuechly
This commit is contained in:
parent
2f43fd498e
commit
8c8de36e18
|
@ -48,6 +48,7 @@ Indian Payroll Rules.
|
|||
'l10n_in_hr_payroll_view.xml',
|
||||
'l10n_in_hr_payroll_data.xml',
|
||||
'data/hr.salary.rule.csv',
|
||||
'security/ir.model.access.csv',
|
||||
'l10n_in_hr_payroll_report.xml',
|
||||
'l10n_in_hr_payroll_sequence.xml'
|
||||
],
|
||||
|
|
|
@ -160,6 +160,7 @@ class payroll_advice(osv.osv):
|
|||
for advice in self.browse(cr, uid, ids, context=context):
|
||||
if not advice.line_ids:
|
||||
raise osv.except_osv(_('Error !'), _('You can not confirm Payment advice without advice lines.'))
|
||||
advice_date = datetime.strptime(advice.date,DATETIME_FORMAT)
|
||||
date = advice_date.strftime('%Y')+'/'+advice_date.strftime('%m')
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, 'payment.advice')
|
||||
sequence_num = 'PAY' + '/' + date + '/' + number
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<record id="seq_payment_advice" model="ir.sequence">
|
||||
<field name="name">Payment Advice</field>
|
||||
<field name="code">payment.advice</field>
|
||||
<field name="prefix">PAY/%(month)s/%(year)s/</field>
|
||||
<field name="prefix"></field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue