Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm trying to make a filter from sale.order on products . I succeed in working with fields.related :
Unfortunately, when I try to duplicate, I have this issue : (http://pastebin.com/sWypdH37)
File "/home/florent/DEV/Serveurs/openerp-7.0-series/server/openerp/osv/fields.py", line 1223, in <genexpr> res = dict((id, value and map(int, value) or ) for id, value in res.iteritems())
TypeError: argument 2 to map() must support iteration
Could you tell me if it could be considered as a bug? Is there a better way to get all the sale.orders that have a specific product inside?
When you say you succeed in working... you mean the field works as expected? Have you tried to show it in the view and see if the products show up as expected?
If not, you could try setting the field as many2many instead of one2many.
As another, more general option, if you don't manage with the related field, you could add in the sale order a function field with a fnct_search, and show it in the search view. As an example, see the field search_all_attributes in lot.py, lp:openerp-product-attributes/6.1/production_lot_custom_attributes.
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/17/14, 5:05 AM|
|Seen: 976 times|
|Last updated: 3/16/15, 8:10 AM|