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. 

('state', 'in', ['paid','invoiced','done']),
            ('config_id', 'in', configs.ids)])
        user_currency = self.env.user.company_id.currency_id
        total = 0.0
        products_sold = {}
        taxes = {}
        for order in orders:
            if user_currency != order.pricelist_id.currency_id:
                total += order.pricelist_id.currency_id.compute(order.amount_total, user_currency)
            else:
                total += order.amount_total
            currency = order.session_id.currency_id
            for line in order.lines:
                key = (line.product_id, line.price_unit, line.discount)
                products_sold.setdefault(key, 0.0)
                products_sold[key] += line.qty
                if line.tax_ids_after_fiscal_position:
                    line_taxes = line.tax_ids_after_fiscal_position.compute_all(line.price_unit * (1-(line.discount or 0.0)/100.0), currency, line.qty, product=line.product_id, partner=line.order_id.partner_id or False)
                    for tax in line_taxes['taxes']:
                        taxes.setdefault(tax['id'], {'name': tax['name'], 'total':0.0})
                        taxes[tax['id']]['total'] += tax['amount']
        st_line_ids = self.env["account.bank.statement.line"].search([('pos_statement_id', 'in', orders.ids)]).ids
        if st_line_ids:
            self.env.cr.execute("""
                SELECT aj.name, sum(amount) total
                FROM account_bank_statement_line AS absl,
                     account_bank_statement AS abs,
                     account_journal AS aj 
                WHERE absl.statement_id = abs.id
                    AND abs.journal_id = aj.id