c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #21430
[Bug 753337] Re: [5.0] document_file create
Hello Azazahmed,
I am happy to work on this fix (as I have already done the changes on my
installation), but I can't change the status or assign it to myself as I
get a forbidden error message.
Regards,
Ignacio
--
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