diff --git a/partner_statement/README.rst b/partner_statement/README.rst index 55636069..4b7c5a68 100644 --- a/partner_statement/README.rst +++ b/partner_statement/README.rst @@ -7,7 +7,7 @@ Partner Statement !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:8cf120e9937aebc251e3576682aab2450761d8bec81e8da495719a58fe19203e + !! source digest: sha256:111be40283ea7184da0dd0b1038cb08b801ce102e0a2f714ac74f3d92861dc93 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -17,13 +17,13 @@ Partner Statement :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github - :target: https://github.com/OCA/account-financial-reporting/tree/15.0/partner_statement + :target: https://github.com/OCA/account-financial-reporting/tree/16.0/partner_statement :alt: OCA/account-financial-reporting .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-financial-reporting-15-0/account-financial-reporting-15-0-partner_statement + :target: https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-partner_statement :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=15.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -107,7 +107,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -125,6 +125,8 @@ Contributors * Miquel Raïch * Graeme Gellatly * Lois Rilo +* Dhara Solanki +* Danny Adair Maintainers ~~~~~~~~~~~ @@ -147,6 +149,6 @@ Current `maintainer `__: |maintainer-MiquelRForgeFlow| -This module is part of the `OCA/account-financial-reporting `_ project on GitHub. +This module is part of the `OCA/account-financial-reporting `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_statement/__manifest__.py b/partner_statement/__manifest__.py index 10b17874..72664aba 100644 --- a/partner_statement/__manifest__.py +++ b/partner_statement/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Partner Statement", - "version": "15.0.1.1.1", + "version": "16.0.1.0.0", "category": "Accounting & Finance", "summary": "OCA Financial Reports", "author": "ForgeFlow, Odoo Community Association (OCA)", diff --git a/partner_statement/readme/CONTRIBUTORS.rst b/partner_statement/readme/CONTRIBUTORS.rst index 22ac2498..9ee4d135 100644 --- a/partner_statement/readme/CONTRIBUTORS.rst +++ b/partner_statement/readme/CONTRIBUTORS.rst @@ -1,3 +1,5 @@ * Miquel Raïch * Graeme Gellatly * Lois Rilo +* Dhara Solanki +* Danny Adair diff --git a/partner_statement/report/activity_statement.py b/partner_statement/report/activity_statement.py index 91e0f2d1..d52317cb 100644 --- a/partner_statement/report/activity_statement.py +++ b/partner_statement/report/activity_statement.py @@ -30,7 +30,6 @@ class ActivityStatement(models.AbstractModel): END AS open_amount_currency FROM account_move_line l JOIN account_account aa ON (aa.id = l.account_id) - JOIN account_account_type at ON (at.id = aa.user_type_id) JOIN account_move m ON (l.move_id = m.id) LEFT JOIN (SELECT pr.* FROM account_partial_reconcile pr @@ -45,9 +44,9 @@ class ActivityStatement(models.AbstractModel): WHERE l2.date < %(date_start)s ) as pc ON pc.credit_move_id = l.id WHERE l.partner_id IN %(partners)s - AND at.type = %(account_type)s AND l.date < %(date_start)s AND not l.blocked AND m.state IN ('posted') + AND aa.account_type = %(account_type)s AND ( (pd.id IS NOT NULL AND pd.max_date < %(date_start)s) OR @@ -150,14 +149,13 @@ class ActivityStatement(models.AbstractModel): END as date_maturity FROM account_move_line l JOIN account_account aa ON (aa.id = l.account_id) - JOIN account_account_type at ON (at.id = aa.user_type_id) JOIN account_move m ON (l.move_id = m.id) JOIN account_journal aj ON (l.journal_id = aj.id) WHERE l.partner_id IN %(partners)s - AND at.type = %(account_type)s AND %(date_start)s <= l.date AND l.date <= %(date_end)s AND m.state IN ('posted') + AND aa.account_type = %(account_type)s GROUP BY l.partner_id, m.name, l.date, l.date_maturity, CASE WHEN (aj.type IN ('sale', 'purchase')) THEN l.name diff --git a/partner_statement/report/activity_statement_xlsx.py b/partner_statement/report/activity_statement_xlsx.py index 89c706ef..8bee8a77 100644 --- a/partner_statement/report/activity_statement_xlsx.py +++ b/partner_statement/report/activity_statement_xlsx.py @@ -41,7 +41,7 @@ class ActivityStatementXslx(models.AbstractModel): statement_header = _( "%(payable)sStatement between %(start)s and %(end)s in %(currency)s" ) % { - "payable": account_type == "payable" and _("Supplier ") or "", + "payable": account_type == "liability_payable" and _("Supplier ") or "", "start": partner_data.get("start"), "end": partner_data.get("end"), "currency": currency.display_name, diff --git a/partner_statement/report/detailed_activity_statement_xlsx.py b/partner_statement/report/detailed_activity_statement_xlsx.py index c6adac96..784ed9f3 100644 --- a/partner_statement/report/detailed_activity_statement_xlsx.py +++ b/partner_statement/report/detailed_activity_statement_xlsx.py @@ -41,7 +41,7 @@ class DetailedActivityStatementXslx(models.AbstractModel): statement_header = _( "Detailed %(payable)sStatement between %(start)s and %(end)s in %(currency)s" ) % { - "payable": account_type == "payable" and _("Supplier ") or "", + "payable": account_type == "liability_payable" and _("Supplier ") or "", "start": partner_data.get("start"), "end": partner_data.get("end"), "currency": currency.display_name, diff --git a/partner_statement/report/outstanding_statement.py b/partner_statement/report/outstanding_statement.py index a4d69a3c..e54973bc 100644 --- a/partner_statement/report/outstanding_statement.py +++ b/partner_statement/report/outstanding_statement.py @@ -45,7 +45,6 @@ class OutstandingStatement(models.AbstractModel): END as date_maturity FROM account_move_line l JOIN account_account aa ON (aa.id = l.account_id) - JOIN account_account_type at ON (at.id = aa.user_type_id) JOIN account_move m ON (l.move_id = m.id) LEFT JOIN (SELECT pr.* FROM account_partial_reconcile pr @@ -59,7 +58,7 @@ class OutstandingStatement(models.AbstractModel): ON pr.debit_move_id = l2.id WHERE l2.date <= %(date_end)s ) as pc ON pc.credit_move_id = l.id - WHERE l.partner_id IN %(partners)s AND at.type = %(account_type)s + WHERE l.partner_id IN %(partners)s AND ( (pd.id IS NOT NULL AND pd.max_date <= %(date_end)s) OR @@ -67,6 +66,7 @@ class OutstandingStatement(models.AbstractModel): pc.max_date <= %(date_end)s) OR (pd.id IS NULL AND pc.id IS NULL) ) AND l.date <= %(date_end)s AND m.state IN ('posted') + AND aa.account_type = %(account_type)s GROUP BY l.id, l.partner_id, m.name, l.date, l.date_maturity, l.name, CASE WHEN l.ref IS NOT NULL THEN l.ref diff --git a/partner_statement/report/outstanting_statement_xlsx.py b/partner_statement/report/outstanting_statement_xlsx.py index 68faeec2..7c253435 100644 --- a/partner_statement/report/outstanting_statement_xlsx.py +++ b/partner_statement/report/outstanting_statement_xlsx.py @@ -39,7 +39,7 @@ class OutstandingStatementXslx(models.AbstractModel): account_type = data.get("account_type", False) row_pos += 2 statement_header = _("%(payable)sStatement up to %(end)s in %(currency)s") % { - "payable": account_type == "payable" and _("Supplier ") or "", + "payable": account_type == "liability_payable" and _("Supplier ") or "", "end": partner_data.get("end"), "currency": currency.display_name, } diff --git a/partner_statement/report/report_statement_common.py b/partner_statement/report/report_statement_common.py index 297bf9fc..6f229243 100644 --- a/partner_statement/report/report_statement_common.py +++ b/partner_statement/report/report_statement_common.py @@ -69,7 +69,6 @@ class ReportStatementCommon(models.AbstractModel): FROM account_move_line l JOIN account_move m ON (l.move_id = m.id) JOIN account_account aa ON (aa.id = l.account_id) - JOIN account_account_type at ON (at.id = aa.user_type_id) LEFT JOIN (SELECT pr.* FROM account_partial_reconcile pr INNER JOIN account_move_line l2 @@ -82,7 +81,7 @@ class ReportStatementCommon(models.AbstractModel): ON pr.debit_move_id = l2.id WHERE l2.date <= %(date_end)s ) as pc ON pc.credit_move_id = l.id - WHERE l.partner_id IN %(partners)s AND at.type = %(account_type)s + WHERE l.partner_id IN %(partners)s AND ( (pd.id IS NOT NULL AND pd.max_date <= %(date_end)s) OR @@ -91,6 +90,7 @@ class ReportStatementCommon(models.AbstractModel): (pd.id IS NULL AND pc.id IS NULL) ) AND l.date <= %(date_end)s AND not l.blocked AND m.state IN ('posted') + AND aa.account_type = %(account_type)s GROUP BY l.partner_id, l.currency_id, l.date, l.date_maturity, l.amount_currency, l.balance, l.move_id, l.company_id, l.id diff --git a/partner_statement/static/description/index.html b/partner_statement/static/description/index.html index ab7b9c1b..3fdf1863 100644 --- a/partner_statement/static/description/index.html +++ b/partner_statement/static/description/index.html @@ -367,9 +367,9 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:8cf120e9937aebc251e3576682aab2450761d8bec81e8da495719a58fe19203e +!! source digest: sha256:111be40283ea7184da0dd0b1038cb08b801ce102e0a2f714ac74f3d92861dc93 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/account-financial-reporting Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/account-financial-reporting Translate me on Weblate Try me on Runboat

This module extends the functionality of Invoicing to support the printing of customer and vendor statements. There are three types of statements: Activity, Detailed Activity, and Outstanding. Aging details can be shown in the reports, expressed in aging buckets, so the customer or vendor can review how much is open, due or overdue.

@@ -460,7 +460,7 @@ outstanding payments. The list is displayed in chronological order and is split

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -477,6 +477,8 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
  • Miquel Raïch <miquel.raich@forgeflow.com>
  • Graeme Gellatly <graeme@o4sb.com>
  • Lois Rilo <lois.rilo@forgeflow.com>
  • +
  • Dhara Solanki <dhara.solanki@initos.com>
  • +
  • Danny Adair <danny@o4sb.com>
  • @@ -488,7 +490,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

    Current maintainer:

    MiquelRForgeFlow

    -

    This module is part of the OCA/account-financial-reporting project on GitHub.

    +

    This module is part of the OCA/account-financial-reporting project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/partner_statement/views/activity_statement.xml b/partner_statement/views/activity_statement.xml index c8c371f7..97804e00 100644 --- a/partner_statement/views/activity_statement.xml +++ b/partner_statement/views/activity_statement.xml @@ -6,7 +6,7 @@

    Detailed Supplier Statement between and in diff --git a/partner_statement/views/outstanding_statement.xml b/partner_statement/views/outstanding_statement.xml index 3dd4630c..a2456e40 100644 --- a/partner_statement/views/outstanding_statement.xml +++ b/partner_statement/views/outstanding_statement.xml @@ -4,9 +4,9 @@