diff --git a/dashboard.py b/dashboard.py index f3805831dc..e575dc41ed 100644 --- a/dashboard.py +++ b/dashboard.py @@ -4,7 +4,6 @@ from sql import Null from sql.conditionals import Case from trytond.model import ModelView, ModelSQL, fields -from trytond.transaction import Transaction from trytond import backend from trytond.pyson import Eval @@ -37,8 +36,7 @@ class DashboardAction(ModelSQL, ModelView): @classmethod def __register__(cls, module_name): TableHandler = backend.get('TableHandler') - cursor = Transaction().cursor - table = TableHandler(cursor, cls, module_name) + table = TableHandler(cls, module_name) super(DashboardAction, cls).__register__(module_name) diff --git a/res.py b/res.py index 99a8c0b050..10712a121b 100644 --- a/res.py +++ b/res.py @@ -2,7 +2,6 @@ # this repository contains the full copyright notices and license terms. from trytond.model import fields from trytond import backend -from trytond.transaction import Transaction from trytond.pool import PoolMeta __all__ = ['User'] @@ -32,11 +31,10 @@ class User: @classmethod def __register__(cls, module_name): TableHandler = backend.get('TableHandler') - cursor = Transaction().cursor super(User, cls).__register__(module_name) - table = TableHandler(cursor, cls, module_name) + table = TableHandler(cls, module_name) # Migration from 1.6 table.not_null_action('dashboard_layout', action='remove')