Fix flake8

This commit is contained in:
Cédric Krier
2013-02-24 14:21:50 +01:00
parent 1656cd5da4
commit 1326eeaffd
2 changed files with 23 additions and 23 deletions
+16 -16
View File
@@ -28,22 +28,22 @@ class ProductCostHistory(ModelSQL, ModelView):
Property = pool.get('ir.property')
Field = pool.get('ir.model.field')
return ('SELECT '
'MAX(h.__id) AS id, '
'MAX(h.create_uid) AS create_uid, '
'MAX(h.create_date) AS create_date, '
'MAX(h.write_uid) AS write_uid, '
'MAX(h.write_date) AS write_date, '
'COALESCE(h.write_date, h.create_date) AS date, '
'CAST(TRIM(\',\' FROM SUBSTRING(h.res FROM \',.*\')) AS '
'INTEGER) AS template, '
'CAST(TRIM(\',\' FROM h.value) AS NUMERIC) AS cost_price '
'FROM "' + Property._table + '__history" h '
'JOIN "' + Field._table + '" f ON (f.id = h.field) '
'WHERE f.name = \'cost_price\' '
'AND h.res LIKE \'product.template,%%\' '
'GROUP BY h.id, COALESCE(h.write_date, h.create_date), h.res, '
'h.value',
[])
'MAX(h.__id) AS id, '
'MAX(h.create_uid) AS create_uid, '
'MAX(h.create_date) AS create_date, '
'MAX(h.write_uid) AS write_uid, '
'MAX(h.write_date) AS write_date, '
'COALESCE(h.write_date, h.create_date) AS date, '
'CAST(TRIM(\',\' FROM SUBSTRING(h.res FROM \',.*\')) AS '
'INTEGER) AS template, '
'CAST(TRIM(\',\' FROM h.value) AS NUMERIC) AS cost_price '
'FROM "' + Property._table + '__history" h '
'JOIN "' + Field._table + '" f ON (f.id = h.field) '
'WHERE f.name = \'cost_price\' '
'AND h.res LIKE \'product.template,%%\' '
'GROUP BY h.id, COALESCE(h.write_date, h.create_date), h.res, '
'h.value',
[])
class OpenProductCostHistory(Wizard):
+7 -7
View File
@@ -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_product_cost_history',
version=info.get('version', '0.0.1'),
@@ -36,16 +36,16 @@ setup(name='trytond_product_cost_history',
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.product_cost_history': '.'},
packages=[
'trytond.modules.product_cost_history',
'trytond.modules.product_cost_history.tests',
],
package_data={
'trytond.modules.product_cost_history': info.get('xml', []) \
+ ['tryton.cfg', 'locale/*.po'],
'trytond.modules.product_cost_history': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',