[FIX] pep8

This commit is contained in:
Holger Brunn 2014-07-30 14:51:42 +02:00
parent 7fad9182db
commit f387ff26e2
2 changed files with 3 additions and 5 deletions

View File

@ -39,7 +39,6 @@ class DocumentDirectory(Model):
],
context=context),
context=context):
#TODO: add write tests
result.append(this)
return result
@ -60,6 +59,7 @@ class DocumentDirectory(Model):
from openerp.addons.web.http import httprequest
from openerp.addons.web.controllers.main import Binary
original = Binary.upload_attachment
@httprequest
def upload_attachment(self, req, callback, model, id, ufile,
directory_id=None):

View File

@ -19,7 +19,6 @@
#
##############################################################################
from openerp.osv.orm import Model
from openerp.osv import fields
class IrAttachment(Model):
@ -28,7 +27,8 @@ class IrAttachment(Model):
def _auto_init(self, cr, context=None):
'''drop filename_unique if it exists and prevent it from being
created'''
cr.execute('''SELECT
cr.execute(
'''SELECT
conname, pg_catalog.pg_get_constraintdef(oid, true) as condef
FROM pg_constraint where conname=%s''',
('ir_attachment_filename_unique',))
@ -51,5 +51,3 @@ class IrAttachment(Model):
cr, uid, ids, fields_to_read=fields_to_read, context=context,
load=load)
return result