Catch exception when saving many2one

This commit is contained in:
Cédric Krier
2009-06-22 11:20:51 +02:00
parent 4c31e5a994
commit c8dd778b44
@@ -136,7 +136,12 @@ class Dialog(object):
while True:
res = self.dia.run()
if res == gtk.RESPONSE_OK:
if self.screen.save_current():
obj_id = None
try:
obj_id = self.screen.save_current()
except Exception, exception:
common.process_exception(exception, self.dia)
if obj_id:
return (True, (self.screen.current_model.id,
self.screen.current_model.rec_name()))
else: