[FIX] account: name of bank statement is not required

At the confirmation of a bank statement, the name may not be set (e.g. generated by point of sale). This field is not requred so make a fallack on the statement line (which is required).
This commit is contained in:
Martin Trigaux 2014-08-26 14:45:00 +02:00
parent 69cd13a084
commit 30469bd69b
1 changed files with 1 additions and 1 deletions

View File

@ -735,7 +735,7 @@ class account_bank_statement_line(osv.osv):
raise osv.except_osv(_('Error!'), _('A selected move line was already reconciled.'))
# Create the move
move_name = st_line.statement_id.name + "/" + str(st_line.sequence)
move_name = (st_line.statement_id.name or st_line.name) + "/" + str(st_line.sequence)
move_vals = bs_obj._prepare_move(cr, uid, st_line, move_name, context=context)
move_id = am_obj.create(cr, uid, move_vals, context=context)