Community mailing list archives

community@mail.odoo.com

Re: QWeb, t-call value

by
Paul Catinean
- 05/12/2015 06:56:52
Hello Olivier,

Thanks for answering, this was the first thing I tried and even though it does not show an error the view in not rendered at all and I specifically checked the variable value with t-debug="pdb" and the full external id is there

Tried: t-att-call="view_id" / t-att-call="#{view_id}" / t-att-call="{{view_id}}" // t-attf-call="{{view_id}}" // t-attf="#{view_id}"

None seem to works, what have I missed?

Regards,
Paul

On Wed, May 6, 2015 at 2:18 PM, Olivier Dony <odo@openerp.com> wrote:
On 05/05/2015 09:10 AM, Paul Catinean wrote:
> I think there is a misunderstanding here
>
> t-call="" takes in a external_id, if I pass a variable name there it does not
> try to parse it but instead looks for a external_id "xml"
>
> my question was wether I can somehow pass a variable name that is interpreted
> to the t-call attribute

t-call's argument is a format string[1], so you can use variable names in it, 
like you would in a t-attf- attribute[2]:

     mytemplate
     


[1] https://www.odoo.com/documentation/8.0/glossary.html#term-format-string
[2] https://www.odoo.com/documentation/8.0/reference/qweb.html#attributes

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe