bzr revid: fp@tinyerp.com-f0bf449f5418afbca3eb754969cc859643a0f58a
This commit is contained in:
Fabien Pinckaers 2008-06-17 12:56:35 +00:00
parent 8ceab97127
commit bd21609e49
2 changed files with 11 additions and 9 deletions

View File

@ -135,12 +135,14 @@ class osv_pool(netsvc.Service):
def exec_workflow(self, db, uid, obj, method, *args):
cr = pooler.get_db(db).cursor()
try:
try:
res = self.exec_workflow_cr(cr, uid, obj, method, *args)
cr.commit()
except Exception:
cr.rollback()
raise
res = self.exec_workflow_cr(cr, uid, obj, method, *args)
cr.commit()
except orm.except_orm, inst:
cr.rollback()
self.abortResponse(1, inst.name, 'warning', inst.value)
except except_osv, inst:
cr.rollback()
self.abortResponse(1, inst.name, inst[0], inst.value)
finally:
cr.close()
return res

View File

@ -205,9 +205,9 @@ if __name__=='__main__':
lang = 'nl'
if len(argv) < 2:
for i in range(1,200):
print i, ">>", int_to_text(i, lang)
print i, ">>", amount_to_text(i, lang)
for i in range(200,999999,139):
print i, ">>", int_to_text(i, lang)
print i, ">>", amount_to_text(i, lang)
else:
print int_to_text(int(argv[1]), lang)
print amount_to_text(int(argv[1]), lang)