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): 


""" Draw an interpolated string using the specified sequence."""
        self.check_access_rights('read')
        return self._next()
    @api.model
    def next_by_code(self, sequence_code):
        """ Draw an interpolated string using a sequence with the requested code.
            If several sequences with the correct code are available to the user
            (multi-company cases), the one from the user's current company will
            be used.
            :param dict context: context dictionary may contain a
                ``force_company`` key with the ID of the company to
                use instead of the user's current company for the
                sequence selection. A matching sequence for that
                specific company will get higher priority.
        """
        self.check_access_rights('read')
        company_ids = self.env['res.company'].search([]).ids + [False]
        seq_ids = self.search(['&', ('code', '=', sequence_code), ('company_id', 'in', company_ids)])
        if not seq_ids:
            return False
        force_company = self.env.context.get('force_company')
        if not force_company:
            force_company = self.env.user.company_id.id
        preferred_sequences = [s for s in seq_ids if s.company_id and s.company_id.id == force_company]
        seq_id = preferred_sequences[0] if preferred_sequences else seq_ids[0]
        return seq_id._next()
    @api.model
    def get_id(self, sequence_code_or_id, code_or_id='id'):