Remove migration before 3.0

issue6470
review52421002
This commit is contained in:
Cédric Krier
2018-08-09 20:43:51 +02:00
parent 3037b38aec
commit a7ff9c38ef
2 changed files with 0 additions and 28 deletions
-15
View File
@@ -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'):
-13
View File
@@ -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__()