Impacted versions: 
9.0x

Steps to reproduce:
1. Go to Accounting, create customer invoice and validate. Check the Invoice-Number (for example: INV/2016/0010)
2.  Go to Point of Sale and select New Session
3. Add any product or just close & confirm the session
4. Close the POS Session (Validate Closing & Post Entries)
5. Create new customer invoice and validate it. Check the Invoice-Number. 

Current behavior:
Gap between the first and the last invoice because of the closed POS-Session. 

Expected behavior:
No Gap between the two invoices like in Version 8. 

I've tested this behaviour on a 8 and a 9 runbot and my own system. There is no gap on 8 but on 9. I think this is not a feature but a bug. I can't find the missing sequence-numbers in any Journals or in the invoice-list. 

The only way to avoid this, is to select another Sales Journal in the POS-Configuration. But then you can't create an invoice from the POS. 

Is it possible to get the "lost" invoice-numbers somewhere? We are not allowed to have gaps in the invoice-numbering here in Germany. 

invoice_line.invoice_line_tax_ids = invoice_line.invoice_line_tax_ids.filtered(lambda t: t.company_id.id == line.order_id.company_id.id).ids
        fiscal_position_id = line.order_id.fiscal_position_id
        if fiscal_position_id:
            invoice_line.invoice_line_tax_ids = fiscal_position_id.map_tax(invoice_line.invoice_line_tax_ids, line.product_id, line.order_id.partner_id)
        invoice_line.invoice_line_tax_ids = invoice_line.invoice_line_tax_ids.ids
        
        
        inv_line = invoice_line._convert_to_write({name: invoice_line[name] for name in invoice_line._cache})
        inv_line.update(price_unit=line.price_unit, discount=line.discount)
        return InvoiceLine.sudo().create(inv_line)
    def _create_account_move_line(self, session=None, move=None):
        
        """Create a account move line of order grouped by products or not."""
        IrProperty = self.env['ir.property']
        ResPartner = self.env['res.partner']
        if session and not all(session.id == order.session_id.id for order in self):
            raise UserError(_('Selected orders do not have the same session!'))
        grouped_data = {}
        have_to_group_by = session and session.config_id.group_by or False
        for order in self.filtered(lambda o: not o.account_move or order.state == 'paid'):
            current_company = order.sale_journal.company_id
            account_def = IrProperty.get(
                'property_account_receivable_id', 'res.partner')
            order_account = order.partner_id.property_account_receivable_id.id or account_def and account_def.id
            partner_id = ResPartner._find_accounting_partner(order.partner_id).id or False
            if move is None:
                
                move = self._create_account_move(
                    order.session_id.start_at, order.name, order.sale_journal.id, order.company_id.id)
            def insert_data(data_type, values):