{"action":"created","issue":{"url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/3819","labels_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/3819/labels{/name}","comments_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/3819/comments","events_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/3819/events","html_url":"https://github.com/Dolibarr/dolibarr/issues/3819","id":113870515,"number":3819,"title":"Can't test if a field object_total_vat_locale_x.x is defined before use in odt templates","user":{"login":"jpfox","id":5191640,"avatar_url":"https://avatars.githubusercontent.com/u/5191640?v=3","gravatar_id":"","url":"https://api.github.com/users/jpfox","html_url":"https://github.com/jpfox","followers_url":"https://api.github.com/users/jpfox/followers","following_url":"https://api.github.com/users/jpfox/following{/other_user}","gists_url":"https://api.github.com/users/jpfox/gists{/gist_id}","starred_url":"https://api.github.com/users/jpfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpfox/subscriptions","organizations_url":"https://api.github.com/users/jpfox/orgs","repos_url":"https://api.github.com/users/jpfox/repos","events_url":"https://api.github.com/users/jpfox/events{/privacy}","received_events_url":"https://api.github.com/users/jpfox/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-28T17:09:35Z","updated_at":"2015-11-11T23:54:08Z","closed_at":"2015-11-02T14:45:10Z","body":"I need to have a table with different VAT amounts for each rate so I use {object_total_vat_locale_x.x} field. But, if there is no line for a particular vat rat, the filed is not set and so tag {object_total_vat_locale_x.x} is display as is.\r\n\r\nIf test [!-- IF {object_total_vat_locale_20} --] could work and return false if {object_total_vat_locale_20} is not defined, it could be a solution.\r\n\r\nHow can I conditionally use these kind of field ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/comments/155948024","html_url":"https://github.com/Dolibarr/dolibarr/issues/3819#issuecomment-155948024","issue_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/3819","id":155948024,"user":{"login":"eldy","id":883887,"avatar_url":"https://avatars.githubusercontent.com/u/883887?v=3","gravatar_id":"","url":"https://api.github.com/users/eldy","html_url":"https://github.com/eldy","followers_url":"https://api.github.com/users/eldy/followers","following_url":"https://api.github.com/users/eldy/following{/other_user}","gists_url":"https://api.github.com/users/eldy/gists{/gist_id}","starred_url":"https://api.github.com/users/eldy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldy/subscriptions","organizations_url":"https://api.github.com/users/eldy/orgs","repos_url":"https://api.github.com/users/eldy/repos","events_url":"https://api.github.com/users/eldy/events{/privacy}","received_events_url":"https://api.github.com/users/eldy/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T23:54:07Z","updated_at":"2015-11-11T23:54:07Z","body":"This is probably because the condition\n[!-- IF ....]\nwas not entered in one pass into libreoffice but may have been entered by\ncut and paste and using the back key of keyboard.\nSometimes also libreoffice replace the -- with -\n\nOpen the .odt file with unzip then open the file content.xml and check\ninside that you can see the condition with exact syntax.\n\n2015-11-10 11:29 GMT+01:00 Jean-Pierre Morfin <notifications@github.com>:\n\n> Sorry @eldy <https://github.com/eldy> but I apply patch from d0d4c5e\n> <https://github.com/Dolibarr/dolibarr/commit/d0d4c5e7f8a625badb0157badef4c9ae8dbe81dc>\n> and it does not work :-(\n> If var is not defined whole [!-- IF ....] { } [!-- ENDIF...] is still\n> generated as is, not replaced by the \"else\" value.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/Dolibarr/dolibarr/issues/3819#issuecomment-155381550>.\n>\n\n\n\n-- \nEMail: eldy@destailleur.fr\nWeb: http://www.destailleur.fr\n------------------------------------------------------------------------------------\nGoogle+: https://plus.google.com/+LaurentDestailleur/\nFacebook: https://www.facebook.com/Destailleur.Laurent\nTwitter: http://www.twitter.com/eldy10\n------------------------------------------------------------------------------------\n* Dolibarr (Project leader): http://www.dolibarr.org (make a donation for\nDolibarr project via Paypal: contact@destailleur.fr)\n* AWStats (Author) : http://awstats.sourceforge.net (make a donation for\nAWStats project via Paypal: contact@destailleur.fr)\n* AWBot (Author) : http://awbot.sourceforge.net\n* CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net\n"}}