Remove unuseful read of rec_name in Reference widgets

This commit is contained in:
Cédric Krier committed 2011-09-21 12:28:43 +02:00
1 parent 9ec29f5563
commit c0aeaa0cfe
2 files changed
-20

No files matched your search

@@ -281,15 +281,6 @@ class Reference(WidgetInterface):
model, (obj_id, name) = value
if model:
child.set_text(self._selection2[model])
if not name and obj_id:
args = ('model', model, 'read', obj_id, ['rec_name'],
rpc.CONTEXT)
try:
name = rpc.execute(*args)
except TrytonServerError, exception:
name = common.process_exception(exception, *args)
if not name:
name = '???'
self.wid_text.set_text(name)
if obj_id:
img.set_from_stock('tryton-open', gtk.ICON_SIZE_SMALL_TOOLBAR)
@@ -823,17 +823,6 @@ class Reference(Char):
else:
model, (obj_id, name) = value
if model:
if not name and obj_id:
args = ('model', model, 'read', obj_id, ['rec_name'],
rpc.CONTEXT)
try:
res = rpc.execute(*args)
except TrytonServerError, exception:
res = common.process_exception(exception, *args)
if not res:
name = '???'
else:
name = res['rec_name']
return self._selection.get(model, model) + ',' + name
else:
return name