{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/29666","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/29666/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/29666/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/29666/events","html_url":"https://github.com/odoo/odoo/issues/29666","id":392961945,"node_id":"MDU6SXNzdWUzOTI5NjE5NDU=","number":29666,"title":"[12][hr_holidays] Server Error when user without connected employee try to create leave","user":{"login":"grzekru","id":5862658,"node_id":"MDQ6VXNlcjU4NjI2NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/5862658?v=4","gravatar_id":"","url":"https://api.github.com/users/grzekru","html_url":"https://github.com/grzekru","followers_url":"https://api.github.com/users/grzekru/followers","following_url":"https://api.github.com/users/grzekru/following{/other_user}","gists_url":"https://api.github.com/users/grzekru/gists{/gist_id}","starred_url":"https://api.github.com/users/grzekru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grzekru/subscriptions","organizations_url":"https://api.github.com/users/grzekru/orgs","repos_url":"https://api.github.com/users/grzekru/repos","events_url":"https://api.github.com/users/grzekru/events{/privacy}","received_events_url":"https://api.github.com/users/grzekru/received_events","type":"User","site_admin":false},"labels":[{"id":1078895400,"node_id":"MDU6TGFiZWwxMDc4ODk1NDAw","url":"https://api.github.com/repos/odoo/odoo/labels/12.0","name":"12.0","color":"80f438","default":false},{"id":620800901,"node_id":"MDU6TGFiZWw2MjA4MDA5MDE=","url":"https://api.github.com/repos/odoo/odoo/labels/Services","name":"Services","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-12-20T09:38:21Z","updated_at":"2018-12-20T17:42:03Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Impacted versions:\r\n\r\n12\r\n\r\nSteps to reproduce:\r\n\r\n1. Create new user\r\n2. Log as new user\r\n3. Go to leaves\r\n4. Click on calendar\r\n\r\nCurrent behavior:\r\n\r\n>   File \"/home/gk/Software/odoo12/odoo/api.py\", line 749, in call_kw\r\n    return _call_kw_multi(method, model, args, kwargs)\r\n  File \"/home/gk/Software/odoo12/odoo/api.py\", line 736, in _call_kw_multi\r\n    result = method(recs, *args, **kwargs)\r\n  File \"/home/gk/Software/odoo12/odoo/models.py\", line 5430, in onchange\r\n    record._onchange_eval(name, field_onchange[name], result)\r\n  File \"/home/gk/Software/odoo12/odoo/models.py\", line 5283, in _onchange_eval\r\n    method_res = method(self)\r\n  File \"/home/gk/Software/odoo12/addons/hr_holidays/models/hr_leave.py\", line 325, in _onchange_type\r\n    self.employee_id = self.env.user.employee_ids[0].id\r\n  File \"/home/gk/Software/odoo12/odoo/models.py\", line 5053, in __getitem__\r\n    return self._browse((self._ids[key],), self.env)\r\nIndexError: tuple index out of range\r\n\r\nExpected behavior:\r\n\r\nNo server error, maybe alert in this place"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/449079039","html_url":"https://github.com/odoo/odoo/issues/29666#issuecomment-449079039","issue_url":"https://api.github.com/repos/odoo/odoo/issues/29666","id":449079039,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTA3OTAzOQ==","user":{"login":"pedrobaeza","id":7165771,"node_id":"MDQ6VXNlcjcxNjU3NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/7165771?v=4","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T17:42:03Z","updated_at":"2018-12-20T17:42:03Z","author_association":"CONTRIBUTOR","body":"No, it won't generate any. Check it. `.id` of an empty recordset is `False`."}}
{"actor":{"display_login":"pedrobaeza"}}