[FIX] service: put autocommit true on EDI import service to store imported data

bzr revid: hmo@tinyerp.com-20110715095059-96rrh2pu4acevzj4
This commit is contained in:
Harry (OpenERP)
2011-07-15 15:20:59 +05:30
parent 045b42b03a
commit 1d7eb0cdc2
2 changed files with 3 additions and 2 deletions
+1 -2
View File
@@ -519,6 +519,5 @@ class edi(object):
values[field] = one2many_ids
else:
values[field] = edi_field_value
return model_data._update(cr, uid, self._name, edi_module, values, context=context)
return self.pool.get(self._name).create(cr, uid, values, context=context)
# vim: ts=4 sts=4 sw=4 si et
+2
View File
@@ -62,6 +62,7 @@ class edi(netsvc.ExportService):
pool = pooler.get_pool(db)
edi_pool = pool.get('ir.edi.document')
try:
cr.autocommit(True)
res = edi_pool.import_edi(cr, uid, edi_document=edi_document, context=context)
finally:
cr.close()
@@ -73,6 +74,7 @@ class edi(netsvc.ExportService):
pool = pooler.get_pool(db)
edi_pool = pool.get('ir.edi.document')
try:
cr.autocommit(True)
res = edi_pool.import_edi(cr, uid, edi_url=edi_url, context=context)
finally:
cr.close()