Browse Source

[13.0][IMP] partner_statement:

* show partner name at the top.
* simplify view logic for `name` and `ref` printing.
* fallback to journal entry `ref` when the journal item has no
  `ref` set.
* little query formatting changes to enhance readability.
pull/762/head
Lois Rilo 4 years ago
committed by Rujia Liu
parent
commit
af01e4f9b1
  1. 1
      partner_statement/README.rst
  2. 2
      partner_statement/__manifest__.py
  3. 11
      partner_statement/i18n/ca.po
  4. 11
      partner_statement/i18n/de.po
  5. 20
      partner_statement/i18n/es.po
  6. 39
      partner_statement/i18n/es_AR.po
  7. 14
      partner_statement/i18n/fr.po
  8. 11
      partner_statement/i18n/hr_HR.po
  9. 14
      partner_statement/i18n/it.po
  10. 38
      partner_statement/i18n/nl.po
  11. 11
      partner_statement/i18n/nl_NL.po
  12. 11
      partner_statement/i18n/partner_statement.pot
  13. 11
      partner_statement/i18n/pt.po
  14. 14
      partner_statement/i18n/pt_BR.po
  15. 14
      partner_statement/i18n/ro.po
  16. 1
      partner_statement/readme/CONTRIBUTORS.rst
  17. 10
      partner_statement/report/activity_statement.py
  18. 13
      partner_statement/report/outstanding_statement.py
  19. 1
      partner_statement/static/description/index.html
  20. 19
      partner_statement/views/activity_statement.xml
  21. 12
      partner_statement/views/outstanding_statement.xml

1
partner_statement/README.rst

@ -113,6 +113,7 @@ Contributors
* Miquel Raïch <miquel.raich@forgeflow.com>
* Graeme Gellatly <graeme@o4sb.com>
* Lois Rilo <lois.rilo@forgeflow.com>
Maintainers
~~~~~~~~~~~

2
partner_statement/__manifest__.py

@ -3,7 +3,7 @@
{
"name": "Partner Statement",
"version": "13.0.1.0.0",
"version": "13.0.1.1.0",
"category": "Accounting & Finance",
"summary": "OCA Financial Reports",
"author": "ForgeFlow, Odoo Community Association (OCA)",

11
partner_statement/i18n/ca.po

@ -84,6 +84,12 @@ msgstr ""
msgid "<strong>Partner Code:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -375,11 +381,6 @@ msgstr ""
msgid "Payable"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."

11
partner_statement/i18n/de.po

@ -87,6 +87,12 @@ msgstr ""
msgid "<strong>Partner Code:</strong>"
msgstr "<strong>Der Partner hat keine offenen Posten.</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -391,11 +397,6 @@ msgstr ""
msgid "Payable"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
#, fuzzy

20
partner_statement/i18n/es.po

@ -11,15 +11,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-22 16:14+0000\n"
"PO-Revision-Date: 2019-07-23 01:43+0000\n"
"Last-Translator: Josep M <jmyepes@mac.com>\n"
"PO-Revision-Date: 2021-03-16 13:45+0000\n"
"Last-Translator: Ana Suárez <ana.suarez@qubiq.es>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"
"X-Generator: Weblate 4.3.2\n"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
@ -87,6 +87,12 @@ msgstr "<strong>Fecha:</strong>"
msgid "<strong>Partner Code:</strong>"
msgstr "<strong>Código Cliente:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr "<strong>Nombre Empresa:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -382,11 +388,6 @@ msgstr "Estado de los pendientes de la cuenta del cliente"
msgid "Payable"
msgstr "A pagar"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr "Pago"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."
@ -512,6 +513,9 @@ msgstr "en"
msgid "or"
msgstr "o"
#~ msgid "Payment"
#~ msgstr "Pago"
#~ msgid "report.partner_statement.activity_statement"
#~ msgstr "report.partner_statement.activity_statement"

39
partner_statement/i18n/es_AR.po

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-08-12 00:59+0000\n"
"PO-Revision-Date: 2020-11-30 21:36+0000\n"
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
"Language-Team: none\n"
"Language: es_AR\n"
@ -82,6 +82,12 @@ msgstr "<strong>Fecha:</strong>"
msgid "<strong>Partner Code:</strong>"
msgstr "<strong>Código Cliente:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr "<strong>Nombre del Socio:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -196,7 +202,6 @@ msgstr "Creado en"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "Current"
msgstr "Actual"
@ -378,11 +383,6 @@ msgstr "Estado de los pendientes de la cuenta del cliente"
msgid "Payable"
msgstr "A pagar"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr "Pago"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."
@ -443,13 +443,13 @@ msgstr "Proveedor"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_wizard_view
msgid ""
"The activity statement provides details of all activity on"
" a partner's receivables and payables between two "
"The activity statement provides details of all activity "
"on a partner's receivables and 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."
"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."
msgstr ""
"El estado de la cuenta proporciona detalles de toda la actividad "
"en las cuentas por cobrar y por pagar del cliente entre "
@ -463,10 +463,11 @@ msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_wizard_view
msgid ""
"The outstanding statement provides details of all partner's outstanding"
" receivables and 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 partner's "
"outstanding receivables and 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."
msgstr ""
"El pendiente del estado de cuenta proporciona detalles de todas las cuentas "
"pendientes por cobrar y por pagar hasta una fecha en particular. "
@ -476,7 +477,6 @@ msgstr ""
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "Total"
msgstr "Total"
@ -507,3 +507,6 @@ msgstr "en"
#: model_terms:ir.ui.view,arch_db:partner_statement.statement_common_view
msgid "or"
msgstr "o"
#~ msgid "Payment"
#~ msgstr "Pago"

14
partner_statement/i18n/fr.po

@ -86,6 +86,12 @@ msgstr "<strong>Date:</strong>"
msgid "<strong>Partner Code:</strong>"
msgstr "<strong>code du partenaire :</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -382,11 +388,6 @@ msgstr "Relevé des arriérés du partenaire"
msgid "Payable"
msgstr "A payer"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr "Paiement"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."
@ -508,6 +509,9 @@ msgstr "en"
msgid "or"
msgstr "ou"
#~ msgid "Payment"
#~ msgstr "Paiement"
#~ msgid "report.partner_statement.activity_statement"
#~ msgstr "report.customer_activity_statement.statement"

11
partner_statement/i18n/hr_HR.po

@ -86,6 +86,12 @@ msgstr ""
msgid "<strong>Partner Code:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -379,11 +385,6 @@ msgstr ""
msgid "Payable"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."

14
partner_statement/i18n/it.po

@ -85,6 +85,12 @@ msgstr "<strong>Data:</strong>"
msgid "<strong>Partner Code:</strong>"
msgstr "<strong>Codice Partner:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -379,11 +385,6 @@ msgstr "Dovuto del Partner"
msgid "Payable"
msgstr "Pagamenti"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr "Pagamento"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."
@ -496,6 +497,9 @@ msgstr "in"
msgid "or"
msgstr "o"
#~ msgid "Payment"
#~ msgstr "Pagamento"
#~ msgid "report.partner_statement.activity_statement"
#~ msgstr "report.partner_statement.activity_statement"

38
partner_statement/i18n/nl.po

@ -9,74 +9,75 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-28 10:11+0000\n"
"PO-Revision-Date: 2018-02-28 10:11+0000\n"
"Last-Translator: Melroy van den Berg <webmaster1989@gmail.com>, 2018\n"
"PO-Revision-Date: 2020-12-16 02:19+0000\n"
"Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "1 - 30 Days"
msgstr ""
msgstr "1 - 30 Dagen"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "1 Month"
msgstr ""
msgstr "1 maand"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "121 Days +"
msgstr ""
msgstr "121 dagen +"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "2 Months"
msgstr ""
msgstr "2 maanden"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "3 Months"
msgstr ""
msgstr "3 maanden"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "31 - 60 Days"
msgstr ""
msgstr "31 - 60 Dagen"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "4 Months"
msgstr ""
msgstr "4 maanden"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "61 - 90 Days"
msgstr ""
msgstr "61 - 90 Dagen"
#. module: partner_statement
#: code:addons/partner_statement/report/report_statement_common.py:0
#, python-format
msgid "91 - 120 Days"
msgstr ""
msgstr "91 - 120 Dagen"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Date:</strong>"
msgstr ""
msgstr "<strong>Datum:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
@ -84,6 +85,12 @@ msgstr ""
msgid "<strong>Partner Code:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -375,11 +382,6 @@ msgstr ""
msgid "Payable"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."

11
partner_statement/i18n/nl_NL.po

@ -85,6 +85,12 @@ msgstr ""
msgid "<strong>Partner Code:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -378,11 +384,6 @@ msgstr ""
msgid "Payable"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."

11
partner_statement/i18n/partner_statement.pot

@ -79,6 +79,12 @@ msgstr ""
msgid "<strong>Partner Code:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -371,11 +377,6 @@ msgstr ""
msgid "Payable"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."

11
partner_statement/i18n/pt.po

@ -85,6 +85,12 @@ msgstr ""
msgid "<strong>Partner Code:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -378,11 +384,6 @@ msgstr ""
msgid "Payable"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."

14
partner_statement/i18n/pt_BR.po

@ -82,6 +82,12 @@ msgstr "<strong>Data:</strong>"
msgid "<strong>Partner Code:</strong>"
msgstr "<strong>Código do Parceiro:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -376,11 +382,6 @@ msgstr "Extrato de Pendência do Parceiro"
msgid "Payable"
msgstr "Pagável"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr "Pagamento"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."
@ -505,6 +506,9 @@ msgstr "em"
msgid "or"
msgstr "ou"
#~ msgid "Payment"
#~ msgstr "Pagamento"
#~ msgid "report.partner_statement.activity_statement"
#~ msgstr "report.partner_statement.activity_statement"

14
partner_statement/i18n/ro.po

@ -86,6 +86,12 @@ msgstr "<strong>Dată:</strong>"
msgid "<strong>Partner Code:</strong>"
msgstr "<strong>Cod Partener:</strong>"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
msgid "<strong>Partner Name:</strong>"
msgstr ""
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
#: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_statement_document
@ -380,11 +386,6 @@ msgstr "Solduri restante partener"
msgid "Payable"
msgstr "Plătibil"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.activity_statement_document
msgid "Payment"
msgstr "Plată"
#. module: partner_statement
#: model_terms:ir.ui.view,arch_db:partner_statement.res_config_settings_view_form
msgid "Please set defaults under Activity Statements."
@ -507,5 +508,8 @@ msgstr "în"
msgid "or"
msgstr "sau"
#~ msgid "Payment"
#~ msgstr "Plată"
#~ msgid "Date:"
#~ msgstr "Data:"

1
partner_statement/readme/CONTRIBUTORS.rst

@ -1,2 +1,3 @@
* Miquel Raïch <miquel.raich@forgeflow.com>
* Graeme Gellatly <graeme@o4sb.com>
* Lois Rilo <lois.rilo@forgeflow.com>

10
partner_statement/report/activity_statement.py

@ -83,8 +83,11 @@ class ActivityStatement(models.AbstractModel):
THEN l.name
ELSE '/'
END as name,
CASE WHEN (aj.type IN ('sale', 'purchase'))
CASE
WHEN (aj.type IN ('sale', 'purchase')) AND l.name IS NOT NULL
THEN l.ref
WHEN aj.type IN ('sale', 'purchase') AND l.name IS NULL
THEN m.ref
WHEN (aj.type in ('bank', 'cash'))
THEN 'Payment'
ELSE ''
@ -115,8 +118,11 @@ class ActivityStatement(models.AbstractModel):
THEN l.name
ELSE '/'
END,
CASE WHEN (aj.type IN ('sale', 'purchase'))
CASE
WHEN (aj.type IN ('sale', 'purchase')) AND l.name IS NOT NULL
THEN l.ref
WHEN aj.type IN ('sale', 'purchase') AND l.name IS NULL
THEN m.ref
WHEN (aj.type in ('bank', 'cash'))
THEN 'Payment'
ELSE ''

13
partner_statement/report/outstanding_statement.py

@ -17,7 +17,11 @@ class OutstandingStatement(models.AbstractModel):
self._cr.mogrify(
"""
SELECT m.name AS move_id, l.partner_id, l.date, l.name,
l.ref, l.blocked, l.currency_id, l.company_id,
l.blocked, l.currency_id, l.company_id,
CASE WHEN l.ref IS NOT NULL
THEN l.ref
ELSE m.ref
END as ref,
CASE WHEN (l.currency_id is not null AND l.amount_currency > 0.0)
THEN avg(l.amount_currency)
ELSE avg(l.debit)
@ -62,8 +66,11 @@ class OutstandingStatement(models.AbstractModel):
(pd.id IS NULL AND pc.id IS NULL)
) AND l.date <= %(date_end)s AND m.state IN ('posted')
GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name,
l.ref, l.blocked, l.currency_id,
l.balance, l.amount_currency, l.company_id
CASE WHEN l.ref IS NOT NULL
THEN l.ref
ELSE m.ref
END,
l.blocked, l.currency_id, l.balance, l.amount_currency, l.company_id
""",
locals(),
),

1
partner_statement/static/description/index.html

@ -465,6 +465,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<ul class="simple">
<li>Miquel Raïch &lt;<a class="reference external" href="mailto:miquel.raich&#64;forgeflow.com">miquel.raich&#64;forgeflow.com</a>&gt;</li>
<li>Graeme Gellatly &lt;<a class="reference external" href="mailto:graeme&#64;o4sb.com">graeme&#64;o4sb.com</a>&gt;</li>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">

19
partner_statement/views/activity_statement.xml

@ -21,6 +21,10 @@
<strong>Date:</strong>
<p t-esc="d['today']" class="m-0" />
</div>
<div class="col-3 bm-2">
<strong>Partner Name:</strong>
<p t-field="o.name" class="m-0" />
</div>
<div t-if="o.ref" class="col-3 bm-2">
<strong>Partner Code:</strong>
<p t-field="o.ref" class="m-0" />
@ -80,12 +84,15 @@
</td>
<td>
<t t-if="line['name'] != '/'">
<t t-if="not line['ref']">
<t t-if="not line['ref'] and line['name']">
<span t-esc="line['name']" />
</t>
<t t-if="line['ref'] and not line['name']">
<span t-esc="line['ref']" />
</t>
<t t-if="line['ref'] and line['name']">
<t
t-if="line['name'] not in line['ref']"
t-if="line['name'] not in line['ref'] or line['name'] == line['ref']"
>
<span t-esc="line['name']" />
</t>
@ -94,16 +101,10 @@
>
<span t-esc="line['ref']" />
</t>
<t t-if="line['name'] == line['ref']">
<span t-esc="line['name']" />
</t>
</t>
</t>
<t t-if="line['name'] == '/'">
<span
t-if="line['ref'] == 'Payment'"
>Payment</span>
<span t-else="" t-esc="line['ref']" />
<span t-esc="line['ref']" />
</t>
</td>
<td class="amount">

12
partner_statement/views/outstanding_statement.xml

@ -22,6 +22,10 @@
<strong>Date:</strong>
<p t-esc="d['today']" class="m-0" />
</div>
<div class="col-3 bm-2">
<strong>Partner Name:</strong>
<p t-field="o.name" class="m-0" />
</div>
<div t-if="o.ref" class="col-3 bm-2">
<strong>Partner Code:</strong>
<p t-field="o.ref" class="m-0" />
@ -71,9 +75,12 @@
<t t-if="not line['ref']">
<span t-esc="line['name']" />
</t>
<t t-if="line['ref'] and not line['name']">
<span t-esc="line['ref']" />
</t>
<t t-if="line['ref'] and line['name']">
<t
t-if="line['name'] not in line['ref']"
t-if="line['name'] not in line['ref'] or line['name'] == line['ref']"
>
<span t-esc="line['name']" />
</t>
@ -82,9 +89,6 @@
>
<span t-esc="line['ref']" />
</t>
<t t-if="line['ref'] == line['name']">
<span t-esc="line['name']" />
</t>
</t>
</t>
<t t-if="line['name'] == '/'">

Loading…
Cancel
Save