Migration to python-sql

review1001002
This commit is contained in:
Cédric Krier committed 2013-09-06 22:33:57 +02:00
1 parent d7e986f47f
commit 62f401fbe7
3 files changed
+5 -3

No files matched your search

+3 -1
View File
@@ -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)
+1 -1
View File
@@ -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
@@ -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