{"action":"created","issue":{"url":"https://api.github.com/repos/Vauxoo/odoo/issues/86","repository_url":"https://api.github.com/repos/Vauxoo/odoo","labels_url":"https://api.github.com/repos/Vauxoo/odoo/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/Vauxoo/odoo/issues/86/comments","events_url":"https://api.github.com/repos/Vauxoo/odoo/issues/86/events","html_url":"https://github.com/Vauxoo/odoo/pull/86","id":138322204,"number":86,"title":"[FIX] report, website_report: barcode widget","user":{"login":"luistorresm","id":7606656,"avatar_url":"https://avatars.githubusercontent.com/u/7606656?v=3","gravatar_id":"","url":"https://api.github.com/users/luistorresm","html_url":"https://github.com/luistorresm","followers_url":"https://api.github.com/users/luistorresm/followers","following_url":"https://api.github.com/users/luistorresm/following{/other_user}","gists_url":"https://api.github.com/users/luistorresm/gists{/gist_id}","starred_url":"https://api.github.com/users/luistorresm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luistorresm/subscriptions","organizations_url":"https://api.github.com/users/luistorresm/orgs","repos_url":"https://api.github.com/users/luistorresm/repos","events_url":"https://api.github.com/users/luistorresm/events{/privacy}","received_events_url":"https://api.github.com/users/luistorresm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-03T22:54:34Z","updated_at":"2016-03-03T23:27:11Z","closed_at":"2016-03-03T23:26:41Z","pull_request":{"url":"https://api.github.com/repos/Vauxoo/odoo/pulls/86","html_url":"https://github.com/Vauxoo/odoo/pull/86","diff_url":"https://github.com/Vauxoo/odoo/pull/86.diff","patch_url":"https://github.com/Vauxoo/odoo/pull/86.patch"},"body":"Up to this revision, barcodes set in reports are generated\r\nusing the controller `/report/barcode`,\r\nusing a `img` HTML tag, e.g. (from `report_location_barcode`)\r\n```\r\n<img t-if=\"not o.loc_barcode\"\r\n     t-att-src=\"'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s'\r\n     % ('Code128', o.name, 600, 100)\" style=\"width:300px;height:50px\"/>\r\n``\r\n\r\nThis `/report/barcode` route is set as `auth='user'`, meaning\r\nthe route can only be accessed by signed in users.\r\n\r\nWhen wkhtmltopdf prints a report containing such a barcode,\r\nit calls this `report/barcode` route, making sure to pass\r\nthe request session in the cookies, so wkhtmltopdf\r\nuses the same session than the one of the user. This is\r\nneeded, as only users can access this `report/barcode/` route.\r\n\r\nThis session is passed in `report.py`, in the method\r\n`_run_wkhtmltopdf`, thanks to the --cookie wkhtmltopdf\r\nparameter.\r\n\r\nNevertheless, if a report is printed through the website\r\nfront-end, as public (without a signed in user), the request\r\nsession is not associated to a signed in user, and therefore\r\nthe route `/report/barcode` refuses the access / redirects\r\nto the login, making it impossible to print a report\r\ncontaining a barcode without being signed in. This even\r\nif the report is printed as `sudo` through a controller\r\n(as this is the session of the not signed in user which is passed,\r\nnot a session associated to `sudo).\r\n\r\nFixes #10621\r\nopw-667797"},"comment":{"url":"https://api.github.com/repos/Vauxoo/odoo/issues/comments/192018228","html_url":"https://github.com/Vauxoo/odoo/pull/86#issuecomment-192018228","issue_url":"https://api.github.com/repos/Vauxoo/odoo/issues/86","id":192018228,"user":{"login":"nhomar","id":338634,"avatar_url":"https://avatars.githubusercontent.com/u/338634?v=3","gravatar_id":"","url":"https://api.github.com/users/nhomar","html_url":"https://github.com/nhomar","followers_url":"https://api.github.com/users/nhomar/followers","following_url":"https://api.github.com/users/nhomar/following{/other_user}","gists_url":"https://api.github.com/users/nhomar/gists{/gist_id}","starred_url":"https://api.github.com/users/nhomar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhomar/subscriptions","organizations_url":"https://api.github.com/users/nhomar/orgs","repos_url":"https://api.github.com/users/nhomar/repos","events_url":"https://api.github.com/users/nhomar/events{/privacy}","received_events_url":"https://api.github.com/users/nhomar/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T23:27:11Z","updated_at":"2016-03-03T23:27:11Z","body":"@moylop260 take care when update all, if conflicting, then this commit can be reverted."}}