Created
March 10, 2016 16:32
-
-
Save simahawk/8b7c0f13823ba399d5d8 to your computer and use it in GitHub Desktop.
Odoo website - qweb t-field display issue w/ empty field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| here if you don't have a description you'll see "My description", | |
| no matter if you can edit the page or not. | |
| --> | |
| <div t-field="main_object.description">My description</div> | |
| <!-- | |
| my workaround ATM: render w/ `t-field` only if editable | |
| --> | |
| <t t-if="editable"> | |
| <div t-field="main_object.description"> | |
| No description for this page yet. You see this because you can edit this page. | |
| </div> | |
| </t> | |
| <t t-if="not editable and main_object.description"> | |
| <div t-esc="main_object.description" /> | |
| </t> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment