Browse Source

Mar 17 : [UPDT] Updated 'dynamic_accounts_report'

pull/346/merge
AjmalCybro 1 month ago
parent
commit
87f62cf105
  1. 11
      dynamic_accounts_report/models/dynamic_balance_sheet_report.py

11
dynamic_accounts_report/models/dynamic_balance_sheet_report.py

@ -3,8 +3,8 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Bhagyadev KP (<https://www.cybrosys.com>)
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ammu Raj (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
@ -195,10 +195,13 @@ class ProfitLossReport(models.TransientModel):
**account_entries}
datas.append(data)
else:
current_year = fields.Date.today().year
date_from = financial_report_id.date_from or f'{current_year}-01-01'
date_to = financial_report_id.date_to or f'{current_year}-12-31'
account_move_lines = self.env['account.move.line'].search(
[('parent_state', 'in', target_move),
('date', '>=', f'{current_year}-01-01'),
('date', '<=', f'{current_year}-12-31')])
('date', '>=', date_from),
('date', '<=', date_to)])
lists = [{'id': rec.id,
'value': [eval(i) for i in
rec.analytic_distribution.keys()]}

Loading…
Cancel
Save