From 62f401fbe791177e30751cb64482b4f89bf63806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 6 Sep 2013 22:33:57 +0200 Subject: [PATCH] Migration to python-sql review1001002 --- stock.py | 4 +++- tests/scenario_account_stock_anglo_saxon.rst | 2 +- .../scenario_account_stock_anglo_saxon_with_drop_shipment.rst | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stock.py b/stock.py index 739b28d0c8..b2e11a9706 100644 --- a/stock.py +++ b/stock.py @@ -5,7 +5,7 @@ from trytond.model import fields from trytond.pyson import Eval from trytond.pool import Pool, PoolMeta from trytond.transaction import Transaction -from trytond.backend import TableHandler +from trytond import backend __all__ = ['Move'] __metaclass__ = PoolMeta @@ -43,6 +43,8 @@ class Move: @classmethod def __register__(cls, module_name): cursor = Transaction().cursor + TableHandler = backend.get('TableHandler') + super(Move, cls).__register__(module_name) table = TableHandler(cursor, cls, module_name) diff --git a/tests/scenario_account_stock_anglo_saxon.rst b/tests/scenario_account_stock_anglo_saxon.rst index 3a09bd72bb..95f464f213 100644 --- a/tests/scenario_account_stock_anglo_saxon.rst +++ b/tests/scenario_account_stock_anglo_saxon.rst @@ -102,7 +102,7 @@ Create chart of accounts:: >>> AccountTemplate = Model.get('account.account.template') >>> Account = Model.get('account.account') >>> AccountJournal = Model.get('account.journal') - >>> account_template, = AccountTemplate.find([('parent', '=', False)]) + >>> account_template, = AccountTemplate.find([('parent', '=', None)]) >>> create_chart = Wizard('account.create_chart') >>> create_chart.execute('account') >>> create_chart.form.account_template = account_template diff --git a/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst b/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst index 2c92b7d68b..a94d5cbfb8 100644 --- a/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst +++ b/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst @@ -133,7 +133,7 @@ Create chart of accounts:: >>> AccountTemplate = Model.get('account.account.template') >>> Account = Model.get('account.account') >>> AccountJournal = Model.get('account.journal') - >>> account_template, = AccountTemplate.find([('parent', '=', False)]) + >>> account_template, = AccountTemplate.find([('parent', '=', None)]) >>> create_chart = Wizard('account.create_chart') >>> create_chart.execute('account') >>> create_chart.form.account_template = account_template