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

argument 2 to map() must support iteration

By
shashank verma
on 6/20/13, 6:46 AM 2,646 views

hello

iam working on crm_claim_rma module i create PICKING IN and process it. i go to warehouse -> incoming shipment and select "Product to stock" button, it gives following error

server-6.1/openerp/osv/orm.py", line 3415, in read select = map(lambda x: isinstance(x, dict) and x['id'] or x, select)

code :

def _get_dest_loc(self, cr, uid, context):

    if context is None: context = {}
    warehouse_obj = self.pool.get('stock.warehouse')
    warehouse_id = context.get('warehouse_id')
    if context.get('picking_type'):
        context_loc = context.get('picking_type')[8:]
        loc_field = 'lot_%s_id' %context.get('picking_type')[8:]
        loc_id = warehouse_obj.read(cr, uid, warehouse_id, [loc_field], context=context)[loc_field][0]     # on this line i get error  " TypeError: 'argument 2 to map() must support iteration' "

    return loc_id

iam not able to figure out how to resolve this error please help

thanks

0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 6/20/13, 9:13 AM

hello, I couldn't find this function on the stock module, is it customized?

just try to omit [loc_field][0] and check is it works?

yes its a customized module. anyways i have resolved this issue thanks for responding Ahmed

shashank verma
on 6/20/13, 1:02 PM

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

0 follower(s)

Stats

Asked: 6/20/13, 6:46 AM
Seen: 2646 times
Last updated: 3/16/15, 8:10 AM