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
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)