← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 818951] Re: Import module wizard crashed with not-zip files and not work with correct zip

 

** Changed in: openobject-server
   Importance: Undecided => Low

** Changed in: openobject-server
       Status: New => Confirmed

** Changed in: openobject-server
     Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)

-- 
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/818951

Title:
  Import module wizard crashed with not-zip files and not work with
  correct zip

Status in OpenERP Server:
  Confirmed

Bug description:
  1. If try load not zip-file - crash with traceback :
  ----
  Traceback (most recent call last):
    File "/home/boris/projects/openerp/openobject-server/openerp/osv/osv.py", line 118, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/boris/projects/openerp/openobject-server/openerp/osv/osv.py", line 172, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/boris/projects/openerp/openobject-server/openerp/osv/osv.py", line 163, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/boris/projects/openerp/openobject-server/openerp/addons/base/module/wizard/base_module_import.py", line 56, in importzip
      fdata = zipfile.ZipFile(fp, 'r')
    File "/usr/lib/python2.7/zipfile.py", line 712, in __init__
      self._GetContents()
    File "/usr/lib/python2.7/zipfile.py", line 746, in _GetContents
      self._RealGetContents()
    File "/usr/lib/python2.7/zipfile.py", line 761, in _RealGetContents
      raise BadZipfile, "File is not a zip file"
  BadZipfile: File is not a zip file
  ---
  Need catch that exception and raise osv.except_osv

  2. For some zip  files (exmpl: olap, hotel) when user try load them - raised error `Can not create the module file: ..../module_name/wizard.zip`!
  Must be `.....module_name.zip`.

  PS: I have fix for that and I push my new branch soon.

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


References