From 46ffb68bf61662afccb88a83d34a8960c3d7242a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Feb 2009 13:31:37 +0100 Subject: [PATCH] Use new TableHandler --- packing.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packing.py b/packing.py index 96960aa904..df5b3e6a2b 100644 --- a/packing.py +++ b/packing.py @@ -3,10 +3,10 @@ "Packing" from trytond.osv import fields, OSV from trytond.netsvc import LocalService -import datetime from trytond.report import CompanyReport from trytond.wizard import Wizard, WizardOSV -from trytond.sql_db import table_handler +from trytond.backend import TableHandler +import datetime STATES = { 'readonly': "state in ('cancel', 'done')", @@ -503,10 +503,10 @@ class PackingOut(OSV): def init(self, cursor, module_name): super(PackingOut, self).init(cursor, module_name) - th = table_handler(cursor, self._table, self._name, module_name) + table = TableHandler(cursor, self._table, self._name, module_name) - if 'customer_location' in th.table: - th.drop_column('customer_location') + # Migration from 1.0 customer_location is no more used + table.drop_column('customer_location', exception=True) def default_state(self, cursor, user, context=None): return 'draft'