From 52e6fae1bbca0c5246abeaf8af0ed81a54928c45 Mon Sep 17 00:00:00 2001 From: Jordi Ballester Alomar Date: Fri, 8 Feb 2019 14:48:09 +0100 Subject: [PATCH] [customer_outstanding_statement] minor fixes --- customer_outstanding_statement/__manifest__.py | 2 +- .../report/customer_outstanding_statement.py | 15 +++++++++------ .../views/statement.xml | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/customer_outstanding_statement/__manifest__.py b/customer_outstanding_statement/__manifest__.py index f0d68d14..9f0b03a8 100644 --- a/customer_outstanding_statement/__manifest__.py +++ b/customer_outstanding_statement/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Partner Outstanding Statement', - 'version': '11.0.2.1.0', + 'version': '11.0.2.1.1', 'category': 'Accounting & Finance', 'summary': 'OCA Financial Reports', 'author': "Eficent, Odoo Community Association (OCA)", diff --git a/customer_outstanding_statement/report/customer_outstanding_statement.py b/customer_outstanding_statement/report/customer_outstanding_statement.py index b58bb953..1090b80e 100644 --- a/customer_outstanding_statement/report/customer_outstanding_statement.py +++ b/customer_outstanding_statement/report/customer_outstanding_statement.py @@ -94,9 +94,10 @@ class CustomerOutstandingStatement(models.AbstractModel): def _display_lines_sql_q2(self): return """ - SELECT partner_id, currency_id, move_id, date, date_maturity, - debit, credit, name, ref, blocked, company_id, - CASE WHEN currency_id is not null + SELECT Q1.partner_id, Q1.currency_id, Q1.move_id, + Q1.date, Q1.date_maturity, Q1.debit, Q1.credit, + Q1.name, Q1.ref, Q1.blocked, Q1.company_id, + CASE WHEN Q1.currency_id is not null THEN open_amount_currency ELSE open_amount END as open_amount @@ -105,9 +106,11 @@ class CustomerOutstandingStatement(models.AbstractModel): def _display_lines_sql_q3(self, company_id): return """ - SELECT Q2.partner_id, move_id, date, date_maturity, Q2.name, ref, - debit, credit, debit-credit AS amount, blocked, - COALESCE(Q2.currency_id, c.currency_id) AS currency_id, open_amount + SELECT Q2.partner_id, Q2.move_id, Q2.date, Q2.date_maturity, + Q2.name, Q2.ref, Q2.debit, Q2.credit, + Q2.debit-Q2.credit AS amount, blocked, + COALESCE(Q2.currency_id, c.currency_id) AS currency_id, + Q2.open_amount FROM Q2 JOIN res_company c ON (c.id = Q2.company_id) WHERE c.id = %s diff --git a/customer_outstanding_statement/views/statement.xml b/customer_outstanding_statement/views/statement.xml index 89cca30a..4a2fb777 100644 --- a/customer_outstanding_statement/views/statement.xml +++ b/customer_outstanding_statement/views/statement.xml @@ -110,7 +110,7 @@ -

+

Aging Report at in :