Set invoice number late
A consequence of #11980 is that with
account_invoice_history activated, the computation of payment term is done on history data because the
numbered_at are set before creating the move.
It will be safer to make the computation with the current data as history is not always reliable.