bugfix_301049
bzr revid: fp@tinyerp.com-20081123110717-c7odqp2ri7du65s0
This commit is contained in:
parent
b2d2fe75a3
commit
21a9b9e064
|
@ -678,7 +678,8 @@ class related(function):
|
|||
where += " %s.%s %s '%s' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2])
|
||||
if field_detail[1] in ['integer', 'long', 'float','integer_big']:
|
||||
where += " %s.%s %s '%d' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2])
|
||||
query += where.rstrip('and')
|
||||
if len(where)>10:
|
||||
query += where.rstrip('and')
|
||||
cr.execute(query)
|
||||
ids = []
|
||||
for id in cr.fetchall():
|
||||
|
@ -718,6 +719,7 @@ class related(function):
|
|||
|
||||
# TODO: call field_get on the object, not in the DB
|
||||
def _field_get(self, cr, uid, obj, model_name, prop):
|
||||
print model_name, prop
|
||||
fields = obj.pool.get(model_name).fields_get(cr, uid,)
|
||||
if fields.get(prop, False):
|
||||
return(fields[prop].get('relation', False), fields[prop].get('type', False), fields)
|
||||
|
|
|
@ -109,7 +109,7 @@ class TinyPoFile(object):
|
|||
if line.startswith('#:'):
|
||||
tmp_tnrs.append( line[2:].strip().split(':') )
|
||||
line = self.lines.pop(0).strip()
|
||||
while not line:
|
||||
while (not line) and self.lines:
|
||||
# allow empty lines between comments and msgid
|
||||
line = self.lines.pop(0).strip()
|
||||
if not line.startswith('msgid'):
|
||||
|
|
Loading…
Reference in New Issue