mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Remove post_install and at_install instructions on tests
With that, the suite is run even when we update another module and that not what we expect. Remove the unused mako template Include the fees in the open amount Display the fees column before the open amount, it is more logical since it is invoice amount + fees amount. Update translation of account_credit_control_dunning_fees Update translations, translate words of the report in German
This commit is contained in:
committed by
Akim Juillerat
parent
d94b33f376
commit
bf87bcf2f8
@@ -1,13 +1,13 @@
|
||||
# Translation of OpenERP Server.
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_credit_control_dunning_fees
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-05-07 11:44+0000\n"
|
||||
"PO-Revision-Date: 2014-05-07 11:44+0000\n"
|
||||
"POT-Creation-Date: 2014-12-22 11:00+0000\n"
|
||||
"PO-Revision-Date: 2014-12-22 11:00+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -16,29 +16,34 @@ msgstr ""
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_line
|
||||
#, python-format
|
||||
msgid "A credit control line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_policy_level
|
||||
#, python-format
|
||||
msgid "A credit control policy level"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: field:credit.control.dunning.fees.computer,create_uid:0
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.dunning.fees.computer,create_date:0
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_run
|
||||
#, python-format
|
||||
msgid "Credit control line generator"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.line,dunning_fees_amount:0
|
||||
#: view:credit.control.policy:0
|
||||
#: view:credit.control.policy:account_credit_control_dunning_fees.add_dunning_fees_on_policy
|
||||
#: view:website:account_credit_control.report_credit_control_summary_document
|
||||
msgid "Fees"
|
||||
msgstr ""
|
||||
|
||||
@@ -63,19 +68,27 @@ msgid "Fixed"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: view:credit.control.policy:0
|
||||
#: field:credit.control.dunning.fees.computer,id:0
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.dunning.fees.computer,write_uid:0
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.dunning.fees.computer,write_date:0
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: view:credit.control.policy:account_credit_control_dunning_fees.add_dunning_fees_on_policy
|
||||
msgid "Mail and reporting"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_dunning_fees_computer
|
||||
#, python-format
|
||||
msgid "credit.control.dunning.fees.computer"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.policy.level,dunning_fees_type:0
|
||||
msgid "unknown"
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -77,5 +77,6 @@ msgstr "credit.control.dunning.fees.computer"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.policy.level,dunning_fees_type:0
|
||||
msgid "unknown"
|
||||
msgstr "unbekannt"
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -6,39 +6,45 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-04-16 07:11+0000\n"
|
||||
"POT-Creation-Date: 2014-12-22 11:00+0000\n"
|
||||
"PO-Revision-Date: 2014-04-16 07:11+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_line
|
||||
#, python-format
|
||||
msgid "A credit control line"
|
||||
msgstr "Ligne de relance"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_policy_level
|
||||
#, python-format
|
||||
msgid "A credit control policy level"
|
||||
msgstr "Une politique de relance"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: field:credit.control.dunning.fees.computer,create_uid:0
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.dunning.fees.computer,create_date:0
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_run
|
||||
#, python-format
|
||||
msgid "Credit control line generator"
|
||||
msgstr "Générateur de relance"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.line,dunning_fees_amount:0
|
||||
#: view:credit.control.policy:0
|
||||
#: view:credit.control.policy:account_credit_control_dunning_fees.add_dunning_fees_on_policy
|
||||
#: view:website:account_credit_control.report_credit_control_summary_document
|
||||
msgid "Fees"
|
||||
msgstr "Frais de relance"
|
||||
|
||||
@@ -63,18 +69,26 @@ msgid "Fixed"
|
||||
msgstr "Fixe"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: view:credit.control.policy:0
|
||||
#: field:credit.control.dunning.fees.computer,id:0
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.dunning.fees.computer,write_uid:0
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.dunning.fees.computer,write_date:0
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: view:credit.control.policy:account_credit_control_dunning_fees.add_dunning_fees_on_policy
|
||||
msgid "Mail and reporting"
|
||||
msgstr "Lettres et e-mails"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: code:_description:0
|
||||
#: model:ir.model,name:account_credit_control_dunning_fees.model_credit_control_dunning_fees_computer
|
||||
#, python-format
|
||||
msgid "credit.control.dunning.fees.computer"
|
||||
msgstr "credit.control.dunning.fees.computer"
|
||||
|
||||
#. module: account_credit_control_dunning_fees
|
||||
#: field:credit.control.policy.level,dunning_fees_type:0
|
||||
msgid "unknown"
|
||||
msgstr "inconnu"
|
||||
msgid "Type"
|
||||
msgstr "Type"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import models, fields
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class CreditControlLine(models.Model):
|
||||
@@ -27,3 +27,10 @@ class CreditControlLine(models.Model):
|
||||
_inherit = "credit.control.line"
|
||||
|
||||
dunning_fees_amount = fields.Float(string='Fees')
|
||||
balance_due_total = fields.Float(string='Balance due with fees',
|
||||
compute='compute_balance_due')
|
||||
|
||||
@api.one
|
||||
@api.depends('dunning_fees_amount', 'balance_due')
|
||||
def compute_balance_due(self):
|
||||
self.balance_due_total = self.balance_due + self.dunning_fees_amount
|
||||
|
||||
@@ -1,246 +0,0 @@
|
||||
## -*- coding: utf-8 -*-
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
${css}
|
||||
body {
|
||||
font-family: helvetica;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.custom_text {
|
||||
font-family: helvetica;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
table {
|
||||
font-family: helvetica;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-left: 0px;
|
||||
text-align: left;
|
||||
width: 300px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.basic_table{
|
||||
text-align: center;
|
||||
border: 1px solid lightGrey;
|
||||
border-collapse: collapse;
|
||||
font-family: helvetica;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.basic_table th {
|
||||
border: 1px solid lightGrey;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.basic_table td {
|
||||
border: 1px solid lightGrey;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.list_table {
|
||||
border-color: black;
|
||||
text-align: center;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.list_table td {
|
||||
border-color: gray;
|
||||
border-top: 1px solid gray;
|
||||
text-align: left;
|
||||
font-size: 12px;
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
padding-top: 3px;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
|
||||
.list_table th {
|
||||
border-bottom: 2px solid black;
|
||||
text-align: left;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
padding-right: 3px
|
||||
padding-left: 3px
|
||||
}
|
||||
|
||||
.list_table thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
.address table {
|
||||
font-size: 11px;
|
||||
border-collapse: collapse;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.address .shipping {
|
||||
|
||||
}
|
||||
|
||||
.address .invoice {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.address .recipient {
|
||||
font-size: 13px;
|
||||
margin-right: 120px;
|
||||
margin-left: 350px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
table .address_title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.address td.name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td.amount, th.amount {
|
||||
text-align: right;
|
||||
padding-right:2px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
tr.line .note {
|
||||
border-style: none;
|
||||
font-size: 9px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
tr.line {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
%for comm in objects :
|
||||
<% setLang(comm.get_contact_address().lang) %>
|
||||
<div class="address">
|
||||
<table class="recipient">
|
||||
<%
|
||||
add = comm.get_contact_address()
|
||||
%>
|
||||
%if comm.partner_id.id == add.id:
|
||||
<tr><td class="name">${comm.partner_id.title and comm.partner_id.title.name or ''} ${comm.partner_id.name }</td></tr>
|
||||
<% address_lines = comm.partner_id.contact_address.split("\n") %>
|
||||
|
||||
%else:
|
||||
<tr><td class="name">${comm.partner_id.name or ''}</td></tr>
|
||||
<tr><td>${add.title and add.title.name or ''} ${add.name}</td></tr>
|
||||
<% address_lines = add.contact_address.split("\n")[1:] %>
|
||||
%endif
|
||||
%for part in address_lines:
|
||||
%if part:
|
||||
<tr><td>${part}</td></tr>
|
||||
%endif
|
||||
%endfor
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
<h3 style="clear: both; padding-top: 20px;">
|
||||
${_('Reminder')}: ${comm.current_policy_level.name or '' }
|
||||
</h3>
|
||||
|
||||
<p>${_('Dear')},</p>
|
||||
<p class="custom_text" width="95%">${comm.current_policy_level.custom_text.replace('\n', '<br />')}</p>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<p><b>${_('Summary')}<br/></b></p>
|
||||
<table class="basic_table" style="width: 100%;">
|
||||
<tr>
|
||||
<th width="200">${_('Invoice number')}</th>
|
||||
<th>${_('Invoice date')}</th>
|
||||
<th>${_('Date due')}</th>
|
||||
<th>${_('Invoiced amount')}</th>
|
||||
<th>${_('Open amount')}</th>
|
||||
<th>${_('Fees')}</th>
|
||||
<th>${_('Currency')}</th>
|
||||
|
||||
</tr>
|
||||
%for line in comm.credit_control_line_ids:
|
||||
<tr>
|
||||
%if line.invoice_id:
|
||||
<td width="200">${line.invoice_id.number}
|
||||
%if line.invoice_id.name:
|
||||
<br/>
|
||||
${line.invoice_id.name}
|
||||
%endif
|
||||
</td>
|
||||
%else:
|
||||
<td width="200">${line.move_line_id.name}</td>
|
||||
%endif
|
||||
<td class="date">${line.date_entry}</td>
|
||||
<td class="date">${line.date_due}</td>
|
||||
<td class="amount">${line.amount_due}</td>
|
||||
<td class="amount">${line.balance_due}</td>
|
||||
<td class="amount">${line.dunning_fees_amount}</td>
|
||||
<td class="amount">${line.currency_id.name or comm.company_id.currency_id.name}</td>
|
||||
</tr>
|
||||
%endfor
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<%doc>
|
||||
<!-- uncomment to have info after summary -->
|
||||
<p>${_('If you have any question, do not hesitate to contact us.')}</p>
|
||||
|
||||
<p>${comm.user_id.name} ${comm.user_id.email and '<%s>'%(comm.user_id.email) or ''}<br/>
|
||||
${comm.company_id.name}<br/>
|
||||
% if comm.company_id.street:
|
||||
${comm.company_id.street or ''}<br/>
|
||||
|
||||
% endif
|
||||
|
||||
% if comm.company_id.street2:
|
||||
${comm.company_id.street2}<br/>
|
||||
% endif
|
||||
% if comm.company_id.city or comm.company_id.zip:
|
||||
${comm.company_id.zip or ''} ${comm.company_id.city or ''}<br/>
|
||||
% endif
|
||||
% if comm.company_id.country_id:
|
||||
${comm.company_id.state_id and ('%s, ' % comm.company_id.state_id.name) or ''} ${comm.company_id.country_id.name or ''}<br/>
|
||||
% endif
|
||||
% if comm.company_id.phone:
|
||||
Phone: ${comm.company_id.phone}<br/>
|
||||
% endif
|
||||
% if comm.company_id.website:
|
||||
${comm.company_id.website or ''}<br/>
|
||||
% endif
|
||||
</%doc>
|
||||
|
||||
<p style="page-break-after:always"></p>
|
||||
%endfor
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,19 +3,19 @@
|
||||
<data>
|
||||
<template id="report_credit_control_summary_document_fees"
|
||||
inherit_id="account_credit_control.report_credit_control_summary_document">
|
||||
<xpath expr="//table[@id='summary_table']/thead/tr/th[last()]" position="after">
|
||||
<xpath expr="//table[@id='summary_table']/thead/tr/th[last()]" position="before">
|
||||
<th class="text-right">Fees</th>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='l.balance_due']" position="replace">
|
||||
<span t-field="l.balance_due"/>
|
||||
</xpath>
|
||||
<xpath expr="//table[@id='summary_table']/tbody/tr/td[last()]" position="after">
|
||||
<xpath expr="//table[@id='summary_table']/tbody/tr/td[last()]" position="before">
|
||||
<td class="text-right">
|
||||
<span t-field="l.dunning_fees_amount"
|
||||
t-field-options='{"widget": "monetary",
|
||||
"display_currency": "l.currency_id or l.company_id.currency_id"}'/>
|
||||
<span t-field="l.dunning_fees_amount"/>
|
||||
</td>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='l.balance_due']" position="replace">
|
||||
<span t-field="l.balance_due_total"
|
||||
t-field-options='{"widget": "monetary",
|
||||
"display_currency": "l.currency_id or l.company_id.currency_id"}'/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
from openerp.tests import common
|
||||
|
||||
|
||||
@common.at_install(True)
|
||||
@common.post_install(True)
|
||||
class FixedFeesTester(common.TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user