Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] account_invoice_overdue_reminder: Migration to 17.0 #372

Open
wants to merge 57 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f792437
Add module account_invoice_overdue_reminder
alexis-via Jun 15, 2020
7257ee3
Switch row and col in pivot view of overdue reminders
alexis-via Jun 19, 2020
7dd1183
overdue_reminder: explicit error when email is missing
alexis-via Jun 22, 2020
6265965
[FIX] overdue_reminder: don't link mail.template to a wizard record !
alexis-via Sep 11, 2020
4340b50
overdue_reminder: use form_view_ref to display customer invoice form …
alexis-via Sep 11, 2020
d08e9f1
overdue_reminder: Order overdue invoices starting from oldest (NOTE: …
alexis-via Nov 12, 2020
c38b646
overdue_reminder: link mails to res.partner
alexis-via Nov 12, 2020
0b1bf1c
Add migration script for my previous commit
alexis-via Nov 13, 2020
518fe5b
Improve string and fix translation of selection field
Nov 24, 2020
87e85f9
Fix translation of selection field
Nov 24, 2020
f7420c8
[MIG] account_invoice_overdue_reminder to v14.0
alexis-via Feb 11, 2021
f37a98b
account_invoice_overdue_reminder: black, isort and other reformatting
alexis-via Feb 11, 2021
a81298a
[UPD] Update account_invoice_overdue_reminder.pot
oca-travis Jul 29, 2021
b85e862
[UPD] README.rst
OCA-git-bot Jul 29, 2021
cf65592
[ADD] icon.png
OCA-git-bot Jul 29, 2021
ad67cab
Added translation using Weblate (Italian)
stevech091 Aug 23, 2021
8098bfc
[IMP] account_invoice_overdue_reminder: yellow alter banner on overdu…
alexis-via Aug 28, 2021
3cc8529
[UPD] Update account_invoice_overdue_reminder.pot
oca-travis Sep 10, 2021
c587cdf
account_invoice_overdue_reminder 14.0.1.1.0
OCA-git-bot Sep 10, 2021
9545347
Update translation files
oca-transbot Sep 10, 2021
8a0bd1b
[FIX] account_invoice_overdue_reminder: bad string
alexis-via Feb 2, 2022
13ca00e
[UPD] Update account_invoice_overdue_reminder.pot
oca-travis Feb 3, 2022
45bba23
Update translation files
oca-transbot Feb 3, 2022
8ead156
Added translation using Weblate (Catalan)
extrememicro Feb 16, 2022
8b21f21
Added translation using Weblate (French)
May 5, 2022
62abdfe
Translated using Weblate (French)
May 5, 2022
e3951e0
[IMP]account_invoice_overdue_reminder: Set default values
GuillemCForgeFlow Jul 27, 2022
cd5f249
account_invoice_overdue_reminder 14.0.1.1.1
OCA-git-bot Aug 31, 2022
40696a7
[FIX] account_invoice_overdue_reminder: prevent error when no overdue…
JordiMForgeFlow Sep 9, 2022
6ab3f15
[IMP] account_invoice_overdue_reminder: decouple mail validation and …
JordiMForgeFlow Sep 5, 2022
06663f3
[IMP] account_invoice_overdue_reminder: black, isort, prettier
JasminSForgeFlow Sep 8, 2022
4cc0826
[MIG] account_invoice_overdue_reminder: Migration to 15.0
JasminSForgeFlow Sep 12, 2022
eb3a042
[IMP] account_invoice_overdue_reminder: add method to get reminder te…
JudithAforgeFlow Jun 14, 2022
9b5c6d7
[IMP] account_invoice_overdue_reminder: add the method to get the att…
JudithAforgeFlow Jun 20, 2022
38e3520
[UPD] Update account_invoice_overdue_reminder.pot
Oct 17, 2022
d565219
[UPD] README.rst
OCA-git-bot Oct 17, 2022
4da027a
Update translation files
weblate Oct 17, 2022
3d84431
[MIG] account_invoice_overdue_reminder to v16
alexis-via Feb 28, 2023
aab4a19
account_invoice_overdue_reminder: allow to remove invoices in the wizard
alexis-via Apr 27, 2023
99bb036
account_invoice_overdue_reminder 16.0.1.1.0
OCA-git-bot May 4, 2023
6bb10e3
Added translation using Weblate (Dutch)
Jan-Onestein Aug 29, 2023
ed24232
Added translation using Weblate (Portuguese)
pedrocs-exo Sep 28, 2023
55825c6
[IMP] account_invoice_overdue_reminder: hide button if reminded
astirpe Oct 16, 2023
ac2c930
[FIX] account_invoice_overdue_reminder: TypeError: '>' not supported …
astirpe Oct 17, 2023
3d41372
[16.0] account_invoice_overdue_reminder: remind partially paid invoices
astirpe Oct 19, 2023
027f41e
[IMP] account_invoice_overdue_reminder: code review
astirpe Nov 16, 2023
b4b4aac
[BOT] post-merge updates
OCA-git-bot Nov 24, 2023
319e8ba
[IMP] account_invoice_overdue_reminder: Add credit notes to overdue e…
carmenbianca Oct 27, 2022
4de7a12
[IMP] account_invoice_overdue_reminder: Remove unreconciled button
carmenbianca Oct 28, 2022
54ea3e3
[IMP] account_invoice_overdue_reminder: Change log
carmenbianca Oct 28, 2022
9eb3651
[FIX] account_invoice_overdue_reminder: Widen restraint to credit notes
carmenbianca Nov 30, 2022
24774e9
[BOT] post-merge updates
OCA-git-bot Dec 11, 2023
2bb8580
[BOT] post-merge updates
OCA-git-bot Dec 11, 2023
d58167f
[BOT] post-merge updates
OCA-git-bot Dec 28, 2023
0a3801f
Added translation using Weblate (German)
NICO-SOLUTIONS Mar 24, 2024
0f058f5
[IMP] account_invoice_overdue_reminder: pre-commit auto fixes
NICO-SOLUTIONS Mar 25, 2024
f03fcc9
[MIG] account_invoice_overdue_reminder: Migration to 17.0
NICO-SOLUTIONS Mar 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions account_invoice_overdue_reminder/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
========================
Overdue Invoice Reminder
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:035454490eecf4385ca96941aa0384e312617ac3464e9921721b26337032d866
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcredit--control-lightgray.png?logo=github
:target: https://github.com/OCA/credit-control/tree/17.0/account_invoice_overdue_reminder
:alt: OCA/credit-control
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/credit-control-17-0/credit-control-17-0-account_invoice_overdue_reminder
: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/credit-control&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This Odoo module is designed to send overdue invoice reminders to
customers. It handles reminders by e-mail, letter and phone.

This module is an alternative to the OCA module
*account_credit_control*. Why another module for invoice reminders ?
Because the module *account_credit_control* is quite complex (we
experienced that some users find it too complex and eventually stop
using it) and its interface is designed to send massive volume of
reminders.

This module has been designed from the start with the following
priorities:

- **keep control**: you must keep tight control on the overdue invoice
reminders that you send. Overdue invoice reminders are part of the
communication with your customers, and this is very important to keep
a good relation with your customers.
- **usability**: the module is easy to configure and easy to use.
- **no accounting skills needed**: the module can be used by users
without accounting skills. It can even be used by salesman!
- **multi-currency**: if you invoice your customer in another currency
that your company currency, the invoice reminders only mention the
currency of the invoices. And if you invoice a customer with
different currencies, the reminder is clear and easy-to-understand by
your customer, with a total residual per currency.
- **multi-channel**: supports overdue invoice reminders by e-mail
(default), phone and letter.
- **simplicity**: for the developers, the code is small and easy to
understand.

The specifications written before starting the development of this
module are written in this
`document <https://docs.google.com/document/d/1JIIAP5QsItbJ1zLiaGHuR0RAQplEGv3diOl-d4mS__I/edit?usp=sharing>`__
(in French).

The module has one important limitation: it sends a reminder for an
invoice when it has past it's *Due Date* (which is in fact the *Final
Due Date*): if the invoice has a payment term with several lines, it
won't send a reminder before the last term is overdue.

An overdue reminder for a customer always include all the overdue
invoices of that customer.

The module supports a clever per-invoice reminder counter mechanism:

- the reminder counter is a property of an invoice,
- the reminder counter of each overdue invoice is incremented when
sending a reminder by email or by post. It is not incremented for
reminders by phone.
- in an email or a letter, the subject will be *Overdue invoice
reminder n°N* where N is the maximum value of the counter of the
overdue invoices plus one.

There are two user interfaces to send reminders:

- the **one-by-one** interface, which displays one screen for each
customer that has overdue invoices, one after the other. You should
use this interface when you have a reasonable volume of reminders to
send (less than 100 overdue reminders for example). It gives you a
tight control on the reminders and the possibility to easily and
rapidly customize the reminder e-mails.
- the **mass** interface, which displays a list view of all customers
that have overdue invoices, and you can process several reminders at
the same time (via the *Actions* menu).

This video tutorial in English will show you how to configure and use
the module: `Youtube
link <https://www.youtube.com/watch?v=MaOoVAi7Tc0>`__.

**Table of contents**

.. contents::
:local:

Usage
=====

Of course, before sending invoice reminders, you must import your bank
statements and process them, so that you are up-to-date on customer
payments.

Then, go to the menu *Invoicing > Customers > Overdue Invoice Remind*:
you will get the start screen where you can:

- filter the customers that you want to remind (filter by customer or
by salesman),
- check that your bank journals are up-to-date,
- choose between the *one-by-one* and *mass* interfaces,
- customize some parameters.

Then follow the process until the end.

You can also start the invoice reminder wizard via the button *Overdue
Reminder* on an overdue invoice.

Changelog
=========

16.0.1.2.0 (2023-12-11)
-----------------------

**Features**

- Credit notes have been added to the e-mail summary that are sent to
the customer. They are marked in a different colour.

Furthermore, the button toggle to allow to send a reminder with
unreconciled payments has been removed. The warning remains.
(`#226 <https://github.com/OCA/credit-control/issues/226>`__)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/credit-control/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/credit-control/issues/new?body=module:%20account_invoice_overdue_reminder%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.

Credits
=======

Authors
-------

* Akretion

Contributors
------------

- Alexis de Lattre <[email protected]>
- Nils Coenen <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/credit-control <https://github.com/OCA/credit-control/tree/17.0/account_invoice_overdue_reminder>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_invoice_overdue_reminder/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import wizard
from .hooks import pre_init_hook
33 changes: 33 additions & 0 deletions account_invoice_overdue_reminder/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2020-2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Overdue Invoice Reminder",
"version": "17.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Simple mail/letter/phone overdue customer invoice reminder ",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/credit-control",
"depends": ["account"],
"data": [
"security/ir.model.access.csv",
"security/ir_rule.xml",
"wizard/overdue_reminder_wizard_view.xml",
"views/res_partner.xml",
"views/report.xml",
"views/report_overdue_reminder.xml",
"views/account_move.xml",
"views/account_invoice_overdue_reminder.xml",
"views/overdue_reminder_result.xml",
"views/overdue_reminder_action.xml",
"wizard/res_config_settings_view.xml",
"data/overdue_reminder_result.xml",
"data/mail_template.xml",
],
"installable": True,
"application": False,
"pre_init_hook": "pre_init_hook",
}
167 changes: 167 additions & 0 deletions account_invoice_overdue_reminder/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2020-2021 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">

<record id="overdue_invoice_reminder_mail_template" model="mail.template">
<field name="name">Overdue Invoice Reminder</field>
<field
name="model_id"
ref="account_invoice_overdue_reminder.model_overdue_reminder_step"
/>
<field name="auto_delete" eval="False" />
<field name="lang">{{object.partner_id.lang}}</field>
<field
name="email_from"
>{{object.user_id.email or object.company_id.email}}</field>
<field name="email_to">{{object.partner_id.email}}</field>
<field
name="subject"
>{{object.company_id.name}} - Overdue invoice reminder n°{{object.counter}}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px; font-size: 13px;">
<p>Dear customer,</p>
<p>According to our books, the following invoices are overdue:</p>

<table
style="border-spacing: 0; border-collapse: collapse; width: 100%; text-align: center;"
>
<tr>
<th
style="padding: 5px; border: 1px solid black;"
>Invoice Number</th>
<th
style="padding: 5px; border: 1px solid black;"
>Invoice Date</th>
<th
style="padding: 5px; border: 1px solid black;"
>Payment Terms</th>
<th style="padding: 5px; border: 1px solid black;">Due Date</th>
<th
style="padding: 5px; border: 1px solid black;"
>Order Ref.</th>
<th style="padding: 5px; border: 1px solid black;">Type</th>
<th
style="padding: 5px; border: 1px solid black;"
>Total Untaxed</th>
<th style="padding: 5px; border: 1px solid black;">Total</th>
<th style="padding: 5px; border: 1px solid black;">Residual</th>
<th
style="padding: 5px; border: 1px solid black;"
>Past Reminders</th>
</tr>
<t
t-foreach="object.invoice_ids.sorted(key='invoice_date')"
t-as="inv"
>
<tr
style="background-color:
% if inv.move_type == 'out_refund':
LightGray
% endif
"
>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="inv.name" />
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="inv.invoice_date" />
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="inv.invoice_payment_term_id.name or ''" />
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="inv.invoice_date_due" />
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="inv.ref or ''" />
</td>
<td style="padding: 5px; border: 1px solid black;"><t
t-out="dict(inv.fields_get(allfields=['move_type'])['move_type']['selection'])[inv.move_type]"
/></td>
<td
style="padding: 5px; border: 1px solid black; text-align: right;"
>
<t
t-out="format_amount(inv.amount_untaxed * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)"
/>
</td>
<td
style="padding: 5px; border: 1px solid black; text-align: right;"
>
<t
t-out="format_amount(inv.amount_total * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)"
/>
</td>
<td
style="padding: 5px; border: 1px solid black; text-align: right;"
>
<t
t-out="format_amount(inv.amount_residual * (inv.move_type == 'out_refund' and -1 or 1), inv.currency_id)"
/>
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="inv.overdue_reminder_counter" />
</td>
</tr>
</t>
<t t-foreach="object.total_residual()" t-as="total_residual">
<tr>
<td />
<td />
<td />
<td />
<td />
<td />
<td
colspan="2"
style="padding: 5px; border: 1px solid black; font-weight: bold; text-align: right;"
>
Total
Residual in
<t t-out="total_residual[0].name" />:
</td>
<td
style="padding: 5px; border: 1px solid black; font-weight: bold; text-align: right;"
>
<t
t-out="format_amount(total_residual[1], total_residual[0])"
/>
</td>
<td />
</tr>
</t>
</table>

<p
>If you made a payment for these invoices a few days ago, please ignore this email.</p>

<t t-if="object.company_id.overdue_reminder_attach_invoice">
<p>You will find enclosed the overdue invoices.</p>
</t>

<t t-if="object.counter > 2">
<p
>Despite several reminders, we are disappointed to see that these overdue invoices are still
unpaid.
In order to avoid legal proceedings, we urge you to paid these overdue invoices in the next
days.
</p>
</t>

<p>Regards,</p>

<t t-if="user.signature">
<p>
<t t-out="user.signature or ''" />
</p>
</t>

</div>
</field>
</record>

</odoo>
Loading
Loading