2022-03-07 15:48:51 +01:00
|
|
|
diff --git a/account.py b/account.py
|
2022-05-12 09:45:56 +02:00
|
|
|
index 974a027..60b320f 100644
|
2023-01-04 16:07:34 +01:00
|
|
|
--- a/tryton/modules/account/account.py
|
|
|
|
+++ a/tryton/modules/account/account.py
|
2022-05-12 09:45:56 +02:00
|
|
|
@@ -2035,7 +2035,7 @@ class GeneralLedgerAccountContext(ModelView):
|
2022-03-07 15:48:51 +01:00
|
|
|
'General Ledger Account Context'
|
|
|
|
__name__ = 'account.general_ledger.account.context'
|
|
|
|
fiscalyear = fields.Many2One('account.fiscalyear', 'Fiscal Year',
|
2022-05-12 09:45:56 +02:00
|
|
|
- required=True,
|
|
|
|
+ required=False,
|
2022-03-07 15:48:51 +01:00
|
|
|
domain=[
|
2022-05-12 09:45:56 +02:00
|
|
|
('company', '=', Eval('company')),
|
|
|
|
],
|
|
|
|
@@ -2046,7 +2046,8 @@ class GeneralLedgerAccountContext(ModelView):
|
2022-03-07 15:48:51 +01:00
|
|
|
('start_date', '<=', (Eval('end_period'), 'start_date')),
|
|
|
|
],
|
|
|
|
states={
|
|
|
|
- 'invisible': Eval('from_date', False) | Eval('to_date', False),
|
|
|
|
+ 'invisible': (Eval('from_date', False) | Eval('to_date', False)
|
2022-04-21 12:46:41 +02:00
|
|
|
+ | ~Eval('fiscalyear', False))
|
|
|
|
})
|
2022-03-07 15:48:51 +01:00
|
|
|
end_period = fields.Many2One('account.period', 'End Period',
|
2022-04-21 12:46:41 +02:00
|
|
|
domain=[
|
2022-05-12 09:45:56 +02:00
|
|
|
@@ -2054,7 +2055,8 @@ class GeneralLedgerAccountContext(ModelView):
|
2022-03-07 15:48:51 +01:00
|
|
|
('start_date', '>=', (Eval('start_period'), 'start_date'))
|
|
|
|
],
|
|
|
|
states={
|
|
|
|
- 'invisible': Eval('from_date', False) | Eval('to_date', False),
|
|
|
|
+ 'invisible': (Eval('from_date', False) | Eval('to_date', False)
|
2022-04-21 12:46:41 +02:00
|
|
|
+ | ~Eval('fiscalyear', False))
|
|
|
|
})
|
2022-03-07 15:48:51 +01:00
|
|
|
from_date = fields.Date("From Date",
|
2022-04-21 12:46:41 +02:00
|
|
|
domain=[
|
2022-05-12 09:45:56 +02:00
|
|
|
@@ -2262,7 +2264,7 @@ class GeneralLedgerLine(ModelSQL, ModelView):
|
2019-12-27 13:32:34 +01:00
|
|
|
def __setup__(cls):
|
|
|
|
super(GeneralLedgerLine, cls).__setup__()
|
2021-03-28 22:28:46 +02:00
|
|
|
cls.__access__.add('account')
|
2019-12-27 13:32:34 +01:00
|
|
|
- cls._order.insert(0, ('date', 'ASC'))
|
|
|
|
+ cls._order = [('date', 'DESC'), ('id', 'DESC')]
|
2022-03-07 15:48:51 +01:00
|
|
|
|
2019-12-27 13:32:34 +01:00
|
|
|
@classmethod
|
|
|
|
def table_query(cls):
|