← Back to team overview

openerp-india team mailing list archive

[Bug 1102991] Re: Survey module uses own subdirectory for tmp storage

 

Hi, this makes my yml tests fail. There are obvious security objections
to making OpenERP directories writable to the user running OpenERP.

Survey module is using its own report directory as a tmp location is
unacceptable. By the looks at it, create_report() could simply return
the base64 data of the report instead of saving it to be removed a
couple of lines later. And if you do need tmp storage, I believe Python
has the means to do that properly.


** Summary changed:

- Survey send invitation returns traceback "No such file or directory"
+ Survey module uses own subdirectory for tmp storage

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

Title:
  Survey module uses own subdirectory for tmp storage

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  Version 7.0-20130122-001415, with Survey module:

  To reproduce:
  - go to Tools > Surveys > Surveys, and open the "Community Survey"
  - click on the More button > Send Invitations
  - at the "Send Invitations" dialog, select a partner (any) a click "Send":

  
  Server Traceback (most recent call last):
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/addons/web/session.py", line 90, in send
      return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/netsvc.py", line 289, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/service/web_services.py", line 614, in dispatch
      res = fn(db, uid, *params)
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/osv/osv.py", line 169, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/osv/osv.py", line 123, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/osv/osv.py", line 179, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/osv/osv.py", line 166, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/erp_user/openerp/build-oe/v7/server/openerp/addons/survey/wizard/survey_send_invitation.py", line 131, in action_send
      file = open(addons.get_module_resource('survey', 'report') + id.title +".pdf")
  IOError: [Errno 2] No such file or directory: u'/home/erp_user/openerp/build-oe/v7/server/openerp/addons/survey/reportCommunity Survey.pdf'

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


References