Impacted versions: 10.0

Steps to reproduce:
- Install a new language
- Open the language and click on "Deactivate"
![image](https://user-images.githubusercontent.com/6352350/33546866-7b2a9412-d8e2-11e7-818e-6a5be3801dc0.png)

You'll now get a traceback:
![image](https://user-images.githubusercontent.com/6352350/33546831-5ec2581e-d8e2-11e7-8887-08c0443bb1d8.png)

The issue is coming from https://github.com/odoo/odoo/blob/ab52c636c34b6f8b472a3b45ee162824de08fca4/odoo/addons/base/res/res_lang.py#L227


Current behavior:
Expected singleton error.

Expected behavior: Language is deactivated.


odoo/addons/base/res/res_lang.py
""" Create the given language if necessary, and make it active. """
        
        language = self.with_context(active_test=False).search([('code', '=', lang)], limit=1)
        if language:
            language.write({'active': True})
            return language.id
        
        fail = True
        iso_lang = tools.get_iso_codes(lang)
        for ln in tools.get_locales(lang):
            try:
                locale.setlocale(locale.LC_ALL, str(ln))
                fail = False
                break
            except locale.Error:
                continue
        if fail:
            lc = locale.getdefaultlocale()[0]
            msg = 'Unable to get information for locale %s. Information from the default locale (%s) have been used.'
            _logger.warning(msg, lang, lc)
        if not lang_name:
            lang_name = lang
        def fix_xa0(s):
            """Fix badly-encoded non-breaking space Unicode character from locale.localeconv(),
               coercing to utf-8, as some platform seem to output localeconv() in their system
               encoding, e.g. Windows-1252"""
            if s == '\xa0':
                return '\xc2\xa0'
            return s
        def fix_datetime_format(format):