Odoo Help


Add a model into a pre-existant module (getting need more than 1 value to unpack error)

Alessandro D'Armiento
on 9/23/15, 9:48 AM 369 views

Hello, I'm trying to add the product.pricelist.item model into my website_sale module (to be able to retrieve stuff i created from that model and print them into the xml)

I added these lines into the main.py in the controller dir, under the shop function of the website_sale class:

items_obj = pool['product.pricelist.item']

items_ids = items.obj.search(cr, uid, [], context=context)

items = items_obj.browse(cr, uid, items_ids, context=context)

then i obviously added the line 'items' : items in the values list.

My problem is that whatever i then try to print, i get the error "need more than 1 value to unpack" which basically means there's nothing inside my items object.

Any help? Thanks

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


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)


Asked: 9/23/15, 9:48 AM
Seen: 369 times
Last updated: 9/23/15, 9:48 AM