Community mailing list archives

community@mail.odoo.com

Re: QWeb, t-call value

by
Paul Catinean
- 05/05/2015 11:37:45
Thank you for the reply Anders

I have indeed tried this approach as well but since I call the function which returns the rendered view I loose the initial qwebcontext of the calling template, not sure how I can send/retreive that as well so it acts like a regular t-call

Regards,
Paul

On Tue, May 5, 2015 at 10:58 AM, Anders Wallenquist <anders.wallenquist@vertel.se> wrote:


Den 2015-05-05 09:10, Paul Catinean skrev:
<blockquote cite="mid:CAFsjgs=tdpEywnMtSHkxPc3FgRgpMw0d1R5ZXhq9J6FHC6Tf-A@mail.gmail.com" type="cite">
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

Sorry,

I do this some times:

        return request.website.render("smart_common.legal_%s" %  pool.get('res.users').browse(cr, uid, uid).company_id.country_id.code.lower() , values)

Regards,

Anders Wallenquist
<blockquote cite="mid:CAFsjgs=tdpEywnMtSHkxPc3FgRgpMw0d1R5ZXhq9J6FHC6Tf-A@mail.gmail.com" type="cite">

On Tue, May 5, 2015 at 1:16 AM, Anders Wallenquist <anders.wallenquist@vertel.se> wrote:
Den 2015-05-04 23:57, Paul Catinean skrev:
> Hi everyone,
>
> Wanted to know if there is a possibility of passing variables to 
> t-call instead of just a string
>
> For example 
> and then pass xml_id to t-call?
>

You can use your variable xml_id in the template that you do t-call


Regards,

Anders Wallenquist
> Regards,
> Paul
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>

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


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


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