[FIX] outstanding_statement: show only open invoices
parent
eeff620abe
commit
c90b236d52
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Partner Statement',
|
'name': 'Partner Statement',
|
||||||
'version': '12.0.1.0.0',
|
'version': '12.0.1.0.1',
|
||||||
'category': 'Accounting & Finance',
|
'category': 'Accounting & Finance',
|
||||||
'summary': 'OCA Financial Reports',
|
'summary': 'OCA Financial Reports',
|
||||||
'author': "Eficent, Odoo Community Association (OCA)",
|
'author': "Eficent, Odoo Community Association (OCA)",
|
||||||
|
|
|
@ -72,8 +72,8 @@ class OutstandingStatement(models.AbstractModel):
|
||||||
Q1.date, Q1.date_maturity, Q1.debit, Q1.credit,
|
Q1.date, Q1.date_maturity, Q1.debit, Q1.credit,
|
||||||
Q1.name, Q1.ref, Q1.blocked, Q1.company_id,
|
Q1.name, Q1.ref, Q1.blocked, Q1.company_id,
|
||||||
CASE WHEN Q1.currency_id is not null
|
CASE WHEN Q1.currency_id is not null
|
||||||
THEN open_amount_currency
|
THEN Q1.open_amount_currency
|
||||||
ELSE open_amount
|
ELSE Q1.open_amount
|
||||||
END as open_amount
|
END as open_amount
|
||||||
FROM Q1
|
FROM Q1
|
||||||
""", locals()
|
""", locals()
|
||||||
|
@ -90,7 +90,7 @@ class OutstandingStatement(models.AbstractModel):
|
||||||
Q2.open_amount
|
Q2.open_amount
|
||||||
FROM Q2
|
FROM Q2
|
||||||
JOIN res_company c ON (c.id = Q2.company_id)
|
JOIN res_company c ON (c.id = Q2.company_id)
|
||||||
WHERE c.id = %(company_id)s
|
WHERE c.id = %(company_id)s AND Q2.open_amount != 0.0
|
||||||
""", locals()), "utf-8"
|
""", locals()), "utf-8"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue