Impacted versions: 10.0/11.0

Steps to reproduce: go to [http://281537-11-0-12c7d3.runbot8.odoo.com](http://281537-11-0-12c7d3.runbot8.odoo.com/web?debug=1?#id=12&view_type=form&model=ir.sequence&menu_id=38&action=22) --> Settings --> Sequences --> 'Account reconcile sequence'

Current behavior: Traceback during Saving record

![](https://image.prntscr.com/image/G4x_oq6xQr2HduZQiUPDdA.png)

Change Implementation to Standard and Save the record.

![](https://image.prntscr.com/image/cv0b3Pq9SzW0Dya-zZ4cyA.png)
Expected behavior: Should Save the record

Video/Screenshot link (optional): 


openerp/addons/base/ir/ir_sequence.py
""" Returns the next number in the preferred sequence in all the ones given in self."""
        if not self.use_date_range:
            return self._next_do()
        
        dt = fields.Date.today()
        if self.env.context.get('ir_sequence_date'):
            dt = self.env.context.get('ir_sequence_date')
        seq_date = self.env['ir.sequence.date_range'].search([('sequence_id', '=', self.id), ('date_from', '<=', dt), ('date_to', '>=', dt)], limit=1)
        if not seq_date:
            seq_date = self._create_date_range_seq(dt)
        return seq_date.with_context(ir_sequence_date_range=seq_date.date_from)._next()
    @api.multi
    def next_by_id(self):