|
@ -176,9 +176,9 @@ class TrialView(models.TransientModel): |
|
|
wheres.append(where_clause.strip()) |
|
|
wheres.append(where_clause.strip()) |
|
|
filters = " AND ".join(wheres) |
|
|
filters = " AND ".join(wheres) |
|
|
if data['target_move'] == 'posted': |
|
|
if data['target_move'] == 'posted': |
|
|
filters += " AND account_move_line__move_id.state = 'posted'" |
|
|
filters += " AND account_move_line.parent_state = 'posted'" |
|
|
else: |
|
|
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'): |
|
|
if data.get('date_from'): |
|
|
filters += " AND account_move_line.date >= '%s'" % data.get('date_from') |
|
|
filters += " AND account_move_line.date >= '%s'" % data.get('date_from') |
|
|
if data.get('date_to'): |
|
|
if data.get('date_to'): |
|
@ -235,9 +235,9 @@ class TrialView(models.TransientModel): |
|
|
wheres.append(where_clause.strip()) |
|
|
wheres.append(where_clause.strip()) |
|
|
filters = " AND ".join(wheres) |
|
|
filters = " AND ".join(wheres) |
|
|
if data['target_move'] == 'posted': |
|
|
if data['target_move'] == 'posted': |
|
|
filters += " AND account_move_line__move_id.state = 'posted'" |
|
|
filters += " AND account_move_line.parent_state = 'posted'" |
|
|
else: |
|
|
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'): |
|
|
if data.get('date_from'): |
|
|
filters += " AND account_move_line.date < '%s'" % data.get('date_from') |
|
|
filters += " AND account_move_line.date < '%s'" % data.get('date_from') |
|
|
|
|
|
|
|
|