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
""" Draw an interpolated string using the specified sequence.
        The sequence to use is specified by its code. This method is
        deprecated.
        """
        return self.get_id(code, 'code')
class ir_sequence_date_range(models.Model):
    _name = 'ir.sequence.date_range'
    _rec_name = "sequence_id"
    def _get_number_next_actual(self):
        '''Return number from ir_sequence row when no_gap implementation,
        and number from postgres sequence when standard implementation.'''
        for element in self:
            if element.sequence_id.implementation != 'standard':
                element.number_next_actual = element.number_next
            else:
                seq_id = "%03d_%03d" % (element.sequence_id.id, element.id)
                element.number_next_actual = _predict_nextval(self, seq_id)
    def _set_number_next_actual(self):
        for record in self:
            record.write({'number_next': record.number_next_actual or 0})
    date_from = fields.Date('From', required=True)
    date_to = fields.Date('To', required=True)
    sequence_id = fields.Many2one("ir.sequence", 'Main Sequence', required=True, ondelete='cascade')
    number_next = fields.Integer('Next Number', required=True, default=1, help="Next number of this sequence")
    number_next_actual = fields.Integer(compute='_get_number_next_actual', inverse='_set_number_next_actual',
                                        required=True, string='Next Number', default=1,
                                        help="Next number that will be used. This number can be incremented "
                                        "frequently so the displayed value might already be obsolete")
    def _next(self):