diff --git a/partner_statement/README.rst b/partner_statement/README.rst index 569b5405..b7b9a229 100644 --- a/partner_statement/README.rst +++ b/partner_statement/README.rst @@ -17,33 +17,39 @@ 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/16.0/partner_statement + :target: https://github.com/OCA/account-financial-reporting/tree/17.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-16-0/account-financial-reporting-16-0-partner_statement + :target: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-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=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -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. +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. -The activity statement provides details of all activity on the partner receivables or payables -between two selected dates. This includes all invoices, refunds and payments. -Any outstanding balance dated prior to the chosen statement period will appear -as a forward balance at the top of the statement. The list is displayed in chronological -order and is split by currencies. +The activity statement provides details of all activity on the partner +receivables or payables between two selected dates. This includes all +invoices, refunds and payments. Any outstanding balance dated prior to +the chosen statement period will appear as a forward balance at the top +of the statement. The list is displayed in chronological order and is +split by currencies. -The detailed activity statement is an extension of the previous statement, and intends to explain the transactions -that have happened during the period, also providing with a Prior Balance section and an Ending Balance section. +The detailed activity statement is an extension of the previous +statement, and intends to explain the transactions that have happened +during the period, also providing with a Prior Balance section and an +Ending Balance section. -The outstanding statement provides details of all outstanding partner receivables or payables -up to a particular date. This includes all unpaid invoices, unclaimed refunds and -outstanding payments. The list is displayed in chronological order and is split by currencies. +The outstanding statement provides details of all outstanding partner +receivables or payables up to a particular date. This includes all +unpaid invoices, unclaimed refunds and outstanding payments. The list is +displayed in chronological order and is split by currencies. **Table of contents** @@ -53,18 +59,21 @@ outstanding payments. The list is displayed in chronological order and is split Configuration ============= +Users willing to access to this report should have proper Accounting & +Finance rights: -Users willing to access to this report should have proper Accounting & Finance rights: - -#. Go to *Settings / Users* and edit your user to add the corresponding access rights as follows. -#. In *Application / Accounting & Finance*, select *Billing* or *Billing Manager* +1. Go to *Settings / Users* and edit your user to add the corresponding + access rights as follows. +2. In *Application / Accounting & Finance*, select *Billing* or *Billing + Manager* To configure this module, you need to: -#. Go to *Invoicing / Configuration / Settings* -#. Under the *Partner Statements* of *Accounting* option select either or both of OCA Activity or Outstanding Statement -#. Once selected, you may set default options for the reports. -#. Click *Save* +1. Go to *Invoicing / Configuration / Settings* +2. Under the *Partner Statements* of *Accounting* option select either + or both of OCA Activity or Outstanding Statement +3. Once selected, you may set default options for the reports. +4. Click *Save* Removing the wizard from menus follows the same process. @@ -73,33 +82,41 @@ Usage To use this module, you need to: -#. Go to a list of Partners, Contacts, Customer or Vendors and select one or more. -#. Press 'Action > Partner Activity Statement' or 'Action > Partner Outstanding Statement' respectively. -#. Indicate if you want to display receivables or payables, and if you want to display aging buckets and the aging type. -#. Optionally complete advanced options such as filtering non due or negative balance partners. +1. Go to a list of Partners, Contacts, Customer or Vendors and select + one or more. +2. Press 'Action > Partner Activity Statement' or 'Action > Partner + Outstanding Statement' respectively. +3. Indicate if you want to display receivables or payables, and if you + want to display aging buckets and the aging type. +4. Optionally complete advanced options such as filtering non due or + negative balance partners. Known issues / Roadmap ====================== -* Email template. -* Expose reports (using defaults) to billing users while restricting the wizard to managers option. -* Concept of statement run - to start an async job to send out all statements. +- Email template. +- Expose reports (using defaults) to billing users while restricting + the wizard to managers option. +- Concept of statement run - to start an async job to send out all + statements. Changelog ========= 12.0.1.0.0 (2018-11-08) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- -* [BREAKING] Modules customer_activity_statement and customer_outstanding_statement merged to create partner_statement. -* [ADD] New features. - * Age by months or days - * Filter negative balances +- [BREAKING] Modules customer_activity_statement and + customer_outstanding_statement merged to create partner_statement. +- [ADD] New features. + + - Age by months or days + - Filter negative balances 14.0.2.0.0 (2022-12-16) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- -* [ADD] Detailed Activity Statement. +- [ADD] Detailed Activity Statement. Bug Tracker =========== @@ -107,7 +124,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. @@ -115,21 +132,21 @@ Credits ======= Authors -~~~~~~~ +------- * ForgeFlow Contributors -~~~~~~~~~~~~ +------------ -* Miquel Raïch -* Graeme Gellatly -* Lois Rilo -* Dhara Solanki -* Danny Adair +- Miquel Raïch +- Graeme Gellatly +- Lois Rilo +- Dhara Solanki +- Danny Adair Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -149,6 +166,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/pyproject.toml b/partner_statement/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/partner_statement/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/partner_statement/readme/CONFIGURE.md b/partner_statement/readme/CONFIGURE.md new file mode 100644 index 00000000..922940fc --- /dev/null +++ b/partner_statement/readme/CONFIGURE.md @@ -0,0 +1,17 @@ +Users willing to access to this report should have proper Accounting & +Finance rights: + +1. Go to *Settings / Users* and edit your user to add the corresponding + access rights as follows. +2. In *Application / Accounting & Finance*, select *Billing* or + *Billing Manager* + +To configure this module, you need to: + +1. Go to *Invoicing / Configuration / Settings* +2. Under the *Partner Statements* of *Accounting* option select either + or both of OCA Activity or Outstanding Statement +3. Once selected, you may set default options for the reports. +4. Click *Save* + +Removing the wizard from menus follows the same process. diff --git a/partner_statement/readme/CONFIGURE.rst b/partner_statement/readme/CONFIGURE.rst deleted file mode 100644 index a55b1cec..00000000 --- a/partner_statement/readme/CONFIGURE.rst +++ /dev/null @@ -1,14 +0,0 @@ - -Users willing to access to this report should have proper Accounting & Finance rights: - -#. Go to *Settings / Users* and edit your user to add the corresponding access rights as follows. -#. In *Application / Accounting & Finance*, select *Billing* or *Billing Manager* - -To configure this module, you need to: - -#. Go to *Invoicing / Configuration / Settings* -#. Under the *Partner Statements* of *Accounting* option select either or both of OCA Activity or Outstanding Statement -#. Once selected, you may set default options for the reports. -#. Click *Save* - -Removing the wizard from menus follows the same process. diff --git a/partner_statement/readme/CONTRIBUTORS.md b/partner_statement/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..346629bb --- /dev/null +++ b/partner_statement/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- Miquel Raïch \<\> +- Graeme Gellatly \<\> +- Lois Rilo \<\> +- Dhara Solanki \<\> +- Danny Adair \<\> diff --git a/partner_statement/readme/CONTRIBUTORS.rst b/partner_statement/readme/CONTRIBUTORS.rst deleted file mode 100644 index 9ee4d135..00000000 --- a/partner_statement/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,5 +0,0 @@ -* Miquel Raïch -* Graeme Gellatly -* Lois Rilo -* Dhara Solanki -* Danny Adair diff --git a/partner_statement/readme/DESCRIPTION.md b/partner_statement/readme/DESCRIPTION.md new file mode 100644 index 00000000..a6d3dc90 --- /dev/null +++ b/partner_statement/readme/DESCRIPTION.md @@ -0,0 +1,22 @@ +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. + +The activity statement provides details of all activity on the partner +receivables or payables between two selected dates. This includes all +invoices, refunds and payments. Any outstanding balance dated prior to +the chosen statement period will appear as a forward balance at the top +of the statement. The list is displayed in chronological order and is +split by currencies. + +The detailed activity statement is an extension of the previous +statement, and intends to explain the transactions that have happened +during the period, also providing with a Prior Balance section and an +Ending Balance section. + +The outstanding statement provides details of all outstanding partner +receivables or payables up to a particular date. This includes all +unpaid invoices, unclaimed refunds and outstanding payments. The list is +displayed in chronological order and is split by currencies. diff --git a/partner_statement/readme/DESCRIPTION.rst b/partner_statement/readme/DESCRIPTION.rst deleted file mode 100644 index 981ca8f1..00000000 --- a/partner_statement/readme/DESCRIPTION.rst +++ /dev/null @@ -1,16 +0,0 @@ -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. - -The activity statement provides details of all activity on the partner receivables or payables -between two selected dates. This includes all invoices, refunds and payments. -Any outstanding balance dated prior to the chosen statement period will appear -as a forward balance at the top of the statement. The list is displayed in chronological -order and is split by currencies. - -The detailed activity statement is an extension of the previous statement, and intends to explain the transactions -that have happened during the period, also providing with a Prior Balance section and an Ending Balance section. - -The outstanding statement provides details of all outstanding partner receivables or payables -up to a particular date. This includes all unpaid invoices, unclaimed refunds and -outstanding payments. The list is displayed in chronological order and is split by currencies. diff --git a/partner_statement/readme/HISTORY.md b/partner_statement/readme/HISTORY.md new file mode 100644 index 00000000..c549a498 --- /dev/null +++ b/partner_statement/readme/HISTORY.md @@ -0,0 +1,11 @@ +## 12.0.1.0.0 (2018-11-08) + +- \[BREAKING\] Modules customer_activity_statement and + customer_outstanding_statement merged to create partner_statement. +- \[ADD\] New features. + - Age by months or days + - Filter negative balances + +## 14.0.2.0.0 (2022-12-16) + +- \[ADD\] Detailed Activity Statement. diff --git a/partner_statement/readme/HISTORY.rst b/partner_statement/readme/HISTORY.rst deleted file mode 100644 index a1bcf6d7..00000000 --- a/partner_statement/readme/HISTORY.rst +++ /dev/null @@ -1,12 +0,0 @@ -12.0.1.0.0 (2018-11-08) -~~~~~~~~~~~~~~~~~~~~~~~ - -* [BREAKING] Modules customer_activity_statement and customer_outstanding_statement merged to create partner_statement. -* [ADD] New features. - * Age by months or days - * Filter negative balances - -14.0.2.0.0 (2022-12-16) -~~~~~~~~~~~~~~~~~~~~~~~ - -* [ADD] Detailed Activity Statement. diff --git a/partner_statement/readme/ROADMAP.md b/partner_statement/readme/ROADMAP.md new file mode 100644 index 00000000..a10cdb24 --- /dev/null +++ b/partner_statement/readme/ROADMAP.md @@ -0,0 +1,5 @@ +- Email template. +- Expose reports (using defaults) to billing users while restricting the + wizard to managers option. +- Concept of statement run - to start an async job to send out all + statements. diff --git a/partner_statement/readme/ROADMAP.rst b/partner_statement/readme/ROADMAP.rst deleted file mode 100644 index 6632eec0..00000000 --- a/partner_statement/readme/ROADMAP.rst +++ /dev/null @@ -1,3 +0,0 @@ -* Email template. -* Expose reports (using defaults) to billing users while restricting the wizard to managers option. -* Concept of statement run - to start an async job to send out all statements. diff --git a/partner_statement/readme/USAGE.md b/partner_statement/readme/USAGE.md new file mode 100644 index 00000000..e56574b9 --- /dev/null +++ b/partner_statement/readme/USAGE.md @@ -0,0 +1,10 @@ +To use this module, you need to: + +1. Go to a list of Partners, Contacts, Customer or Vendors and select + one or more. +2. Press 'Action \> Partner Activity Statement' or 'Action \> Partner + Outstanding Statement' respectively. +3. Indicate if you want to display receivables or payables, and if you + want to display aging buckets and the aging type. +4. Optionally complete advanced options such as filtering non due or + negative balance partners. diff --git a/partner_statement/readme/USAGE.rst b/partner_statement/readme/USAGE.rst deleted file mode 100644 index 53eb8572..00000000 --- a/partner_statement/readme/USAGE.rst +++ /dev/null @@ -1,6 +0,0 @@ -To use this module, you need to: - -#. Go to a list of Partners, Contacts, Customer or Vendors and select one or more. -#. Press 'Action > Partner Activity Statement' or 'Action > Partner Outstanding Statement' respectively. -#. Indicate if you want to display receivables or payables, and if you want to display aging buckets and the aging type. -#. Optionally complete advanced options such as filtering non due or negative balance partners. diff --git a/partner_statement/report/activity_statement.py b/partner_statement/report/activity_statement.py index d52317cb..b9d0756a 100644 --- a/partner_statement/report/activity_statement.py +++ b/partner_statement/report/activity_statement.py @@ -25,8 +25,12 @@ class ActivityStatement(models.AbstractModel): ELSE l.balance + sum(coalesce(pc.amount, 0.0)) END AS open_amount, CASE WHEN l.balance > 0.0 - THEN l.amount_currency - sum(coalesce(pd.debit_amount_currency, 0.0)) - ELSE l.amount_currency + sum(coalesce(pc.credit_amount_currency, 0.0)) + THEN l.amount_currency - sum(coalesce( + pd.debit_amount_currency, 0.0) + ) + ELSE l.amount_currency + sum(coalesce( + pc.credit_amount_currency, 0.0) + ) END AS open_amount_currency FROM account_move_line l JOIN account_account aa ON (aa.id = l.account_id) @@ -98,13 +102,12 @@ class ActivityStatement(models.AbstractModel): partners = tuple(partner_ids) # pylint: disable=E8103 self.env.cr.execute( - """WITH Q1 AS (%s), - Q2 AS (%s), - Q3 AS (%s) + """WITH Q1 AS ({}), + Q2 AS ({}), + Q3 AS ({}) SELECT partner_id, currency_id, sum(balance) as balance FROM Q3 - GROUP BY partner_id, currency_id""" - % ( + GROUP BY partner_id, currency_id""".format( self._initial_balance_sql_q1(partners, date_start, account_type), self._initial_balance_sql_q2("Q1"), self._initial_balance_sql_q3("Q2", company_id), @@ -193,14 +196,13 @@ class ActivityStatement(models.AbstractModel): # pylint: disable=E8103 self.env.cr.execute( """ - WITH Q1 AS (%s), - Q2 AS (%s) + WITH Q1 AS ({}), + Q2 AS ({}) SELECT partner_id, move_id, date, date_maturity, ids, COALESCE(name, '') as name, COALESCE(ref, '') as ref, debit, credit, amount, blocked, currency_id FROM Q2 - ORDER BY date, date_maturity, move_id""" - % ( + ORDER BY date, date_maturity, move_id""".format( self._display_activity_lines_sql_q1( partners, date_start, date_end, account_type ), @@ -282,18 +284,17 @@ class ActivityStatement(models.AbstractModel): # pylint: disable=E8103 self.env.cr.execute( """ - WITH Q1 AS (%s), - Q2 AS (%s), - Q3 AS (%s), - Q4 AS (%s), - Q5 AS (%s), - Q6 AS (%s) + WITH Q1 AS ({}), + Q2 AS ({}), + Q3 AS ({}), + Q4 AS ({}), + Q5 AS ({}), + Q6 AS ({}) SELECT partner_id, currency_id, move_id, date, date_maturity, debit, credit, amount, open_amount, COALESCE(name, '') as name, COALESCE(ref, '') as ref, blocked, id FROM Q6 - ORDER BY date, date_maturity, move_id""" - % ( + ORDER BY date, date_maturity, move_id""".format( self._display_activity_lines_sql_q1( partners, date_start, date_end, account_type ), diff --git a/partner_statement/report/activity_statement_xlsx.py b/partner_statement/report/activity_statement_xlsx.py index 6f5609b3..04fc77c9 100644 --- a/partner_statement/report/activity_statement_xlsx.py +++ b/partner_statement/report/activity_statement_xlsx.py @@ -29,7 +29,7 @@ class ActivityStatementXslx(models.AbstractModel): report_name = _("Activity Statement") if company_id: company = self.env["res.company"].browse(company_id) - suffix = " - {} - {}".format(company.name, company.currency_id.name) + suffix = f" - {company.name} - {company.currency_id.name}" report_name = report_name + suffix return report_name @@ -300,11 +300,12 @@ class ActivityStatementXslx(models.AbstractModel): for currency_id in currencies: currency = self.env["res.currency"].browse(currency_id) if currency.position == "after": - money_string = "#,##0.%s " % ( - "0" * currency.decimal_places - ) + "[${}]".format(currency.symbol) + money_string = ( + "#,##0.%s " % ("0" * currency.decimal_places) + + f"[${currency.symbol}]" + ) elif currency.position == "before": - money_string = "[${}]".format(currency.symbol) + " #,##0.%s" % ( + money_string = f"[${currency.symbol}]" + " #,##0.%s" % ( "0" * currency.decimal_places ) FORMATS["current_money_format"] = workbook.add_format( diff --git a/partner_statement/report/detailed_activity_statement_xlsx.py b/partner_statement/report/detailed_activity_statement_xlsx.py index 80331031..551f5cfa 100644 --- a/partner_statement/report/detailed_activity_statement_xlsx.py +++ b/partner_statement/report/detailed_activity_statement_xlsx.py @@ -29,7 +29,7 @@ class DetailedActivityStatementXslx(models.AbstractModel): report_name = _("Detailed Activity Statement") if company_id: company = self.env["res.company"].browse(company_id) - suffix = " - {} - {}".format(company.name, company.currency_id.name) + suffix = f" - {company.name} - {company.currency_id.name}" report_name = report_name + suffix return report_name @@ -39,7 +39,8 @@ class DetailedActivityStatementXslx(models.AbstractModel): account_type = data.get("account_type", False) row_pos += 2 statement_header = _( - "Detailed %(payable)sStatement between %(start)s and %(end)s in %(currency)s" + "Detailed %(payable)sStatement between %(start)s and %(end)s" + " in %(currency)s" ) % { "payable": account_type == "liability_payable" and _("Supplier ") or "", "start": partner_data.get("start"), @@ -523,11 +524,12 @@ class DetailedActivityStatementXslx(models.AbstractModel): for currency_id in currencies: currency = self.env["res.currency"].browse(currency_id) if currency.position == "after": - money_string = "#,##0.%s " % ( - "0" * currency.decimal_places - ) + "[${}]".format(currency.symbol) + money_string = ( + "#,##0.%s " % ("0" * currency.decimal_places) + + f"[${currency.symbol}]" + ) elif currency.position == "before": - money_string = "[${}]".format(currency.symbol) + " #,##0.%s" % ( + money_string = f"[${currency.symbol}]" + " #,##0.%s" % ( "0" * currency.decimal_places ) FORMATS["current_money_format"] = workbook.add_format( diff --git a/partner_statement/report/outstanding_statement.py b/partner_statement/report/outstanding_statement.py index e54973bc..c58c0b1a 100644 --- a/partner_statement/report/outstanding_statement.py +++ b/partner_statement/report/outstanding_statement.py @@ -123,15 +123,14 @@ class OutstandingStatement(models.AbstractModel): # pylint: disable=E8103 self.env.cr.execute( """ - WITH Q1 as (%s), - Q2 AS (%s), - Q3 AS (%s) + WITH Q1 as ({}), + Q2 AS ({}), + Q3 AS ({}) SELECT partner_id, currency_id, move_id, date, date_maturity, debit, credit, amount, open_amount, COALESCE(name, '') as name, COALESCE(ref, '') as ref, blocked, id FROM Q3 - ORDER BY date, date_maturity, move_id""" - % ( + ORDER BY date, date_maturity, move_id""".format( self._display_outstanding_lines_sql_q1( partners, date_end, account_type ), diff --git a/partner_statement/report/outstanting_statement_xlsx.py b/partner_statement/report/outstanting_statement_xlsx.py index 32551be6..03e50685 100644 --- a/partner_statement/report/outstanting_statement_xlsx.py +++ b/partner_statement/report/outstanting_statement_xlsx.py @@ -29,7 +29,7 @@ class OutstandingStatementXslx(models.AbstractModel): report_name = _("Outstanding Statement") if company_id: company = self.env["res.company"].browse(company_id) - suffix = " - {} - {}".format(company.name, company.currency_id.name) + suffix = f" - {company.name} - {company.currency_id.name}" report_name = report_name + suffix return report_name @@ -278,11 +278,12 @@ class OutstandingStatementXslx(models.AbstractModel): for currency_id in currencies: currency = self.env["res.currency"].browse(currency_id) if currency.position == "after": - money_string = "#,##0.%s " % ( - "0" * currency.decimal_places - ) + "[${}]".format(currency.symbol) + money_string = ( + "#,##0.%s " % ("0" * currency.decimal_places) + + f"[${currency.symbol}]" + ) elif currency.position == "before": - money_string = "[${}]".format(currency.symbol) + " #,##0.%s" % ( + money_string = f"[${currency.symbol}]" + " #,##0.%s" % ( "0" * currency.decimal_places ) FORMATS["current_money_format"] = workbook.add_format( diff --git a/partner_statement/report/report_statement_common.py b/partner_statement/report/report_statement_common.py index ea420fe3..98e04475 100644 --- a/partner_statement/report/report_statement_common.py +++ b/partner_statement/report/report_statement_common.py @@ -233,18 +233,17 @@ class ReportStatementCommon(models.AbstractModel): # All input queries are properly escaped - false positive self.env.cr.execute( """ - WITH Q1 AS (%s), - Q2 AS (%s), - Q3 AS (%s), - Q4 AS (%s) + WITH Q1 AS ({}), + Q2 AS ({}), + Q3 AS ({}), + Q4 AS ({}) SELECT partner_id, currency_id, current, b_1_30, b_30_60, b_60_90, b_90_120, b_over_120, current+b_1_30+b_30_60+b_60_90+b_90_120+b_over_120 AS balance FROM Q4 GROUP BY partner_id, currency_id, current, b_1_30, b_30_60, - b_60_90, b_90_120, b_over_120""" - % ( + b_60_90, b_90_120, b_over_120""".format( self._show_buckets_sql_q1(partners, date_end, account_type), self._show_buckets_sql_q2( full_dates["date_end"], diff --git a/partner_statement/static/description/index.html b/partner_statement/static/description/index.html index f56f6734..258255af 100644 --- a/partner_statement/static/description/index.html +++ b/partner_statement/static/description/index.html @@ -368,20 +368,26 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:77de87887c4a3ada88f9db6a00b25d47dd445dc8bb5c0da54a72841d3c2816a3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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.

-

The activity statement provides details of all activity on the partner receivables or payables -between two selected dates. This includes all invoices, refunds and payments. -Any outstanding balance dated prior to the chosen statement period will appear -as a forward balance at the top of the statement. The list is displayed in chronological -order and is split by currencies.

-

The detailed activity statement is an extension of the previous statement, and intends to explain the transactions -that have happened during the period, also providing with a Prior Balance section and an Ending Balance section.

-

The outstanding statement provides details of all outstanding partner receivables or payables -up to a particular date. This includes all unpaid invoices, unclaimed refunds and -outstanding payments. The list is displayed in chronological order and is split by currencies.

+

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.

+

The activity statement provides details of all activity on the partner +receivables or payables between two selected dates. This includes all +invoices, refunds and payments. Any outstanding balance dated prior to +the chosen statement period will appear as a forward balance at the top +of the statement. The list is displayed in chronological order and is +split by currencies.

+

The detailed activity statement is an extension of the previous +statement, and intends to explain the transactions that have happened +during the period, also providing with a Prior Balance section and an +Ending Balance section.

+

The outstanding statement provides details of all outstanding partner +receivables or payables up to a particular date. This includes all +unpaid invoices, unclaimed refunds and outstanding payments. The list is +displayed in chronological order and is split by currencies.

Table of contents

    @@ -404,15 +410,19 @@ outstanding payments. The list is displayed in chronological order and is split

Configuration

-

Users willing to access to this report should have proper Accounting & Finance rights:

+

Users willing to access to this report should have proper Accounting & +Finance rights:

    -
  1. Go to Settings / Users and edit your user to add the corresponding access rights as follows.
  2. -
  3. In Application / Accounting & Finance, select Billing or Billing Manager
  4. +
  5. Go to Settings / Users and edit your user to add the corresponding +access rights as follows.
  6. +
  7. In Application / Accounting & Finance, select Billing or Billing +Manager

To configure this module, you need to:

  1. Go to Invoicing / Configuration / Settings
  2. -
  3. Under the Partner Statements of Accounting option select either or both of OCA Activity or Outstanding Statement
  4. +
  5. Under the Partner Statements of Accounting option select either +or both of OCA Activity or Outstanding Statement
  6. Once selected, you may set default options for the reports.
  7. Click Save
@@ -422,18 +432,24 @@ outstanding payments. The list is displayed in chronological order and is split

Usage

To use this module, you need to:

    -
  1. Go to a list of Partners, Contacts, Customer or Vendors and select one or more.
  2. -
  3. Press ‘Action > Partner Activity Statement’ or ‘Action > Partner Outstanding Statement’ respectively.
  4. -
  5. Indicate if you want to display receivables or payables, and if you want to display aging buckets and the aging type.
  6. -
  7. Optionally complete advanced options such as filtering non due or negative balance partners.
  8. +
  9. Go to a list of Partners, Contacts, Customer or Vendors and select +one or more.
  10. +
  11. Press ‘Action > Partner Activity Statement’ or ‘Action > Partner +Outstanding Statement’ respectively.
  12. +
  13. Indicate if you want to display receivables or payables, and if you +want to display aging buckets and the aging type.
  14. +
  15. Optionally complete advanced options such as filtering non due or +negative balance partners.

Known issues / Roadmap

  • Email template.
  • -
  • Expose reports (using defaults) to billing users while restricting the wizard to managers option.
  • -
  • Concept of statement run - to start an async job to send out all statements.
  • +
  • Expose reports (using defaults) to billing users while restricting +the wizard to managers option.
  • +
  • Concept of statement run - to start an async job to send out all +statements.
@@ -441,10 +457,13 @@ outstanding payments. The list is displayed in chronological order and is split

12.0.1.0.0 (2018-11-08)

    -
  • [BREAKING] Modules customer_activity_statement and customer_outstanding_statement merged to create partner_statement.
  • -
  • [ADD] New features. -* Age by months or days -* Filter negative balances
  • +
  • [BREAKING] Modules customer_activity_statement and +customer_outstanding_statement merged to create partner_statement.
  • +
  • [ADD] New features.
      +
    • Age by months or days
    • +
    • Filter negative balances
    • +
    +
@@ -459,7 +478,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.

@@ -489,7 +508,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/tests/test_activity_statement.py b/partner_statement/tests/test_activity_statement.py index 81da0fbb..dafb6c06 100644 --- a/partner_statement/tests/test_activity_statement.py +++ b/partner_statement/tests/test_activity_statement.py @@ -44,7 +44,6 @@ class TestActivityStatement(TransactionCase): cls.today = fields.Date.context_today(cls.wiz) def test_customer_activity_statement(self): - wiz_id = self.wiz.with_context( active_ids=[self.partner1.id, self.partner2.id] ).create({}) diff --git a/partner_statement/tests/test_outstanding_statement.py b/partner_statement/tests/test_outstanding_statement.py index 2c4d1dff..582586ba 100644 --- a/partner_statement/tests/test_outstanding_statement.py +++ b/partner_statement/tests/test_outstanding_statement.py @@ -38,7 +38,6 @@ class TestOutstandingStatement(TransactionCase): cls.report_title = "Outstanding Statement" def test_customer_outstanding_statement(self): - wiz_id = self.wiz.with_context( active_ids=[self.partner1.id, self.partner2.id] ).create({}) diff --git a/partner_statement/wizard/statement_common.py b/partner_statement/wizard/statement_common.py index 1dc6b0d3..37d23909 100644 --- a/partner_statement/wizard/statement_common.py +++ b/partner_statement/wizard/statement_common.py @@ -7,7 +7,6 @@ from odoo import api, fields, models class StatementCommon(models.AbstractModel): - _name = "statement.common.wizard" _description = "Statement Reports Common Wizard"