[IMP] : pre-commit auto fixes

This commit is contained in:
ellbristow
2024-06-25 11:40:46 +02:00
committed by Miquel Raïch
parent e1b5b9729e
commit 3158417c4a
24 changed files with 236 additions and 183 deletions

View File

@@ -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 <https://github.com/OCA/account-financial-reporting/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 <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20partner_statement%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20partner_statement%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@@ -115,21 +132,21 @@ Credits
=======
Authors
~~~~~~~
-------
* ForgeFlow
Contributors
~~~~~~~~~~~~
------------
* 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>
- 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>
Maintainers
~~~~~~~~~~~
-----------
This module is maintained by the OCA.
@@ -149,6 +166,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-MiquelRForgeFlow|
This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/16.0/partner_statement>`_ project on GitHub.
This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/17.0/partner_statement>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -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.

View File

@@ -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.

View File

@@ -0,0 +1,5 @@
- 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>\>

View File

@@ -1,5 +0,0 @@
* 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>

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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
),

View File

@@ -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(

View File

@@ -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(

View File

@@ -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
),

View File

@@ -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(

View File

@@ -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"],

View File

@@ -368,20 +368,26 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:77de87887c4a3ada88f9db6a00b25d47dd445dc8bb5c0da54a72841d3c2816a3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/16.0/partner_statement"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-partner_statement"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/17.0/partner_statement"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-partner_statement"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
@@ -404,15 +410,19 @@ outstanding payments. The list is displayed in chronological order and is split
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>Users willing to access to this report should have proper Accounting &amp; Finance rights:</p>
<p>Users willing to access to this report should have proper Accounting &amp;
Finance rights:</p>
<ol class="arabic simple">
<li>Go to <em>Settings / Users</em> and edit your user to add the corresponding access rights as follows.</li>
<li>In <em>Application / Accounting &amp; Finance</em>, select <em>Billing</em> or <em>Billing Manager</em></li>
<li>Go to <em>Settings / Users</em> and edit your user to add the corresponding
access rights as follows.</li>
<li>In <em>Application / Accounting &amp; Finance</em>, select <em>Billing</em> or <em>Billing
Manager</em></li>
</ol>
<p>To configure this module, you need to:</p>
<ol class="arabic simple">
<li>Go to <em>Invoicing / Configuration / Settings</em></li>
<li>Under the <em>Partner Statements</em> of <em>Accounting</em> option select either or both of OCA Activity or Outstanding Statement</li>
<li>Under the <em>Partner Statements</em> of <em>Accounting</em> option select either
or both of OCA Activity or Outstanding Statement</li>
<li>Once selected, you may set default options for the reports.</li>
<li>Click <em>Save</em></li>
</ol>
@@ -422,18 +432,24 @@ outstanding payments. The list is displayed in chronological order and is split
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>To use this module, you need to:</p>
<ol class="arabic simple">
<li>Go to a list of Partners, Contacts, Customer or Vendors and select one or more.</li>
<li>Press Action &gt; Partner Activity Statement or Action &gt; Partner Outstanding Statement respectively.</li>
<li>Indicate if you want to display receivables or payables, and if you want to display aging buckets and the aging type.</li>
<li>Optionally complete advanced options such as filtering non due or negative balance partners.</li>
<li>Go to a list of Partners, Contacts, Customer or Vendors and select
one or more.</li>
<li>Press Action &gt; Partner Activity Statement or Action &gt; Partner
Outstanding Statement respectively.</li>
<li>Indicate if you want to display receivables or payables, and if you
want to display aging buckets and the aging type.</li>
<li>Optionally complete advanced options such as filtering non due or
negative balance partners.</li>
</ol>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>Email template.</li>
<li>Expose reports (using defaults) to billing users while restricting the wizard to managers option.</li>
<li>Concept of statement run - to start an async job to send out all statements.</li>
<li>Expose reports (using defaults) to billing users while restricting
the wizard to managers option.</li>
<li>Concept of statement run - to start an async job to send out all
statements.</li>
</ul>
</div>
<div class="section" id="changelog">
@@ -441,10 +457,13 @@ outstanding payments. The list is displayed in chronological order and is split
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#toc-entry-5">12.0.1.0.0 (2018-11-08)</a></h2>
<ul class="simple">
<li>[BREAKING] Modules customer_activity_statement and customer_outstanding_statement merged to create partner_statement.</li>
<li>[ADD] New features.
* Age by months or days
* Filter negative balances</li>
<li>[BREAKING] Modules customer_activity_statement and
customer_outstanding_statement merged to create partner_statement.</li>
<li>[ADD] New features.<ul>
<li>Age by months or days</li>
<li>Filter negative balances</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="section-2">
@@ -459,7 +478,7 @@ outstanding payments. The list is displayed in chronological order and is split
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20partner_statement%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20partner_statement%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -489,7 +508,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/MiquelRForgeFlow"><img alt="MiquelRForgeFlow" src="https://github.com/MiquelRForgeFlow.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/16.0/partner_statement">OCA/account-financial-reporting</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/17.0/partner_statement">OCA/account-financial-reporting</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@@ -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({})

View File

@@ -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({})

View File

@@ -7,7 +7,6 @@ from odoo import api, fields, models
class StatementCommon(models.AbstractModel):
_name = "statement.common.wizard"
_description = "Statement Reports Common Wizard"