diff --git a/packing.py b/packing.py index 568ce0e56e..c784615bd8 100644 --- a/packing.py +++ b/packing.py @@ -6,6 +6,7 @@ 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 STATES = { 'readonly': "state in ('cancel', 'done')", @@ -500,6 +501,12 @@ class PackingOut(OSV): ] self._order[0] = ('id', 'DESC') + def _auto_init(self, cursor, module_name): + super(PackingOut, self)._auto_init(cursor, module_name) + th = table_handler(cursor, self._table, self._name, module_name) + if 'customer_location' in th.table: + th.drop_column('customer_location') + def default_state(self, cursor, user, context=None): return 'draft'