{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/10403","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/10403/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/10403/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/10403/events","html_url":"https://github.com/odoo/odoo/pull/10403","id":125936940,"number":10403,"title":"[Fix] Import _ for account_test reports","user":{"login":"jlaloux","id":7678583,"avatar_url":"https://avatars.githubusercontent.com/u/7678583?v=3","gravatar_id":"","url":"https://api.github.com/users/jlaloux","html_url":"https://github.com/jlaloux","followers_url":"https://api.github.com/users/jlaloux/followers","following_url":"https://api.github.com/users/jlaloux/following{/other_user}","gists_url":"https://api.github.com/users/jlaloux/gists{/gist_id}","starred_url":"https://api.github.com/users/jlaloux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlaloux/subscriptions","organizations_url":"https://api.github.com/users/jlaloux/orgs","repos_url":"https://api.github.com/users/jlaloux/repos","events_url":"https://api.github.com/users/jlaloux/events{/privacy}","received_events_url":"https://api.github.com/users/jlaloux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-11T12:48:20Z","updated_at":"2016-04-27T13:34:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/10403","html_url":"https://github.com/odoo/odoo/pull/10403","diff_url":"https://github.com/odoo/odoo/pull/10403.diff","patch_url":"https://github.com/odoo/odoo/pull/10403.patch"},"body":"When you print a report from account_test module. In some cases Odoo tries to use '_' to translate text but this is not imported or in localcontext.\r\n\r\nTo reproduce the bug easily.\r\nStep 1:\r\nGo into reporting/Accounting Tests \r\n![image](https://cloud.githubusercontent.com/assets/7678583/12233598/5547e14c-b868-11e5-934d-c242adabd3b4.png)\r\n\r\nTake the first one \"Test 1: General balance\" and go into \"Expression\". You'll see a line using \"_()\"\r\n![image](https://cloud.githubusercontent.com/assets/7678583/12233662/fac2970c-b868-11e5-860e-59d89635f046.png)\r\n\r\nYou can change you data's to go inside your if or the easier choice is to copy/paste the line before your if and so it will try to translate the text everytime.\r\n![image](https://cloud.githubusercontent.com/assets/7678583/12233747/6cdaf3a2-b869-11e5-8147-657a32e2ab1a.png)\r\n\r\nPrint the accounting tests:\r\n![image](https://cloud.githubusercontent.com/assets/7678583/12233752/80f809ec-b869-11e5-80f1-d3cf1f53ccb1.png)\r\n\r\nAnd you'll get this error\r\n![image](https://cloud.githubusercontent.com/assets/7678583/12233764/93699e06-b869-11e5-8ea9-a17a5c6fe50a.png)\r\n\r\nWe could have imported _  inside the python code but like \"_\" is used in every test. This is much easier to pass it trough the localcontext\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/215084503","html_url":"https://github.com/odoo/odoo/pull/10403#issuecomment-215084503","issue_url":"https://api.github.com/repos/odoo/odoo/issues/10403","id":215084503,"user":{"login":"jlaloux","id":7678583,"avatar_url":"https://avatars.githubusercontent.com/u/7678583?v=3","gravatar_id":"","url":"https://api.github.com/users/jlaloux","html_url":"https://github.com/jlaloux","followers_url":"https://api.github.com/users/jlaloux/followers","following_url":"https://api.github.com/users/jlaloux/following{/other_user}","gists_url":"https://api.github.com/users/jlaloux/gists{/gist_id}","starred_url":"https://api.github.com/users/jlaloux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlaloux/subscriptions","organizations_url":"https://api.github.com/users/jlaloux/orgs","repos_url":"https://api.github.com/users/jlaloux/repos","events_url":"https://api.github.com/users/jlaloux/events{/privacy}","received_events_url":"https://api.github.com/users/jlaloux/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T13:34:58Z","updated_at":"2016-04-27T13:34:58Z","body":"No news?"}}