Browse Source

Display only posted entries (#648)

* Add files via upload

Display only posted entries

* Update activity_statement.py

* Update report_statement_common.py
pull/664/head
LGodoo 5 years ago
committed by GitHub
parent
commit
6d8b6e4245
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      partner_statement/report/activity_statement.py
  2. 2
      partner_statement/report/outstanding_statement.py
  3. 1
      partner_statement/report/report_statement_common.py

2
partner_statement/report/activity_statement.py

@ -28,6 +28,7 @@ class ActivityStatement(models.AbstractModel):
JOIN account_move m ON (l.move_id = m.id) JOIN account_move m ON (l.move_id = m.id)
WHERE l.partner_id IN %(partners)s AND at.type = %(account_type)s WHERE l.partner_id IN %(partners)s AND at.type = %(account_type)s
AND l.date < %(date_start)s AND not l.blocked AND l.date < %(date_start)s AND not l.blocked
AND m.state IN ('posted')
GROUP BY l.partner_id, l.currency_id, l.amount_currency, GROUP BY l.partner_id, l.currency_id, l.amount_currency,
l.company_id l.company_id
""", locals()), "utf-8") """, locals()), "utf-8")
@ -90,6 +91,7 @@ class ActivityStatement(models.AbstractModel):
AND at.type = %(account_type)s AND at.type = %(account_type)s
AND %(date_start)s <= l.date AND %(date_start)s <= l.date
AND l.date <= %(date_end)s AND l.date <= %(date_end)s
AND m.state IN ('posted')
GROUP BY l.partner_id, m.name, l.date, l.date_maturity, GROUP BY l.partner_id, m.name, l.date, l.date_maturity,
CASE WHEN (aj.type IN ('sale', 'purchase')) CASE WHEN (aj.type IN ('sale', 'purchase'))
THEN l.name THEN l.name

2
partner_statement/report/outstanding_statement.py

@ -58,7 +58,7 @@ class OutstandingStatement(models.AbstractModel):
(pc.id IS NOT NULL AND (pc.id IS NOT NULL AND
pc.max_date <= %(date_end)s) OR pc.max_date <= %(date_end)s) OR
(pd.id IS NULL AND pc.id IS NULL) (pd.id IS NULL AND pc.id IS NULL)
) AND l.date <= %(date_end)s
) AND l.date <= %(date_end)s AND m.state IN ('posted')
GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name, GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name,
l.ref, l.blocked, l.currency_id, l.ref, l.blocked, l.currency_id,
l.balance, l.amount_currency, l.company_id l.balance, l.amount_currency, l.company_id

1
partner_statement/report/report_statement_common.py

@ -72,6 +72,7 @@ class ReportStatementCommon(models.AbstractModel):
pc.max_date <= %(date_end)s) OR pc.max_date <= %(date_end)s) OR
(pd.id IS NULL AND pc.id IS NULL) (pd.id IS NULL AND pc.id IS NULL)
) AND l.date <= %(date_end)s AND not l.blocked ) AND l.date <= %(date_end)s AND not l.blocked
AND m.state IN ('posted')
GROUP BY l.partner_id, l.currency_id, l.date, l.date_maturity, GROUP BY l.partner_id, l.currency_id, l.date, l.date_maturity,
l.amount_currency, l.balance, l.move_id, l.amount_currency, l.balance, l.move_id,
l.company_id, l.id l.company_id, l.id

Loading…
Cancel
Save