Browse Source

[UPDT] Dynamic report update

pull/195/head
Ajmal Cybro 4 years ago
parent
commit
683b2fd916
  1. 8
      dynamic_accounts_report/wizard/trial_balance.py

8
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')

Loading…
Cancel
Save