← Back to team overview

openerp-india team mailing list archive

[Bug 1037089] Re: target_dict is string

 

Lookup ids returns long instead of list (line #58)

After the if test on line #63 continue testing the returned value.

if isinstance(ids, long):
    ids = [ids]

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1037089

Title:
  target_dict is string

Status in OpenERP Server:
  New

Bug description:
  string indices must be integers, not str
  TypeError: string indices must be integers, not str

  I got this error when selecting a purchase order from a tree view.
  Looking further I found the following.

  ir_attachment.py line #78

  for target_dict in targets:
      if not (target_dict['res_id'] and target_dict['res_model']):
          continue

  target_dict is a string. Perhaps targets['res_id'] should be used. Or
  target_dict should be assigned in a different way.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1037089/+subscriptions


References