From a7ff9c38ef0dc723dbcc59cfe253f4c92250e6fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 9 Aug 2018 20:43:51 +0200 Subject: [PATCH] Remove migration before 3.0 issue6470 review52421002 --- product.py | 15 --------------- uom.py | 13 ------------- 2 files changed, 28 deletions(-) diff --git a/product.py b/product.py index 89a940276a..54a7d4e4c8 100644 --- a/product.py +++ b/product.py @@ -81,24 +81,9 @@ class Template( @classmethod def __register__(cls, module_name): - cursor = Transaction().connection.cursor() - sql_table = cls.__table__() - super(Template, cls).__register__(module_name) table = cls.__table_handler__(module_name) - # Migration from 2.2: category is no more required - table.not_null_action('category', 'remove') - - # Migration from 2.2: new types - cursor.execute(*sql_table.update( - columns=[sql_table.consumable], - values=[True], - where=sql_table.type == 'consumable')) - cursor.execute(*sql_table.update( - columns=[sql_table.type], - values=['goods'], - where=sql_table.type.in_(['stockable', 'consumable']))) # Migration from 3.8: rename category into categories if table.column_exist('category'): diff --git a/uom.py b/uom.py index f4a3b453e8..2bf289481c 100644 --- a/uom.py +++ b/uom.py @@ -2,7 +2,6 @@ # this repository contains the full copyright notices and license terms. from decimal import Decimal -from sql import Table from math import ceil, floor, log10 from trytond.model import ModelView, ModelSQL, DeactivableMixin, fields, Check @@ -54,18 +53,6 @@ class Uom(DeactivableMixin, ModelSQL, ModelView): ]) digits = fields.Integer('Display Digits', required=True) - @classmethod - def __register__(cls, module_name): - cursor = Transaction().connection.cursor() - model_data = Table('ir_model_data') - # Migration from 1.6: corrected misspelling of ounce (was once) - cursor.execute(*model_data.update( - columns=[model_data.fs_id], - values=['uom_ounce'], - where=(model_data.fs_id == 'uom_once') - & (model_data.module == 'product'))) - super(Uom, cls).__register__(module_name) - @classmethod def __setup__(cls): super(Uom, cls).__setup__()