From 71268ab0030df96172f4fb805e164ba84aa56d4c Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Fri, 17 Jul 2015 11:47:20 +0200 Subject: [PATCH] [REF] remove obsolete migration file for V7 udpate; --- .../7.0.1.0/post-migration-color.py | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 web_dashboard_tile/migrations/7.0.1.0/post-migration-color.py diff --git a/web_dashboard_tile/migrations/7.0.1.0/post-migration-color.py b/web_dashboard_tile/migrations/7.0.1.0/post-migration-color.py deleted file mode 100644 index f8c33840..00000000 --- a/web_dashboard_tile/migrations/7.0.1.0/post-migration-color.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2015-Today GRAP -# @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 . -# -############################################################################## - - -COLOR_NUMERIC_TO_RVB = { - 0: '#006015', - 1: '#CD2513', - 2: '#CDC713', - 3: '#57158A', - 4: '#0E9B2D', - 5: '#7F0C00', - 6: '#7F7B00', - 7: '#320455', - 8: '#CD6E13', - 9: '#0E6C7E', -} - - -def migrate_color(cr): - for old, new in COLOR_NUMERIC_TO_RVB.iteritems(): - cr.execute(""" - UPDATE tile_tile - SET color='%s', font_color='#FFFFFF' - WHERE color='%s' - """ % (new, old)) - - -def migrate(cr, installed_version): - migrate_color(cr)