Browse Source

[IMP] customer_activity_statement: display the due date on lines

pull/657/head
sebalix 5 years ago
parent
commit
9379a6bda3
  1. 7
      customer_activity_statement/i18n/ca.po
  2. 9
      customer_activity_statement/i18n/customer_activity_statement.pot
  3. 7
      customer_activity_statement/i18n/de.po
  4. 7
      customer_activity_statement/i18n/es.po
  5. 7
      customer_activity_statement/i18n/fr.po
  6. 7
      customer_activity_statement/i18n/hr_HR.po
  7. 7
      customer_activity_statement/i18n/it.po
  8. 7
      customer_activity_statement/i18n/nl.po
  9. 7
      customer_activity_statement/i18n/nl_NL.po
  10. 7
      customer_activity_statement/i18n/pt.po
  11. 7
      customer_activity_statement/i18n/ro.po
  12. 10
      customer_activity_statement/report/customer_activity_statement.py
  13. 4
      customer_activity_statement/views/statement.xml

7
customer_activity_statement/i18n/ca.po

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n" "Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-26 02:44+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2017-04-26 02:44+0000\n" "PO-Revision-Date: 2017-04-26 02:44+0000\n"
"Last-Translator: Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017\n" "Last-Translator: Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" "Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
@ -163,6 +163,11 @@ msgstr "Nom a mostrar "
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

9
customer_activity_statement/i18n/customer_activity_statement.pot

@ -4,8 +4,10 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Project-Id-Version: Odoo Server 11.0+e\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2020-02-13 14:51+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -155,6 +157,11 @@ msgstr ""
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/de.po

@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 11.0\n" "Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-28 10:11+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2018-08-23 13:16+0000\n" "PO-Revision-Date: 2018-08-23 13:16+0000\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n" "Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
@ -169,6 +169,11 @@ msgstr "Anzeigename"
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "Unterdrücke Partner ohne fällige Posten" msgstr "Unterdrücke Partner ohne fällige Posten"
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/es.po

@ -10,7 +10,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-22 16:14+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2019-02-06 10:50+0000\n" "PO-Revision-Date: 2019-02-06 10:50+0000\n"
"Last-Translator: Marta Vázquez Rodríguez <vazrodmar@gmail.com>\n" "Last-Translator: Marta Vázquez Rodríguez <vazrodmar@gmail.com>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
@ -169,6 +169,11 @@ msgstr "Nombre a mostrar"
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "No mostrar clientes sin saldo pendiente" msgstr "No mostrar clientes sin saldo pendiente"
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/fr.po

@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 11.0\n" "Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-28 10:11+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2018-09-01 08:20+0000\n" "PO-Revision-Date: 2018-09-01 08:20+0000\n"
"Last-Translator: Valaeys Stéphane <svalaeys@fiefmanage.ch>\n" "Last-Translator: Valaeys Stéphane <svalaeys@fiefmanage.ch>\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
@ -170,6 +170,11 @@ msgstr "Nom affiché"
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "Masquer les partenaires sans soldes ouverts" msgstr "Masquer les partenaires sans soldes ouverts"
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr "Date d'échéance"
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/hr_HR.po

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-22 16:14+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2017-12-22 16:14+0000\n" "PO-Revision-Date: 2017-12-22 16:14+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n" "Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" "Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/"
@ -166,6 +166,11 @@ msgstr "Naziv "
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/it.po

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-22 23:13+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2019-07-30 15:43+0000\n" "PO-Revision-Date: 2019-07-30 15:43+0000\n"
"Last-Translator: Sergio Zanchetta <primes2h@gmail.com>\n" "Last-Translator: Sergio Zanchetta <primes2h@gmail.com>\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
@ -165,6 +165,11 @@ msgstr "Nome mostrato"
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/nl.po

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 11.0\n" "Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-28 10:11+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-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" "Last-Translator: Melroy van den Berg <webmaster1989@gmail.com>, 2018\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
@ -163,6 +163,11 @@ msgstr "Weergavenaam"
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/nl_NL.po

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-22 16:14+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2017-12-22 16:14+0000\n" "PO-Revision-Date: 2017-12-22 16:14+0000\n"
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n" "Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n"
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" "Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
@ -165,6 +165,11 @@ msgstr ""
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/pt.po

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-22 16:14+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2017-12-22 16:14+0000\n" "PO-Revision-Date: 2017-12-22 16:14+0000\n"
"Last-Translator: Pedro Castro Silva <inactive+pcs.sossia@transifex.com>, " "Last-Translator: Pedro Castro Silva <inactive+pcs.sossia@transifex.com>, "
"2017\n" "2017\n"
@ -165,6 +165,11 @@ msgstr "Exibir nome"
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

7
customer_activity_statement/i18n/ro.po

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 11.0\n" "Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-16 08:14+0000\n"
"POT-Creation-Date: 2020-02-13 14:51+0000\n"
"PO-Revision-Date: 2018-11-30 09:01+0000\n" "PO-Revision-Date: 2018-11-30 09:01+0000\n"
"Last-Translator: Dorin Hongu <dhongu@gmail.com>\n" "Last-Translator: Dorin Hongu <dhongu@gmail.com>\n"
"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" "Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n"
@ -165,6 +165,11 @@ msgstr "Nume afișat"
msgid "Don't show partners with no due entries" msgid "Don't show partners with no due entries"
msgstr "" msgstr ""
#. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Due date"
msgstr ""
#. module: customer_activity_statement #. module: customer_activity_statement
#: model:ir.ui.view,arch_db:customer_activity_statement.statement_document #: model:ir.ui.view,arch_db:customer_activity_statement.statement_document
msgid "Ending Balance" msgid "Ending Balance"

10
customer_activity_statement/report/customer_activity_statement.py

@ -68,6 +68,7 @@ class CustomerActivityStatement(models.AbstractModel):
return """ return """
SELECT m.name AS move_id, l.partner_id, l.date, l.name, SELECT m.name AS move_id, l.partner_id, l.date, l.name,
l.ref, l.blocked, l.currency_id, l.company_id, l.ref, l.blocked, l.currency_id, l.company_id,
ai.date_due,
CASE WHEN (l.currency_id is not null AND l.amount_currency > 0.0) CASE WHEN (l.currency_id is not null AND l.amount_currency > 0.0)
THEN sum(l.amount_currency) THEN sum(l.amount_currency)
ELSE sum(l.debit) ELSE sum(l.debit)
@ -83,18 +84,19 @@ class CustomerActivityStatement(models.AbstractModel):
FROM account_move_line l FROM account_move_line l
JOIN account_account_type at ON (at.id = l.user_type_id) JOIN account_account_type at ON (at.id = l.user_type_id)
JOIN account_move m ON (l.move_id = m.id) JOIN account_move m ON (l.move_id = m.id)
LEFT JOIN account_invoice ai ON (ai.id = l.invoice_id)
WHERE l.partner_id IN (%s) AND at.type = '%s' WHERE l.partner_id IN (%s) AND at.type = '%s'
AND '%s' <= l.date AND l.date <= '%s' AND '%s' <= l.date AND l.date <= '%s'
GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name, GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name,
l.ref, l.blocked, l.currency_id, l.ref, l.blocked, l.currency_id,
l.amount_currency, l.company_id
l.amount_currency, l.company_id, ai.date_due
""" % (partners, account_type, date_start, date_end) """ % (partners, account_type, date_start, date_end)
def _display_lines_sql_q2(self, company_id): def _display_lines_sql_q2(self, company_id):
return """ return """
SELECT Q1.partner_id, Q1.move_id, Q1.date, Q1.date_maturity, SELECT Q1.partner_id, Q1.move_id, Q1.date, Q1.date_maturity,
Q1.name, Q1.ref, Q1.debit, Q1.credit, Q1.name, Q1.ref, Q1.debit, Q1.credit,
Q1.debit-Q1.credit as amount, Q1.blocked,
Q1.debit-Q1.credit as amount, Q1.blocked, Q1.date_due,
COALESCE(Q1.currency_id, c.currency_id) AS currency_id COALESCE(Q1.currency_id, c.currency_id) AS currency_id
FROM Q1 FROM Q1
JOIN res_company c ON (c.id = Q1.company_id) JOIN res_company c ON (c.id = Q1.company_id)
@ -112,7 +114,7 @@ class CustomerActivityStatement(models.AbstractModel):
# pylint: disable=E8103 # pylint: disable=E8103
self.env.cr.execute("""WITH Q1 AS (%s), Q2 AS (%s) self.env.cr.execute("""WITH Q1 AS (%s), Q2 AS (%s)
SELECT partner_id, move_id, date, date_maturity, name, ref, debit, SELECT partner_id, move_id, date, date_maturity, name, ref, debit,
credit, amount, blocked, currency_id
credit, amount, blocked, currency_id, date_due
FROM Q2 FROM Q2
ORDER BY date, date_maturity, move_id""" % ( ORDER BY date, date_maturity, move_id""" % (
self._display_lines_sql_q1(partners, date_start, date_end, self._display_lines_sql_q1(partners, date_start, date_end,
@ -339,6 +341,8 @@ class CustomerActivityStatement(models.AbstractModel):
line['balance'] = amount_due[partner_id][currency] line['balance'] = amount_due[partner_id][currency]
line['date'] = self._format_date_to_partner_lang( line['date'] = self._format_date_to_partner_lang(
line['date'], partner_id) line['date'], partner_id)
line['date_due'] = self._format_date_to_partner_lang(
line['date_due'], partner_id) if line['date_due'] else ""
line['date_maturity'] = self._format_date_to_partner_lang( line['date_maturity'] = self._format_date_to_partner_lang(
line['date_maturity'], partner_id) line['date_maturity'], partner_id)
lines_to_display[partner_id][currency].append(line) lines_to_display[partner_id][currency].append(line)

4
customer_activity_statement/views/statement.xml

@ -40,6 +40,7 @@
<th >Description</th> <th >Description</th>
<th class="amount" >Amount</th> <th class="amount" >Amount</th>
<th class="amount" >Balance</th> <th class="amount" >Balance</th>
<th>Due date</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -81,6 +82,9 @@
<td class="amount" > <td class="amount" >
<span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': currency}"/> <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
</td> </td>
<td >
<span t-esc="line['date_due']"/>
</td>
</tr> </tr>
<tr> <tr>

Loading…
Cancel
Save