From 37db296525420a191c312b547fbb26072b1f79dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 3 Mar 2016 21:55:17 +0100 Subject: [PATCH] Follow PEP-0249 for Transaction and backends issue4949 review19781002 --- allocation.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/allocation.py b/allocation.py index ef61c4fb8c..4bcb43ae48 100644 --- a/allocation.py +++ b/allocation.py @@ -3,7 +3,6 @@ from trytond import backend from trytond.model import ModelView, ModelSQL, fields from trytond.pool import Pool -from trytond.transaction import Transaction __all__ = ['Allocation'] @@ -22,12 +21,11 @@ class Allocation(ModelSQL, ModelView): @classmethod def __register__(cls, module_name): TableHandler = backend.get('TableHandler') - cursor = Transaction().cursor super(Allocation, cls).__register__(module_name) # Migration from 3.2: - table = TableHandler(cursor, cls, module_name) + table = TableHandler(cls, module_name) table.drop_constraint('percentage_positive') @staticmethod