{"action":"created","issue":{"url":"https://api.github.com/repos/openlabs/trytond-sale-channel/issues/20","labels_url":"https://api.github.com/repos/openlabs/trytond-sale-channel/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/openlabs/trytond-sale-channel/issues/20/comments","events_url":"https://api.github.com/repos/openlabs/trytond-sale-channel/issues/20/events","html_url":"https://github.com/openlabs/trytond-sale-channel/issues/20","id":65496630,"number":20,"title":"IndexError: list index out of range","user":{"login":"mbehrle","id":304732,"avatar_url":"https://avatars.githubusercontent.com/u/304732?v=3","gravatar_id":"","url":"https://api.github.com/users/mbehrle","html_url":"https://github.com/mbehrle","followers_url":"https://api.github.com/users/mbehrle/followers","following_url":"https://api.github.com/users/mbehrle/following{/other_user}","gists_url":"https://api.github.com/users/mbehrle/gists{/gist_id}","starred_url":"https://api.github.com/users/mbehrle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbehrle/subscriptions","organizations_url":"https://api.github.com/users/mbehrle/orgs","repos_url":"https://api.github.com/users/mbehrle/repos","events_url":"https://api.github.com/users/mbehrle/events{/privacy}","received_events_url":"https://api.github.com/users/mbehrle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-31T16:47:28Z","updated_at":"2015-04-06T08:49:47Z","closed_at":null,"body":"Getting this error regularly, but don't know yet why. Could be due to some lost context or similar on function fields...\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/trytond/protocols/jsonrpc.py\", line 150, in _marshaled_dispatch\r\n    response['result'] = dispatch_method(method, params)\r\n  File \"/trytond/protocols/jsonrpc.py\", line 179, in _dispatch\r\n    res = dispatch(*args)\r\n  File \"/trytond/protocols/dispatcher.py\", line 161, in dispatch\r\n    result = rpc.result(meth(*c_args, **c_kwargs))\r\n  File \"/trytond/res/user.py\", line 360, in get_preferences\r\n    preferences = cls._get_preferences(user, context_only=context_only)\r\n  File \"/trytond/modules/company/company.py\", line 171, in _get_preferences\r\n    context_only=context_only)\r\n  File \"/trytond/res/user.py\", line 325, in _get_preferences\r\n    res[field] = [x.id for x in getattr(user, field)]\r\n  File \"/trytond/model/fields/field.py\", line 213, in __get__\r\n    return inst.__getattr__(self.name)\r\n  File \"/trytond/model/modelstorage.py\", line 1311, in __getattr__\r\n    read_data = self.read(list(ids), ffields.keys())\r\n  File \"/trytond/modules/company/company.py\", line 220, in read\r\n    result = super(User, cls).read(ids, fields_names=fields_names)\r\n  File \"/trytond/model/modelsql.py\", line 645, in read\r\n    getter_results = field.get(ids, cls, field_list, values=result)\r\n  File \"/trytond/model/fields/function.py\", line 86, in get\r\n    return dict((name, call(name)) for name in names)\r\n  File \"/trytond/model/fields/function.py\", line 86, in <genexpr>\r\n    return dict((name, call(name)) for name in names)\r\n  File \"/trytond/model/fields/function.py\", line 80, in call\r\n    return dict((r.id, method(r, name)) for r in records)\r\n  File \"/trytond/model/fields/function.py\", line 80, in <genexpr>\r\n    return dict((r.id, method(r, name)) for r in records)\r\n  File \"/trytond/modules/sale_channel/user.py\", line 59, in get_allowed_channels\r\n    sale_admin = Group.search([('name', '=', 'Sales Administrator')])[0]\r\nIndexError: list index out of range\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/openlabs/trytond-sale-channel/issues/comments/89979905","html_url":"https://github.com/openlabs/trytond-sale-channel/issues/20#issuecomment-89979905","issue_url":"https://api.github.com/repos/openlabs/trytond-sale-channel/issues/20","id":89979905,"user":{"login":"tarunbhardwaj","id":3259423,"avatar_url":"https://avatars.githubusercontent.com/u/3259423?v=3","gravatar_id":"","url":"https://api.github.com/users/tarunbhardwaj","html_url":"https://github.com/tarunbhardwaj","followers_url":"https://api.github.com/users/tarunbhardwaj/followers","following_url":"https://api.github.com/users/tarunbhardwaj/following{/other_user}","gists_url":"https://api.github.com/users/tarunbhardwaj/gists{/gist_id}","starred_url":"https://api.github.com/users/tarunbhardwaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarunbhardwaj/subscriptions","organizations_url":"https://api.github.com/users/tarunbhardwaj/orgs","repos_url":"https://api.github.com/users/tarunbhardwaj/repos","events_url":"https://api.github.com/users/tarunbhardwaj/events{/privacy}","received_events_url":"https://api.github.com/users/tarunbhardwaj/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T08:49:47Z","updated_at":"2015-04-06T08:49:47Z","body":"Yes this issue will be there with different language. this should be replaced by xml id"}}