Merge lp:~unifield-team/unifield-server/utp-521 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 3442
Proposed branch: lp:~unifield-team/unifield-server/utp-521
Merge into: lp:unifield-server
Diff against target: 39 lines (+9/-3)
1 file modified
bin/osv/orm.py (+9/-3)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/utp-521
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+152358@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/osv/orm.py'
2--- bin/osv/orm.py 2013-03-04 11:17:28 +0000
3+++ bin/osv/orm.py 2013-03-08 09:50:03 +0000
4@@ -644,7 +644,7 @@
5 elif f[i] in self._inherit_fields:
6 r = check_type(self._inherit_fields[f[i]][2]._type)
7 data[fpos] = r or False
8- break
9+ #break
10 if isinstance(r, (browse_record_list, list)):
11 first = True
12 fields2 = map(lambda x: (x[:i+1]==f[:i+1] and x[i+1:]) \
13@@ -662,10 +662,16 @@
14 lines2 = self.__export_row(cr, uid, row2, fields2,
15 context)
16 if first:
17+ # Make a check to see if there is data in at least one column
18+ # because before this test, only the first line is exported
19+ # if there is no data in the first column
20+ no_data = True
21 for fpos2 in range(len(fields)):
22 if lines2 and lines2[0][fpos2]:
23+ no_data = False
24 data[fpos2] = lines2[0][fpos2]
25- if not data[fpos]:
26+
27+ if no_data:
28 dt = ''
29 for rr in r:
30 name_relation = self.pool.get(rr._table_name)._rec_name
31@@ -686,7 +692,7 @@
32 if isinstance(r, browse_record):
33
34 # add support for reference fields
35- if cols._type == 'reference':
36+ if cols and cols._type == 'reference':
37 row_id = r.id
38 model = r._name
39 xml_id = r._get_xml_ids(cr, uid, [row_id]).get(row_id, '')

Subscribers

People subscribed via source and target branches

to all changes: