summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2011-11-30 13:02:39 +0100
committerOlivier Dony <odo@openerp.com>2011-11-30 13:02:39 +0100
commitc5c88c43c07dfb2ef2f3def2bd9441a3cbd1fba0 (patch)
treebd6de28f5a18121fb1fc7ad982bf6b0e325df24c /addons/document/document.py
parent84f0f3efeca65692c4c82ca3db67bd3b391fe51a (diff)
[FIX] document: removed dangerous and useless commits
These commits were introduce mostly at revision 1849.1.1 revid:hmo@tinyerp.com-20081111052750-zqzvr6oaihvt103t in an attempt to fix an issue with transactions originating from FTP connections. This was wrong: the virtual FTP filesystem should perform its own transaction management for each operation, just like the RPC layer does it for each request. Forcing a commit in the business code during the course of a normal transaction is totally *forbidden*! In addition, the FTP layer now properly manages its transactions, so the commit calls were useless anyway. bzr revid: odo@openerp.com-20111130120239-5fcavvpd14w056zb
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 1bf177f50e6..36b10b34e4b 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -254,7 +254,6 @@ class document_file(osv.osv):
del vals['file_size']
if ids and vals:
result = super(document_file,self).write(cr, uid, ids, vals, context=context)
- cr.commit() # ?
return result
def create(self, cr, uid, vals, context=None):
@@ -299,7 +298,6 @@ class document_file(osv.osv):
else:
#raise osv.except_osv(_('ValidateError'), _('File name must be unique!'))
result = super(document_file, self).create(cr, uid, vals, context)
- cr.commit() # ?
return result
def __get_partner_id(self, cr, uid, res_model, res_id, context=None):