[MERGE] OPW 574251: account_voucher: voucher on bank statement, have to use period and date from bank statement / bank statement line - not today
bzr revid: xal@openerp.com-20120828105811-2y6dawc747dhhj77
This commit is contained in:
@@ -1427,7 +1427,11 @@ class account_bank_statement(osv.osv):
|
||||
bank_st_line_obj = self.pool.get('account.bank.statement.line')
|
||||
st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context)
|
||||
if st_line.voucher_id:
|
||||
voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
|
||||
voucher_obj.write(cr, uid, [st_line.voucher_id.id],
|
||||
{'number': next_number,
|
||||
'date': st_line.date,
|
||||
'period_id': st_line.statement_id.period_id.id},
|
||||
context=context)
|
||||
if st_line.voucher_id.state == 'cancel':
|
||||
voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context)
|
||||
wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
|
||||
|
||||
@@ -115,7 +115,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
||||
'statement_id': statement_id,
|
||||
'ref': line.ref,
|
||||
'voucher_id': voucher_id,
|
||||
'date': time.strftime('%Y-%m-%d'), #time.strftime('%Y-%m-%d'), #line.date_maturity or,
|
||||
'date': statement.date,
|
||||
}, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user