Created
April 23, 2013 13:49
-
-
Save martinhbramwell/5443701 to your computer and use it in GitHub Desktop.
OpenERP V7 patch for the bug "OpenERP 6.1 - Export of users data fails" https://bugs.launchpad.net/openobject-server/+bug/985329 ||| Also, please refer to this discussion : http://help.openerp.com/question/12789/whats-the-correct-way-to-access-technical-features/ ||| Usage: With wget, download the "raw" version of this file to your directory ${o…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- orm.py 2013-04-23 08:51:16.221986798 -0400 | |
+++ orm.py 2013-04-23 07:23:08.049987030 -0400 | |
@@ -1144,17 +1144,20 @@ | |
elif f[i] == 'id': | |
r = _get_xml_id(self, cr, uid, r) | |
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]] | |
- elif f[i] in self._inherit_fields.keys(): | |
- cols = selection_field(self._inherits) | |
- if cols and cols._type == 'selection': | |
- sel_list = cols.selection | |
- if r and type(sel_list) == type([]): | |
- r = [x[1] for x in sel_list if r==x[0]] | |
- r = r and r[0] or False | |
+ 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]] | |
+ elif f[i] in self._inherit_fields.keys(): | |
+ cols = selection_field(self._inherits) | |
+ if cols and cols._type == 'selection': | |
+ sel_list = cols.selection | |
+ if r and type(sel_list) == type([]): | |
+ r = [x[1] for x in sel_list if r==x[0]] | |
+ r = r and r[0] or False | |
if not r: | |
if f[i] in self._columns: | |
r = check_type(self._columns[f[i]]._type) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment