Impacted versions:
10.0

Steps to reproduce:
From Chrome Versión 59.0.3071.115 (Build oficial) (64 bits)
with lang  spanish Latin America es_419
Go to http://247698-10-0-f3ee58.runbot8.odoo.com/?db=247698-10-0-f3ee58-all

Current behavior:

```python
2017-07-20 16:21:02,024 10584 INFO 247698-10-0-f3ee58-all odoo.sql_db: bad query: INSERT INTO "ir_translation" ("id", "lang", "src", "name", "type", "value", "state", "res_id") VALUES(nextval('ir_translation_id_seq'), 'es_419', 'Visitor, Administrator', 'mail.channel,name', 'model', 'Visitor, Administrator', 'translated', 81) RETURNING id
```
Expected behavior:
Chat being open

Video/Screenshot link (optional):
![image](https://user-images.githubusercontent.com/10233975/28430589-aa27e01a-6d46-11e7-82fc-18473bcf0e5e.png)


addons/im_livechat/controllers/main.py
LivechatChannel = request.env['im_livechat.channel']
        available = len(LivechatChannel.browse(channel_id).get_available_users())
        rule = {}
        if available:
            
            country_id = False
            country_code = request.session.geoip and request.session.geoip.get('country_code') or False
            if country_code:
                country_ids = request.env['res.country'].sudo().search([('code', '=', country_code)])
                if country_ids:
                    country_id = country_ids[0].id
            
            url = request.httprequest.headers.get('Referer')
            
            matching_rule = request.env['im_livechat.channel.rule'].sudo().match_rule(channel_id, url, country_id)
            if matching_rule:
                rule = {
                    'action': matching_rule.action,
                    'auto_popup_timer': matching_rule.auto_popup_timer,
                    'regex_url': matching_rule.regex_url,
                }
        return {
            'available_for_me': available and (not rule or rule['action'] != 'hide_button'),
            'rule': rule,
        }
    @http.route('/im_livechat/get_session', type="json", auth='public')
    def get_session(self, channel_id, anonymous_name, **kwargs):