Follow isort formatting
issue10928
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
+3
-10
@@ -2,17 +2,10 @@
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
from . import account
|
||||
from . import configuration
|
||||
from . import company
|
||||
from . import fiscalyear
|
||||
from . import journal
|
||||
from . import move
|
||||
from . import move_template
|
||||
from . import party
|
||||
from . import period
|
||||
from . import tax
|
||||
|
||||
from . import (
|
||||
account, company, configuration, fiscalyear, journal, move, move_template,
|
||||
party, period, tax)
|
||||
from .move import MoveLineMixin
|
||||
|
||||
__all__ = ['register', 'MoveLineMixin']
|
||||
|
||||
+15
-16
@@ -1,33 +1,32 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from decimal import Decimal
|
||||
import datetime
|
||||
import operator
|
||||
from collections import defaultdict
|
||||
from itertools import zip_longest
|
||||
from decimal import Decimal
|
||||
from functools import wraps
|
||||
from itertools import zip_longest
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from sql import Column, Null, Window, Literal
|
||||
from sql.aggregate import Sum, Max, Min
|
||||
from sql.conditionals import Coalesce, Case
|
||||
from sql import Column, Literal, Null, Window
|
||||
from sql.aggregate import Max, Min, Sum
|
||||
from sql.conditionals import Case, Coalesce
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import (
|
||||
ModelView, ModelSQL, fields, Unique, sequence_ordered, tree)
|
||||
ModelSQL, ModelView, Unique, fields, sequence_ordered, tree)
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.wizard import Wizard, StateView, StateAction, StateTransition, \
|
||||
Button
|
||||
from trytond.report import Report
|
||||
from trytond.tools import reduce_ids, grouped_slice, lstrip_wildcard
|
||||
from trytond.pyson import Eval, If, PYSONEncoder, Bool
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Eval, If, PYSONEncoder
|
||||
from trytond.report import Report
|
||||
from trytond.tools import grouped_slice, lstrip_wildcard, reduce_ids
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.wizard import (
|
||||
Button, StateAction, StateTransition, StateView, Wizard)
|
||||
|
||||
from .common import PeriodMixin, ActivePeriodMixin
|
||||
from .exceptions import SecondCurrencyError, ChartWarning
|
||||
from .common import ActivePeriodMixin, PeriodMixin
|
||||
from .exceptions import ChartWarning, SecondCurrencyError
|
||||
|
||||
|
||||
def inactive_records(func):
|
||||
|
||||
@@ -6,8 +6,8 @@ from sql import Literal
|
||||
from sql.conditionals import Coalesce
|
||||
|
||||
from trytond.model import Model, fields
|
||||
from trytond.pyson import Eval, If, Bool
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Eval, If
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.pool import PoolMeta, Pool
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.pool import Pool
|
||||
from trytond.model import ModelView, ModelSQL, ModelSingleton, fields
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pyson import Eval, Id
|
||||
from trytond.model import ModelSingleton, ModelSQL, ModelView, fields
|
||||
from trytond.modules.company.model import (
|
||||
CompanyMultiValueMixin, CompanyValueMixin)
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval, Id
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
tax_roundings = [
|
||||
('document', 'Per Document'),
|
||||
|
||||
+5
-4
@@ -4,17 +4,18 @@
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import ModelView, ModelSQL, Workflow, fields
|
||||
from trytond.model import ModelSQL, ModelView, Workflow, fields
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval, Id
|
||||
from trytond.rpc import RPC
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.wizard import (
|
||||
Wizard, StateView, StateTransition, StateAction, Button)
|
||||
Button, StateAction, StateTransition, StateView, Wizard)
|
||||
|
||||
from .exceptions import (FiscalYearNotFoundError, FiscalYearDatesError,
|
||||
FiscalYearSequenceError, FiscalYearCloseError, FiscalYearReOpenError)
|
||||
from .exceptions import (
|
||||
FiscalYearCloseError, FiscalYearDatesError, FiscalYearNotFoundError,
|
||||
FiscalYearReOpenError, FiscalYearSequenceError)
|
||||
|
||||
STATES = {
|
||||
'readonly': Eval('state') != 'open',
|
||||
|
||||
+6
-6
@@ -7,16 +7,16 @@ from sql.aggregate import Sum
|
||||
from trytond import backend
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import (
|
||||
ModelView, ModelSQL, Workflow, DeactivableMixin, fields, Unique)
|
||||
DeactivableMixin, ModelSQL, ModelView, Unique, Workflow, fields)
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.pyson import Eval, Bool, Id
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond.tools import reduce_ids, grouped_slice, lstrip_wildcard
|
||||
from trytond.tools.multivalue import migrate_property
|
||||
from trytond.modules.company.model import (
|
||||
CompanyMultiValueMixin, CompanyValueMixin)
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Eval, Id
|
||||
from trytond.tools import grouped_slice, lstrip_wildcard, reduce_ids
|
||||
from trytond.tools.multivalue import migrate_property
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
STATES = {
|
||||
'readonly': Eval('state') == 'close',
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from decimal import Decimal
|
||||
from itertools import groupby, combinations, chain, islice
|
||||
from operator import itemgetter
|
||||
from collections import defaultdict
|
||||
from decimal import Decimal
|
||||
from itertools import chain, combinations, groupby, islice
|
||||
from operator import itemgetter
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from sql import Null, Literal
|
||||
from sql.aggregate import Sum, Max
|
||||
from sql import Literal, Null
|
||||
from sql.aggregate import Max, Sum
|
||||
from sql.conditionals import Case, Coalesce
|
||||
from sql.functions import CharLength
|
||||
from sql.conditionals import Coalesce, Case
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import ModelView, ModelSQL, fields, Check, DeactivableMixin
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.wizard import (
|
||||
Wizard, StateTransition, StateView, StateAction, Button)
|
||||
from trytond.report import Report
|
||||
from trytond import backend
|
||||
from trytond.pyson import Eval, Bool, If, PYSONEncoder
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond.rpc import RPC
|
||||
from trytond.tools import reduce_ids, grouped_slice
|
||||
from trytond.config import config
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import Check, DeactivableMixin, ModelSQL, ModelView, fields
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Eval, If, PYSONEncoder
|
||||
from trytond.report import Report
|
||||
from trytond.rpc import RPC
|
||||
from trytond.tools import grouped_slice, reduce_ids
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.wizard import (
|
||||
Button, StateAction, StateTransition, StateView, Wizard)
|
||||
|
||||
from .exceptions import (PostError, MoveDatesError, CancelWarning,
|
||||
ReconciliationError, DeleteDelegatedWarning, GroupLineError,
|
||||
SplitLineError, CancelDelegatedWarning)
|
||||
from .exceptions import (
|
||||
CancelDelegatedWarning, CancelWarning, DeleteDelegatedWarning,
|
||||
GroupLineError, MoveDatesError, PostError, ReconciliationError,
|
||||
SplitLineError)
|
||||
|
||||
_MOVE_STATES = {
|
||||
'readonly': Eval('state') == 'posted',
|
||||
|
||||
+6
-6
@@ -1,18 +1,18 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from xml.sax.saxutils import quoteattr
|
||||
from decimal import Decimal
|
||||
from xml.sax.saxutils import quoteattr
|
||||
|
||||
from simpleeval import simple_eval
|
||||
|
||||
from trytond.model import (
|
||||
ModelSQL, ModelView, DeactivableMixin, fields, sequence_ordered)
|
||||
from trytond.pyson import Eval
|
||||
from trytond.wizard import (Wizard, StateView, StateAction, StateTransition,
|
||||
Button)
|
||||
from trytond.transaction import Transaction
|
||||
DeactivableMixin, ModelSQL, ModelView, fields, sequence_ordered)
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval
|
||||
from trytond.tools import decistmt
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.wizard import (
|
||||
Button, StateAction, StateTransition, StateView, Wizard)
|
||||
|
||||
|
||||
class MoveTemplate(DeactivableMixin, ModelSQL, ModelView):
|
||||
|
||||
@@ -9,15 +9,15 @@ from sql.conditionals import Coalesce
|
||||
from trytond import backend
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import ModelSQL, fields
|
||||
from trytond.pyson import Eval, If
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.tools import reduce_ids, grouped_slice
|
||||
from trytond.tools.multivalue import migrate_property
|
||||
from trytond.modules.company.model import (
|
||||
CompanyMultiValueMixin, CompanyValueMixin)
|
||||
from trytond.modules.party.exceptions import EraseError
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from trytond.modules.party.exceptions import EraseError
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Eval, If
|
||||
from trytond.tools import grouped_slice, reduce_ids
|
||||
from trytond.tools.multivalue import migrate_property
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
from .exceptions import AccountMissing
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.const import OPERATORS
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import ModelView, ModelSQL, Workflow, fields
|
||||
from trytond.model import ModelSQL, ModelView, Workflow, fields
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval, Id
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond.const import OPERATORS
|
||||
|
||||
from .exceptions import (PeriodNotFoundError, ClosePeriodError,
|
||||
PeriodDatesError, PeriodSequenceError)
|
||||
from .exceptions import (
|
||||
ClosePeriodError, PeriodDatesError, PeriodNotFoundError,
|
||||
PeriodSequenceError)
|
||||
|
||||
_STATES = {
|
||||
'readonly': Eval('state') != 'open',
|
||||
|
||||
@@ -6,7 +6,8 @@ import io
|
||||
import os
|
||||
import re
|
||||
from configparser import ConfigParser
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
|
||||
def read(fname):
|
||||
|
||||
@@ -9,21 +9,20 @@ from sql import Literal
|
||||
from sql.aggregate import Sum
|
||||
from sql.conditionals import Case
|
||||
|
||||
from trytond import backend
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import (
|
||||
ModelView, ModelSQL, MatchMixin, DeactivableMixin, fields,
|
||||
DeactivableMixin, MatchMixin, ModelSQL, ModelView, fields,
|
||||
sequence_ordered, tree)
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.wizard import Wizard, StateView, StateAction, Button
|
||||
from trytond import backend
|
||||
from trytond.pyson import Eval, If, Bool, PYSONEncoder
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.tools import cursor_dict, lstrip_wildcard
|
||||
from trytond.pool import Pool
|
||||
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Eval, If, PYSONEncoder
|
||||
from trytond.tools import cursor_dict, lstrip_wildcard
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.wizard import Button, StateAction, StateView, Wizard
|
||||
|
||||
from .common import PeriodMixin, ActivePeriodMixin
|
||||
from .common import ActivePeriodMixin, PeriodMixin
|
||||
|
||||
KINDS = [
|
||||
('sale', 'Sale'),
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
|
||||
try:
|
||||
from trytond.modules.account.tests.test_account import (
|
||||
suite, create_chart, get_fiscalyear)
|
||||
create_chart, get_fiscalyear, suite)
|
||||
except ImportError:
|
||||
from .test_account import suite, create_chart, get_fiscalyear
|
||||
from .test_account import create_chart, get_fiscalyear, suite
|
||||
|
||||
__all__ = ['suite', 'create_chart', 'get_fiscalyear']
|
||||
|
||||
+11
-11
@@ -1,22 +1,22 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
import unittest
|
||||
import doctest
|
||||
import datetime
|
||||
import doctest
|
||||
import unittest
|
||||
from decimal import Decimal
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from trytond.pool import Pool
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||
from trytond.tests.test_tryton import doctest_teardown
|
||||
from trytond.tests.test_tryton import doctest_checker
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.exceptions import UserError
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.modules.account.tax import TaxableMixin
|
||||
from trytond.modules.company.tests import (
|
||||
create_company, set_company, PartyCompanyCheckEraseMixin, CompanyTestMixin)
|
||||
CompanyTestMixin, PartyCompanyCheckEraseMixin, create_company, set_company)
|
||||
from trytond.modules.currency.tests import create_currency
|
||||
from trytond.pool import Pool
|
||||
from trytond.tests.test_tryton import (
|
||||
ModuleTestCase, doctest_checker, doctest_teardown, with_transaction)
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
def create_chart(company, tax=False, chart='account.account_template_root_en'):
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import datetime
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
from proteus import Model, Wizard
|
||||
|
||||
from trytond.modules.company.tests.tools import get_company
|
||||
|
||||
Reference in New Issue
Block a user