|
|
@ -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()]} |
|
|
|