diff --git a/web_dashboard_tile/__init__.py b/web_dashboard_tile/__init__.py index a90906cd..9ad11b3e 100644 --- a/web_dashboard_tile/__init__.py +++ b/web_dashboard_tile/__init__.py @@ -23,4 +23,4 @@ # ############################################################################## -from . import model +from . import tile diff --git a/web_dashboard_tile/model/__init__.py b/web_dashboard_tile/model/__init__.py deleted file mode 100644 index 9ad11b3e..00000000 --- a/web_dashboard_tile/model/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2010-2013 OpenERP s.a. (). -# Copyright (C) 2014 initOS GmbH & Co. KG (). -# Copyright (C) 2015-Today GRAP -# Author Markus Schneider -# @author Sylvain LE GAL (https://twitter.com/legalsylvain) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import tile diff --git a/web_dashboard_tile/model/tile.py b/web_dashboard_tile/tile.py similarity index 95% rename from web_dashboard_tile/model/tile.py rename to web_dashboard_tile/tile.py index 28778097..f206dc97 100644 --- a/web_dashboard_tile/model/tile.py +++ b/web_dashboard_tile/tile.py @@ -62,16 +62,16 @@ class tile(orm.Model): desc = r.field_id.field_description if r.field_function == 'min': value = min(vals) - helper = _("'Minimum value of %s'" % desc) + helper = _("Minimum value of '%s'" % desc) elif r.field_function == 'max': value = max(vals) - helper = _("'Maximum value of %s'" % desc) + helper = _("Maximum value of '%s'" % desc) elif r.field_function == 'sum': value = sum(vals) - helper = _("'Total value of %s'" % desc) + helper = _("Total value of '%s'" % desc) elif r.field_function == 'avg': value = sum(vals) / len(vals) - helper = _("'Average value of %s'" % desc) + helper = _("Average value of '%s'" % desc) res[r.id].update({ 'computed_value': value, 'helper': helper, @@ -105,7 +105,7 @@ class tile(orm.Model): _get_tile_info, type='float', string='Computed Value', multi='tile_info', readonly=True), 'helper': fields.function( - _get_tile_info, type='char', string='Helper', + _get_tile_info, type='char', string='Helper Text', multi='tile_info', readonly=True), 'field_function': fields.selection([ ('min', 'Minimum'), @@ -142,7 +142,7 @@ class tile(orm.Model): _constraints = [ ( _check_model_id_field_id, - "Error ! Please select a field of the select model.", + "Error ! Please select a field of the selected model.", ['model_id', 'field_id']), ( _check_field_id_field_function,