{"action":"created","issue":{"url":"https://api.github.com/repos/ARJhe/odoo11/issues/9","repository_url":"https://api.github.com/repos/ARJhe/odoo11","labels_url":"https://api.github.com/repos/ARJhe/odoo11/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/ARJhe/odoo11/issues/9/comments","events_url":"https://api.github.com/repos/ARJhe/odoo11/issues/9/events","html_url":"https://github.com/ARJhe/odoo11/issues/9","id":423555611,"node_id":"MDU6SXNzdWU0MjM1NTU2MTE=","number":9,"title":"Many2one field filter ","user":{"login":"ARJhe","id":34853697,"node_id":"MDQ6VXNlcjM0ODUzNjk3","avatar_url":"https://avatars0.githubusercontent.com/u/34853697?v=4","gravatar_id":"","url":"https://api.github.com/users/ARJhe","html_url":"https://github.com/ARJhe","followers_url":"https://api.github.com/users/ARJhe/followers","following_url":"https://api.github.com/users/ARJhe/following{/other_user}","gists_url":"https://api.github.com/users/ARJhe/gists{/gist_id}","starred_url":"https://api.github.com/users/ARJhe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARJhe/subscriptions","organizations_url":"https://api.github.com/users/ARJhe/orgs","repos_url":"https://api.github.com/users/ARJhe/repos","events_url":"https://api.github.com/users/ARJhe/events{/privacy}","received_events_url":"https://api.github.com/users/ARJhe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-21T03:06:14Z","updated_at":"2019-03-21T07:59:28Z","closed_at":null,"author_association":"OWNER","body":"```python\r\n    @api.onchange(\"day\")\r\n    def _filter_car_no(self):\r\n        return {'domain': {\"car_no\": [(\"day\", \"=\", self.day)]}}\r\n```\r\n\r\n\r\nwrong name be displayed,\r\nshould be a group of \"carno\"\r\n\r\n![marty-mcfly](https://upload.cc/i1/2019/03/21/OkfH5P.jpg)\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ARJhe/odoo11/issues/comments/475139285","html_url":"https://github.com/ARJhe/odoo11/issues/9#issuecomment-475139285","issue_url":"https://api.github.com/repos/ARJhe/odoo11/issues/9","id":475139285,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3NTEzOTI4NQ==","user":{"login":"ARJhe","id":34853697,"node_id":"MDQ6VXNlcjM0ODUzNjk3","avatar_url":"https://avatars0.githubusercontent.com/u/34853697?v=4","gravatar_id":"","url":"https://api.github.com/users/ARJhe","html_url":"https://github.com/ARJhe","followers_url":"https://api.github.com/users/ARJhe/followers","following_url":"https://api.github.com/users/ARJhe/following{/other_user}","gists_url":"https://api.github.com/users/ARJhe/gists{/gist_id}","starred_url":"https://api.github.com/users/ARJhe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARJhe/subscriptions","organizations_url":"https://api.github.com/users/ARJhe/orgs","repos_url":"https://api.github.com/users/ARJhe/repos","events_url":"https://api.github.com/users/ARJhe/events{/privacy}","received_events_url":"https://api.github.com/users/ARJhe/received_events","type":"User","site_admin":false},"created_at":"2019-03-21T07:59:28Z","updated_at":"2019-03-21T07:59:28Z","author_association":"OWNER","body":"Method Summary\r\n--\r\n\r\n1. set _rec_name in related class\r\n2. override name_get() function in related class\r\n\r\n\r\n\r\n---\r\n- first:\r\n\r\n --produce.py--\r\n```python\r\nclass YcWeight(models.Model):\r\n    _name = \"yc.weight\"\r\n    _rec_name = \"carno\"\r\n```\r\nor\r\n- second:\r\n```python\r\nclass YcWeight(models.Model):\r\n    _name = \"yc.weight\"\r\n    @api.multi\r\n    def name_get(self):\r\n        result = []\r\n        for record in self:\r\n            name = record.carno\r\n            result.append((record.id, name))\r\n        return result\r\n```\r\n"}}
{"actor":{"display_login":"ARJhe"}}