Review: Needs Fixing
Hello,
I think this is not the right place to fix this.
The issue should be fixed from class document_file's create defined in
document.py as this inherits ir_attachment
Secondly the main root of the problem is that in create we already check for
the directory context and vals dict if we didn't find any we use the default
one i.e the root directory. In your case the ir_attachment create is triggered
from the report engine which will never set this field in context nor in vals
which in turn pop's up this bug.
So as a solution make changes in the create overridden in document.py something
like
if document not in context nor in vals:
if type in vals and type == folder per resource
search the directory based on the resource and use.
Note: its just a snippet
Thanks,
Naresh
--
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-579669-nep/+merge/126935
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-server/6.1-opw-579669-nep.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp