← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 753337] Re: [5.0] document_file create

 

Hello Ignacio,

If you have fixed the problem and ready to fix it in trunk extra addons.
Then I can confirm this bug and assign it to you. Waiting for your
reply.

Thanks.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/753337

Title:
  [5.0] document_file create

Status in OpenERP Modules (addons):
  Won't Fix

Bug description:
  In openERP 5.0.10 file bin/addons/portal_project/portal_project.py

  Line 108 the following code is wrong:
  if args[0]['default_res_id'] and args[0]['default_res_model'] == 'project.project':

  As per python manual http://docs.python.org/library/stdtypes.html#typesmapping :
  d[key]
      Return the item of d with key key. Raises a KeyError if key is not in the map.

  So the test will raise an error if default_res_id doesn't exist. It should be changed to:
   key in d
      Return True if d has a key key, else False.

  That is, the line of code should be:
   if 'default_res_id' in args[0] and args[0]['default_res_model'] == 'project.project':

  Kind regards



References