← Back to team overview

openerp-india team mailing list archive

[Bug 985329] Re: OpenERP 6.1 - Export of users data fails

 

We have been given the following patch, which works for us:

=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py	2012-08-26 20:26:55 +0000
+++ openerp/osv/orm.py	2012-08-28 11:38:10 +0000
@@ -1124,7 +1124,10 @@
                     elif f[i] == 'id':
                         r = _get_xml_id(self, cr, uid, r)
                     else:
-                        r = r[f[i]]
+                        if f[i].startswith('in_group_') or f[i].startswith('in_groups_') or f[i].startswith('sel_groups_'):
+                            r = self.read(cr, uid, row.id, [f[i]], context)[f[i]]
+                        else:
+                            r = r[f[i]]
                         # To display external name of selection field when its exported
                         if f[i] in self._columns.keys():
                             cols = self._columns[f[i]]

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

Title:
  OpenERP 6.1 - Export of users data fails

Status in OpenERP Server:
  Confirmed
Status in OpenERP Server 6.1 series:
  Confirmed

Bug description:
  Server: OpenERP 6.1 (OpenERP Server 6.1-20120325-233047)

  1) setup clean system and install a module such as Sales or Warehouse as admin
  2) go to Settings -> Users -> Users
  3) go to Other Options -> Export 
  4) Add all fields and select "Export to File"

  You will never get a file to download.
  The web interface will indicate it is working for some time, then disappear whereas the page will load forever. 

  In the server log you will see a Error message similar to this:
  ERROR:openerp.netsvc:Field 'sel_groups_13_14_15' does not exist in object 'browse_record(res.users, 1)'

  The above error is assuming the you attempted to export "Accounting &
  Finance".

  Fields that cause similar errors on export:  
  Accounting & Finance
  Administration
  Analytic Accounting
  Extended View
  Human Resources
  Knowledge Management
  Multi Companies
  Partner Manager
  Product UoS View
  Product Variant
  Purchase Management
  Sales Management
  Technical Features
  Warehouse Management

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


References