Skip to Content
Menu
This question has been flagged
1 Reply
9477 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

Avatar
Discard
Best Answer

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?

Avatar
Discard
Author

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