diff --git a/invoice.py b/invoice.py index ce10a6e737..2c4a08f830 100644 --- a/invoice.py +++ b/invoice.py @@ -14,9 +14,9 @@ class InvoiceLine: def __setup__(cls): super(InvoiceLine, cls).__setup__() cls._error_messages.update({ - 'delete_purchase_invoice_line': 'You can not delete ' \ - 'invoice lines that comes from a purchase!', - }) + 'delete_purchase_invoice_line': ('You can not delete ' + 'invoice lines that comes from a purchase!'), + }) @classmethod def write(cls, lines, vals): @@ -49,9 +49,9 @@ class InvoiceLine: def delete(cls, lines): cursor = Transaction().cursor if lines: - cursor.execute('SELECT id FROM purchase_invoice_line_rel ' \ - 'WHERE line IN (' + ','.join(['%s' for x in lines]) + ')', - [l.id for l in lines]) + cursor.execute('SELECT id FROM purchase_invoice_line_rel ' + 'WHERE line IN (' + ','.join(['%s' for x in lines]) + ')', + [l.id for l in lines]) if cursor.rowcount: cls.raise_user_error('delete_purchase_invoice_line') super(InvoiceLine, cls).delete(lines) diff --git a/purchase.py b/purchase.py index db1fd1e0b6..739a45579f 100644 --- a/purchase.py +++ b/purchase.py @@ -21,10 +21,10 @@ class Purchase: def __register__(cls, module_name): cursor = Transaction().cursor # Migration from 1.2: packing renamed into shipment - cursor.execute("UPDATE ir_model_data "\ - "SET fs_id = REPLACE(fs_id, 'packing', 'shipment') "\ - "WHERE fs_id like '%%packing%%' "\ - "AND module = %s", (module_name,)) + cursor.execute("UPDATE ir_model_data " + "SET fs_id = REPLACE(fs_id, 'packing', 'shipment') " + "WHERE fs_id like '%%packing%%' " + "AND module = %s", (module_name,)) super(Purchase, cls).__register__(module_name) diff --git a/setup.py b/setup.py index b76f831d6d..c712b0deed 100644 --- a/setup.py +++ b/setup.py @@ -25,10 +25,10 @@ requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res|webdav)(\W|$)', dep): requires.append('trytond_%s >= %s.%s, < %s.%s' % - (dep, major_version, minor_version, major_version, - minor_version + 1)) + (dep, major_version, minor_version, major_version, + minor_version + 1)) requires.append('trytond >= %s.%s, < %s.%s' % - (major_version, minor_version, major_version, minor_version + 1)) + (major_version, minor_version, major_version, minor_version + 1)) setup(name='trytond_purchase_invoice_line_standalone', version=info.get('version', '0.0.1'), @@ -36,16 +36,16 @@ setup(name='trytond_purchase_invoice_line_standalone', long_description=read('README'), author='Tryton', url='http://www.tryton.org/', - download_url="http://downloads.tryton.org/" + \ - info.get('version', '0.0.1').rsplit('.', 1)[0] + '/', + download_url=("http://downloads.tryton.org/" + + info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'), package_dir={'trytond.modules.purchase_invoice_line_standalone': '.'}, packages=[ 'trytond.modules.purchase_invoice_line_standalone', 'trytond.modules.purchase_invoice_line_standalone.tests', ], package_data={ - 'trytond.modules.purchase_invoice_line_standalone': \ - info.get('xml', []) + ['tryton.cfg', 'locale/*.po'], + 'trytond.modules.purchase_invoice_line_standalone': ( + info.get('xml', []) + ['tryton.cfg', 'locale/*.po']), }, classifiers=[ 'Development Status :: 5 - Production/Stable',