Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can I get records data from python to xml template using Qweb?

By
Krishna
on 7/14/16, 6:48 AM 164 views

<t t-foreach= "costSP" t-as="cost_cPriceS">

<span itemprop="price" style="display:none;" t-esc="cost_cPriceS.standard_price"/>

<span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/>

</t>


if request.env.user.premium_user == True:

    cPrice = request.env['product.template'].search([('id','!=',False)])

    cost_cp = {'costSP':cPrice}

    return request.render("shopping_cart.usertype",cost_cp)


I will get the following error

"'NoneType' object is not iterable" while evaluating
"keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']>1 else None))"



Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/14/16, 6:48 AM
Seen: 164 times
Last updated: 7/14/16, 11:52 PM