Remove statement_of_account_2.diff

This commit is contained in:
Jared Esparza 2022-04-20 12:38:08 +02:00
parent 009c3c149f
commit 3458475c7d
2 changed files with 0 additions and 29 deletions

2
series
View file

@ -54,7 +54,5 @@ issue10363.diff # [production] Remove unique product constraint on BOM
statement_of_account.diff # [account] Cumulate balance of previous fiscal years
statement_of_account_2.diff # [account] Use from_date and to_date from context in _debit_credit_context() (pending core)
issue11306.diff # [analytic_invocie] Add compatibility between the analytic_invocie module and the account_invoice_defer module (only 6.0)
issue11359.diff # [product_price_list_dates] add date in pattern to match price list

View file

@ -1,27 +0,0 @@
diff --git a/account.py b/account.py
index 6c17998..dabf92a 100644
--- a/trytond/trytond/modules/account/account.py
+++ b/trytond/trytond/modules/account/account.py
@@ -1837,19 +1837,16 @@ class _GeneralLedgerAccount(ActivePeriodMixin, ModelSQL, ModelView):
@classmethod
def _debit_credit_context(cls):
- period_ids, from_date, to_date = None, None, None
+ period_ids = None
context = Transaction().context
if context.get('start_period') or context.get('end_period'):
start_period_ids = set(cls.get_period_ids('start_balance'))
end_period_ids = set(cls.get_period_ids('end_balance'))
period_ids = list(end_period_ids.difference(start_period_ids))
- elif context.get('from_date') or context.get('end_date'):
- _, from_date = cls.get_dates('start_balance')
- _, to_date = cls.get_dates('end_balance')
return {
'periods': period_ids,
- 'from_date': from_date,
- 'to_date': to_date,
+ 'from_date': context.get('from_date'),
+ 'to_date': context.get('end_date'),
}
@classmethod