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.


_description = "Languages"
    _order = "active desc,name"
    _disallowed_datetime_patterns = tools.DATETIME_FORMATS_MAP.keys()
    _disallowed_datetime_patterns.remove('%y') 
    name = fields.Char(required=True)
    code = fields.Char(string='Locale Code', required=True, help='This field is used to set/get locales for user')
    iso_code = fields.Char(string='ISO code', help='This ISO code is the name of po files to use for translations')
    translatable = fields.Boolean()
    active = fields.Boolean()
    direction = fields.Selection([('ltr', 'Left-to-Right'), ('rtl', 'Right-to-Left')], required=True, default='ltr')
    date_format = fields.Char(string='Date Format', required=True, default=DEFAULT_DATE_FORMAT)
    time_format = fields.Char(string='Time Format', required=True, default=DEFAULT_TIME_FORMAT)
    grouping = fields.Char(string='Separator Format', required=True, default='[]',
        help="The Separator Format should be like [,n] where 0 < n :starting from Unit digit. "
             "-1 will end the separation. e.g. [3,2,-1] will represent 106500 to be 1,06,500; "
             "[1,2,-1] will represent it to be 106,50,0;[3] will represent it as 106,500. "
             "Provided ',' as the thousand separator in each case.")
    decimal_point = fields.Char(string='Decimal Separator', required=True, default='.')
    thousands_sep = fields.Char(string='Thousands Separator', default=',')
    _sql_constraints = [
        ('name_uniq', 'unique(name)', 'The name of the language must be unique !'),
        ('code_uniq', 'unique(code)', 'The code of the language must be unique !'),
    ]
    @api.constrains('active')
    def _check_active(self):
        
        if self.env.registry.ready and not self.search_count([]):
            raise ValidationError(_('At least one language must be active.'))
    @api.constrains('time_format', 'date_format')
    def _check_format(self):