From 7cd0fccba9d93d8b81e50b99e89f03be04f04fdf Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 30 May 2018 14:12:53 +0200 Subject: [PATCH] Remove account journal type issue7451 review46481002 --- __init__.py | 33 +++++++++++++++++---------------- account.py | 12 +++++++++++- journal.xml | 4 ---- 3 files changed, 28 insertions(+), 21 deletions(-) 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