1113
1117
for absl in self.browse(cr, uid, ids):
1114
1118
if absl.state == 'temp' and absl.direct_invoice == True:
1116
1119
# Find all moves lines linked to this register line
1117
1120
# first, via the statement
1118
1121
move_ids = [x.id for x in absl.move_ids]
1120
1123
am1 = account_move.browse(cr, uid, move_ids)[0]
1121
1124
seqnums[am1.journal_id.id] = am1.name
1123
1129
# then via the direct invoice
1124
1130
ai = account_invoice.browse(cr, uid, [absl.invoice_id.id])[0]
1129
1133
seqnums[ai.move_id.journal_id.id] = ai.move_id.name
1130
1134
account_invoice.write(cr, uid, [ai.id],{'move_id': False}, context=context)
1133
1140
# TODO: Needs to be fixed during refactoring. The field move_id on account.analytic.line
1134
1141
# is actually account_move_line.id, not account_move.id