Browse Source

[MRG] Fix PEP8 compliance

pull/510/head^2
Maxime Chambreuil 11 years ago
parent
commit
66c882de94
  1. 1
      mgmtsystem_kpi/__openerp__.py
  2. 22
      mgmtsystem_kpi/mgmtsystem_kpi.py

1
mgmtsystem_kpi/__openerp__.py

@ -68,4 +68,3 @@ This module depends on:
"installable": True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

22
mgmtsystem_kpi/mgmtsystem_kpi.py

@ -21,13 +21,13 @@
from dateutil.relativedelta import relativedelta
from datetime import datetime
from osv import fields, osv
from osv import fields, orm, osv
from openerp.tools.translate import _
import openerp.tools as tools
import time
import logging
_logger = logging.getLogger(__name__)
def is_one_value(result):
# check if sql query returns only one value
if type(result) is dict and 'value' in result.dictfetchone():
@ -37,6 +37,7 @@ def is_one_value(result):
else:
return False
def is_select_query(query):
# check if sql query is a SELECT statement
@ -45,7 +46,8 @@ def is_select_query(query):
return False
return True
class mgmtsystem_kpi_category(osv.osv):
class mgmtsystem_kpi_category(orm.Model):
"""
KPI Category
"""
@ -56,9 +58,8 @@ class mgmtsystem_kpi_category(osv.osv):
'description': fields.text('Description')
}
mgmtsystem_kpi_category()
class mgmtsystem_kpi_threshold_range(osv.osv):
class mgmtsystem_kpi_threshold_range(orm.Model):
"""
KPI Threshold Range
"""
@ -157,9 +158,8 @@ class mgmtsystem_kpi_threshold_range(osv.osv):
'valid': True,
}
mgmtsystem_kpi_threshold_range()
class mgmtsystem_kpi_threshold(osv.osv):
class mgmtsystem_kpi_threshold(orm.Model):
"""
KPI Threshold
"""
@ -236,9 +236,8 @@ class mgmtsystem_kpi_threshold(osv.osv):
color = range_obj.color
return color
mgmtsystem_kpi_threshold()
class mgmtsystem_kpi_history(osv.osv):
class mgmtsystem_kpi_history(orm.Model):
"""
History of the KPI
"""
@ -263,9 +262,8 @@ class mgmtsystem_kpi_history(osv.osv):
_order = "date desc"
mgmtsystem_kpi_threshold()
class mgmtsystem_kpi(osv.osv):
class mgmtsystem_kpi(orm.Model):
"""
Key Performance Indicators
"""
@ -381,6 +379,4 @@ class mgmtsystem_kpi(osv.osv):
'periodicity_uom': 'day',
}
mgmtsystem_kpi()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Loading…
Cancel
Save