[FIX] account: no value in ref field of account.move object in Sales receipt, Customer payment, supplier voucher and Vender payment
bzr revid: vth@tinyerp.com-20101021110212-vi1atu6ryqu5ji00
This commit is contained in:
@@ -584,13 +584,17 @@ class account_voucher(osv.osv):
|
||||
name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id)
|
||||
else:
|
||||
raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal !'))
|
||||
if not inv.reference:
|
||||
ref = name.replace('/','')
|
||||
else:
|
||||
ref = inv.reference
|
||||
|
||||
move = {
|
||||
'name': name,
|
||||
'journal_id': inv.journal_id.id,
|
||||
'narration': inv.narration,
|
||||
'date':inv.date,
|
||||
'ref':inv.reference,
|
||||
'date': inv.date,
|
||||
'ref': ref,
|
||||
'period_id': inv.period_id and inv.period_id.id or False
|
||||
}
|
||||
move_id = move_pool.create(cr, uid, move)
|
||||
|
||||
Reference in New Issue
Block a user