{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/13314","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/13314/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/13314/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/13314/events","html_url":"https://github.com/odoo/odoo/issues/13314","id":173595543,"number":13314,"title":"[8.0] Quote use on 't-field-options'","user":{"login":"alexdgs","id":7460734,"avatar_url":"https://avatars.githubusercontent.com/u/7460734?v=3","gravatar_id":"","url":"https://api.github.com/users/alexdgs","html_url":"https://github.com/alexdgs","followers_url":"https://api.github.com/users/alexdgs/followers","following_url":"https://api.github.com/users/alexdgs/following{/other_user}","gists_url":"https://api.github.com/users/alexdgs/gists{/gist_id}","starred_url":"https://api.github.com/users/alexdgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexdgs/subscriptions","organizations_url":"https://api.github.com/users/alexdgs/orgs","repos_url":"https://api.github.com/users/alexdgs/repos","events_url":"https://api.github.com/users/alexdgs/events{/privacy}","received_events_url":"https://api.github.com/users/alexdgs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-27T13:12:14Z","updated_at":"2016-08-27T20:18:24Z","closed_at":"2016-08-27T20:18:24Z","body":"**Impacted versions:**\r\nTested in 8.0 commit c55c15aef39e9780cf48d2bc967b4e8357f31402 (latest when reporting). Executing server in Linux Debian Jessie (up-to-date) with all Python dependencies from requirements.txt installed inside a virtualenv.\r\n\r\n**Steps to reproduce:**\r\n1. Inside a printable report template (XML file), locate/declare a field using `'t-field'` and add the attribute 't-field-options' for additional formatting. Make sure that **double quotes** (\") are used for delimiting the attribute value and **single quotes** (') for inner strings.\r\ne.g. `<span t-field=\"detail.piece\" t-field-options=\"{'widget': 'monetary', 'display_currency': 'detail.currency_id'}\"/>`\r\n2. Update the module containing the report.\r\n3. Print the report.\r\n\r\n**Current behavior:**\r\nAn exception is launched. This is the error at the end of the traceback:\r\n`QWebException: Expecting property name: line 1 column 2 (char 1)`\r\nHere the [full traceback](https://github.com/odoo/odoo/files/440642/traceback.txt)\r\n\r\nBut **swapping** single and double quotes like in:\r\n`<span t-field=\"detail.piece\" t-field-options='{\"widget\": \"monetary\", \"display_currency\": \"detail.currency_id\"}'/>`\r\nAnd updating the module, makes report printing successful.\r\n\r\n**Expected behavior:**\r\nReport should print regardless of which quotation style is used for XML attribute values, as using either single or double quotes for delimiting them is legal syntax.\r\n\r\nThis issue seems don't occur with similar Odoo XML dictionary-like attribute values, like `attrs` and `options` in views.\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/242938549","html_url":"https://github.com/odoo/odoo/issues/13314#issuecomment-242938549","issue_url":"https://api.github.com/repos/odoo/odoo/issues/13314","id":242938549,"user":{"login":"JKE-be","id":4848797,"avatar_url":"https://avatars.githubusercontent.com/u/4848797?v=3","gravatar_id":"","url":"https://api.github.com/users/JKE-be","html_url":"https://github.com/JKE-be","followers_url":"https://api.github.com/users/JKE-be/followers","following_url":"https://api.github.com/users/JKE-be/following{/other_user}","gists_url":"https://api.github.com/users/JKE-be/gists{/gist_id}","starred_url":"https://api.github.com/users/JKE-be/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JKE-be/subscriptions","organizations_url":"https://api.github.com/users/JKE-be/orgs","repos_url":"https://api.github.com/users/JKE-be/repos","events_url":"https://api.github.com/users/JKE-be/events{/privacy}","received_events_url":"https://api.github.com/users/JKE-be/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T20:18:24Z","updated_at":"2016-08-27T20:18:24Z","body":"hi @alexdgs \r\n\r\nIt is because it is parsed as json... and the json RFC require a \" as 'quotation mark'. (https://tools.ietf.org/html/rfc7158#section-7)\r\nIt has been improved in v10 since odoo compile template in ast and so use ast.literal_eval on it. \r\nSo in v8/9 \" is require, in v10 we will support the '"}}
{"actor":{"display_login":"JKE-be"}}