From 683b2fd91693c20864badd6bca55ebc292e031ba Mon Sep 17 00:00:00 2001 From: Ajmal Cybro Date: Fri, 14 Jan 2022 12:08:24 +0530 Subject: [PATCH] [UPDT] Dynamic report update --- dynamic_accounts_report/wizard/trial_balance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dynamic_accounts_report/wizard/trial_balance.py b/dynamic_accounts_report/wizard/trial_balance.py index 36cfba1ad..fc303fdd9 100644 --- a/dynamic_accounts_report/wizard/trial_balance.py +++ b/dynamic_accounts_report/wizard/trial_balance.py @@ -176,9 +176,9 @@ class TrialView(models.TransientModel): wheres.append(where_clause.strip()) filters = " AND ".join(wheres) if data['target_move'] == 'posted': - filters += " AND account_move_line__move_id.state = 'posted'" + filters += " AND account_move_line.parent_state = 'posted'" else: - filters += " AND account_move_line__move_id.state in ('draft','posted')" + filters += " AND account_move_line.parent_state in ('draft','posted')" if data.get('date_from'): filters += " AND account_move_line.date >= '%s'" % data.get('date_from') if data.get('date_to'): @@ -235,9 +235,9 @@ class TrialView(models.TransientModel): wheres.append(where_clause.strip()) filters = " AND ".join(wheres) if data['target_move'] == 'posted': - filters += " AND account_move_line__move_id.state = 'posted'" + filters += " AND account_move_line.parent_state = 'posted'" else: - filters += " AND account_move_line__move_id.state in ('draft','posted')" + filters += " AND account_move_line.parent_state in ('draft','posted')" if data.get('date_from'): filters += " AND account_move_line.date < '%s'" % data.get('date_from')