summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/account_financial_report.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/indoteknik_custom/models/account_financial_report.py b/indoteknik_custom/models/account_financial_report.py
index 6147a3f3..d8037ee8 100644
--- a/indoteknik_custom/models/account_financial_report.py
+++ b/indoteknik_custom/models/account_financial_report.py
@@ -70,7 +70,12 @@ class AccountingReport(models.TransientModel):
for date_range in date_ranges:
row_number = 9
data['form']['used_context']['date_to'] = date_range['date_to']
- data['form']['used_context']['date_from'] = first_journal_date
+
+ if obj.account_report_id.id in [338]:
+ data['form']['used_context']['date_from'] = first_journal_date
+ else:
+ data['form']['used_context']['date_from'] = date_range['date_from']
+
comp_dic['state'] = 'posted'
comp_dic['journal_ids'] = data['form']['journal_ids']
data['form']['comparison_context'] = comp_dic