diff --git a/__init__.py b/__init__.py index dc79e4e15e..4456de0ebd 100644 --- a/__init__.py +++ b/__init__.py @@ -2,28 +2,29 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from .journal import * -from .statement import * -from .account import * -from .party import PartyReplace +from . import journal +from . import statement +from . import account +from . import party def register(): Pool.register( - Journal, - Statement, - Line, - LineGroup, - Move, - Origin, - OriginInformation, - ImportStatementStart, + journal.Journal, + statement.Statement, + statement.Line, + statement.LineGroup, + account.Journal, + account.Move, + statement.Origin, + statement.OriginInformation, + statement.ImportStatementStart, module='account_statement', type_='model') Pool.register( - PartyReplace, - ImportStatement, - ReconcileStatement, + party.PartyReplace, + statement.ImportStatement, + statement.ReconcileStatement, module='account_statement', type_='wizard') Pool.register( - StatementReport, + statement.StatementReport, module='account_statement', type_='report') diff --git a/account.py b/account.py index 9c61531632..9606ec4c5f 100644 --- a/account.py +++ b/account.py @@ -9,7 +9,17 @@ from trytond.pool import PoolMeta, Pool from trytond.transaction import Transaction from trytond.tools import grouped_slice, reduce_ids -__all__ = ['Move'] +__all__ = ['Journal', 'Move'] + + +class Journal: + __metaclass__ = PoolMeta + __name__ = 'account.journal' + + @classmethod + def __setup__(cls): + super(Journal, cls).__setup__() + cls.type.selection.append(('statement', "Statement")) class Move: diff --git a/journal.xml b/journal.xml index 1ac2a59f58..bc9f0db160 100644 --- a/journal.xml +++ b/journal.xml @@ -13,10 +13,6 @@ this repository contains the full copyright notices and license terms. --> tree statement_journal_tree - - Statement - statement - Statement Journals