From c6d04b7572a7101fb6dcf41235fffdc23b802ca9 Mon Sep 17 00:00:00 2001
From: Graeme Gellatly
Date: Fri, 4 Mar 2022 10:01:58 +1300
Subject: [PATCH] Fix partner_statement: NULL Error in report
---
partner_statement/README.rst | 14 +++---
partner_statement/i18n/partner_statement.pot | 43 ++++++++-----------
.../report/outstanting_statement_xlsx.py | 4 +-
.../static/description/index.html | 10 ++---
4 files changed, 31 insertions(+), 40 deletions(-)
diff --git a/partner_statement/README.rst b/partner_statement/README.rst
index fd97708f..83e74f1b 100644
--- a/partner_statement/README.rst
+++ b/partner_statement/README.rst
@@ -14,13 +14,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/14.0/partner_statement
+ :target: https://github.com/OCA/account-financial-reporting/tree/15.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-14-0/account-financial-reporting-14-0-partner_statement
+ :target: https://translation.odoo-community.org/projects/account-financial-reporting-15-0/account-financial-reporting-15-0-partner_statement
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/91/14.0
+ :target: https://runbot.odoo-community.org/runbot/91/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -55,8 +55,8 @@ Users willing to access to this report should have proper Accounting & Finance r
To configure this module, you need to:
-#. Go to *Configuration / Settings*
-#. Under the *Followup Section* of *Accounting* option select either or both of OCA Activity or Outstanding Statement
+#. 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*
@@ -96,7 +96,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 smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -128,6 +128,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-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/i18n/partner_statement.pot b/partner_statement/i18n/partner_statement.pot
index 0b7253bb..2245fa95 100644
--- a/partner_statement/i18n/partner_statement.pot
+++ b/partner_statement/i18n/partner_statement.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 14.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -16,13 +16,13 @@ msgstr ""
#. module: partner_statement
#: code:addons/partner_statement/report/activity_statement_xlsx.py:0
#, python-format
-msgid "%sStatement between %s and %s in %s"
+msgid "%(payable)sStatement between %(start)s and %(end)s in %(currency)s"
msgstr ""
#. module: partner_statement
#: code:addons/partner_statement/report/outstanting_statement_xlsx.py:0
#, python-format
-msgid "%sStatement up to %s in %s"
+msgid "%(payable)sStatement up to %(end)s in %(currency)s"
msgstr ""
#. module: partner_statement
@@ -140,7 +140,7 @@ msgstr ""
#: model:ir.model.fields,field_description:partner_statement.field_activity_statement_wizard__account_type
#: model:ir.model.fields,field_description:partner_statement.field_outstanding_statement_wizard__account_type
#: model:ir.model.fields,field_description:partner_statement.field_statement_common_wizard__account_type
-msgid "Account type"
+msgid "Account Type"
msgstr ""
#. module: partner_statement
@@ -205,7 +205,7 @@ msgstr ""
#: code:addons/partner_statement/report/activity_statement_xlsx.py:0
#: code:addons/partner_statement/report/outstanting_statement_xlsx.py:0
#, python-format
-msgid "Aging Report at %s in %s"
+msgid "Aging Report at %(end)s in %(currency)s"
msgstr ""
#. module: partner_statement
@@ -305,13 +305,6 @@ msgstr ""
#. module: partner_statement
#: model:ir.model.fields,field_description:partner_statement.field_activity_statement_wizard__display_name
#: model:ir.model.fields,field_description:partner_statement.field_outstanding_statement_wizard__display_name
-#: model:ir.model.fields,field_description:partner_statement.field_report_p_s_report_activity_statement_xlsx__display_name
-#: model:ir.model.fields,field_description:partner_statement.field_report_p_s_report_outstanding_statement_xlsx__display_name
-#: model:ir.model.fields,field_description:partner_statement.field_report_partner_statement_activity_statement__display_name
-#: model:ir.model.fields,field_description:partner_statement.field_report_partner_statement_outstanding_statement__display_name
-#: model:ir.model.fields,field_description:partner_statement.field_res_config_settings__display_name
-#: model:ir.model.fields,field_description:partner_statement.field_statement_common__display_name
-#: model:ir.model.fields,field_description:partner_statement.field_statement_common_wizard__display_name
msgid "Display Name"
msgstr ""
@@ -374,26 +367,12 @@ msgstr ""
#. module: partner_statement
#: model:ir.model.fields,field_description:partner_statement.field_activity_statement_wizard__id
#: model:ir.model.fields,field_description:partner_statement.field_outstanding_statement_wizard__id
-#: model:ir.model.fields,field_description:partner_statement.field_report_p_s_report_activity_statement_xlsx__id
-#: model:ir.model.fields,field_description:partner_statement.field_report_p_s_report_outstanding_statement_xlsx__id
-#: model:ir.model.fields,field_description:partner_statement.field_report_partner_statement_activity_statement__id
-#: model:ir.model.fields,field_description:partner_statement.field_report_partner_statement_outstanding_statement__id
-#: model:ir.model.fields,field_description:partner_statement.field_res_config_settings__id
-#: model:ir.model.fields,field_description:partner_statement.field_statement_common__id
-#: model:ir.model.fields,field_description:partner_statement.field_statement_common_wizard__id
msgid "ID"
msgstr ""
#. module: partner_statement
#: model:ir.model.fields,field_description:partner_statement.field_activity_statement_wizard____last_update
#: model:ir.model.fields,field_description:partner_statement.field_outstanding_statement_wizard____last_update
-#: model:ir.model.fields,field_description:partner_statement.field_report_p_s_report_activity_statement_xlsx____last_update
-#: model:ir.model.fields,field_description:partner_statement.field_report_p_s_report_outstanding_statement_xlsx____last_update
-#: model:ir.model.fields,field_description:partner_statement.field_report_partner_statement_activity_statement____last_update
-#: model:ir.model.fields,field_description:partner_statement.field_report_partner_statement_outstanding_statement____last_update
-#: model:ir.model.fields,field_description:partner_statement.field_res_config_settings____last_update
-#: model:ir.model.fields,field_description:partner_statement.field_statement_common____last_update
-#: model:ir.model.fields,field_description:partner_statement.field_statement_common_wizard____last_update
msgid "Last Modified on"
msgstr ""
@@ -485,6 +464,11 @@ msgstr ""
msgid "Partner Outstanding Statement"
msgstr ""
+#. module: partner_statement
+#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
+msgid "Partner Statements"
+msgstr ""
+
#. module: partner_statement
#: model:ir.model.fields.selection,name:partner_statement.selection__activity_statement_wizard__account_type__payable
#: model:ir.model.fields.selection,name:partner_statement.selection__outstanding_statement_wizard__account_type__payable
@@ -577,6 +561,13 @@ msgstr ""
msgid "Supplier"
msgstr ""
+#. module: partner_statement
+#: code:addons/partner_statement/report/activity_statement_xlsx.py:0
+#: code:addons/partner_statement/report/outstanting_statement_xlsx.py:0
+#, python-format
+msgid "Supplier "
+msgstr ""
+
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#: code:addons/partner_statement/report/report_statement_common.py:0
diff --git a/partner_statement/report/outstanting_statement_xlsx.py b/partner_statement/report/outstanting_statement_xlsx.py
index 58ef076e..e1e82566 100644
--- a/partner_statement/report/outstanting_statement_xlsx.py
+++ b/partner_statement/report/outstanting_statement_xlsx.py
@@ -58,11 +58,11 @@ class OutstandingStatementXslx(models.AbstractModel):
if not line.get("ref", ""):
name_to_show = line.get("name", "")
else:
- if (line.get("name", "") in line.get("ref", "")) or (
+ if (line.get("ref", "") in line.get("name", "")) or (
line.get("name", "") == line.get("ref", "")
):
name_to_show = line.get("name", "")
- elif line.get("ref", "") not in line.get("name", ""):
+ else:
name_to_show = line.get("ref", "")
sheet.write(
row_pos, 0, line.get("move_id", ""), FORMATS["format_tcell_left"]
diff --git a/partner_statement/static/description/index.html b/partner_statement/static/description/index.html
index c966a93f..99849407 100644
--- a/partner_statement/static/description/index.html
+++ b/partner_statement/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module extends the functionality of Invoicing to support the printing of customer and vendor statements.
There are two types of statements, 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.
@@ -407,8 +407,8 @@ outstanding payments. The list is displayed in chronological order and is split
To configure this module, you need to:
-- Go to Configuration / Settings
-- Under the Followup Section of Accounting option select either or both of OCA Activity or Outstanding Statement
+- 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
@@ -449,7 +449,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 smashing it by providing a detailed and welcomed
-feedback.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -475,7 +475,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
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.