2023-11-20 11:46:06 +01:00
|
|
|
diff --git a/tryton/modules/account/account.py b/tryton/modules/account/account.py
|
|
|
|
index 11225ae174..b5f981085f 100644
|
2023-01-04 16:05:47 +01:00
|
|
|
--- a/tryton/modules/account/account.py
|
2023-11-20 11:46:06 +01:00
|
|
|
+++ b/tryton/modules/account/account.py
|
|
|
|
@@ -2123,7 +2123,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')),
|
|
|
|
],
|
2023-11-20 11:46:06 +01:00
|
|
|
@@ -2134,7 +2134,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=[
|
2023-11-20 11:46:06 +01:00
|
|
|
@@ -2142,7 +2143,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=[
|
2023-11-20 11:46:06 +01:00
|
|
|
@@ -2378,7 +2380,7 @@ class GeneralLedgerLine(DescriptionOriginMixin, 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')]
|
2023-11-20 11:46:06 +01:00
|
|
|
cls.description_used.setter = None
|
|
|
|
|
2019-12-27 13:32:34 +01:00
|
|
|
@classmethod
|