Fix flake8
This commit is contained in:
1 parent
175caf60b3
commit
b5ce9ba7e0
3 files changed
+17
-17
No files matched your search
+6
-6
@@ -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)
|
||||
+4
-4
@@ -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)
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user