Instead of always compute the date from the period, we compute the other value from the changed field. The start date of the period is used for period in the future and the end date for period in the past. Closes #12084
102 lines
1.5 KiB
Python
102 lines
1.5 KiB
Python
# 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.exceptions import UserError, UserWarning
|
|
from trytond.model.exceptions import ValidationError
|
|
|
|
|
|
class PeriodNotFoundError(UserError):
|
|
pass
|
|
|
|
|
|
class PeriodValidationError(ValidationError):
|
|
pass
|
|
|
|
|
|
class ClosePeriodError(PeriodValidationError):
|
|
pass
|
|
|
|
|
|
class PeriodDatesError(PeriodValidationError):
|
|
pass
|
|
|
|
|
|
class PeriodSequenceError(PeriodValidationError):
|
|
pass
|
|
|
|
|
|
class FiscalYearNotFoundError(UserError):
|
|
pass
|
|
|
|
|
|
class FiscalYearValidationError(ValidationError):
|
|
pass
|
|
|
|
|
|
class FiscalYearDatesError(FiscalYearValidationError):
|
|
pass
|
|
|
|
|
|
class FiscalYearSequenceError(FiscalYearValidationError):
|
|
pass
|
|
|
|
|
|
class FiscalYearCloseError(UserError):
|
|
pass
|
|
|
|
|
|
class FiscalYearReOpenError(UserError):
|
|
pass
|
|
|
|
|
|
class AccountMissing(UserError):
|
|
pass
|
|
|
|
|
|
class AccountValidationError(ValidationError):
|
|
pass
|
|
|
|
|
|
class SecondCurrencyError(AccountValidationError):
|
|
pass
|
|
|
|
|
|
class ChartWarning(UserWarning):
|
|
pass
|
|
|
|
|
|
class PostError(UserError):
|
|
pass
|
|
|
|
|
|
class MoveTemplateExpressionError(UserError):
|
|
pass
|
|
|
|
|
|
class CancelWarning(UserWarning):
|
|
pass
|
|
|
|
|
|
class ReconciliationError(ValidationError):
|
|
pass
|
|
|
|
|
|
class ReconciliationDeleteWarning(UserWarning):
|
|
pass
|
|
|
|
|
|
class CancelDelegatedWarning(UserWarning):
|
|
pass
|
|
|
|
|
|
class GroupLineError(UserError):
|
|
pass
|
|
|
|
|
|
class RescheduleLineError(UserError):
|
|
pass
|
|
|
|
|
|
class DelegateLineError(UserError):
|
|
pass
|