[FIX] Importation when fails,needs cursor to be rolled back
bzr revid: jvo@tinyerp.com-20091214095643-2ykgs3849tj7smzj
This commit is contained in:
@@ -843,6 +843,8 @@ class orm_template(object):
|
||||
except Exception, e:
|
||||
import psycopg2
|
||||
import osv
|
||||
#Needed to rollback the cursor for letting the _('text') work
|
||||
cr.rollback()
|
||||
if isinstance(e,psycopg2.IntegrityError):
|
||||
msg= _('Insertion Failed! ')
|
||||
for key in self.pool._sql_error.keys():
|
||||
|
||||
Reference in New Issue
Block a user