Empty stock moves in account invoice lines when Handle Invoice Exception
Scenario:
1- Create a sale. Invoice order: Shipment. Process
2- Done shipment.
3- Cancel invoice.
Now return the sale, and Handle Invoice Exception.: create new invoice lines without stock moves (empty relate invoice lines to stock moves).
Example data stored:
>>> Sale = pool.get('sale.sale')
>>> sale = Sale(2)
>>> for line in sale.lines: line.invoice_lines
...
(Pool().get('account.invoice.line')(4), Pool().get('account.invoice.line')(5))
>>> line, = sale.lines
>>> inv_line1, inv_line2 = line.invoice_lines
>>> inv_line1.stock_moves
(Pool().get('stock.move')(3),)
>>> inv_line2.stock_moves
()