On opening the invoice report will be created but not stored
On changing the invoice state to open, the invoice will be created and is
intended to be stored in database.
But it will be created, before the state is set to open and therefore a draft
invoice will not be stored.
We should modify the state before creating the report, I prefer, or shouldn't
create the report on opening