Catch exception when saving many2one
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user