Odoo Help

0

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

By
Krishna
on 7/14/16, 6:48 AM 348 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))"



About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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