Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ ENV/
# mypy
.mypy_cache/

# vscode
.vscode/
Empty file added account_followup/README.rst
Empty file.
5 changes: 5 additions & 0 deletions account_followup/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2018 Access Bookings Ltd (https://accessbookings.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
from . import wizard
from . import report
31 changes: 31 additions & 0 deletions account_followup/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright 2018 Access Bookings Ltd (https://accessbookings.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Payment Follow-up Management",
"version": "11.0.1.0.0",
"category": "Accounting & Finance",
"website": "https://accessbookings.com",
"author": "Kinner Vachhani (Access Bookings), \
Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
'account', 'mail'
],
"data": [
"security/account_followup_security.xml",
"security/ir.model.access.csv",
"data/account_followup.xml",
"views/account_followup_customers.xml",
"wizard/account_followup_print.xml",
"report/account_followup_report.xml",

],
"demo": [
"demo/account_followup.xml"
],
"qweb": [
]
}
219 changes: 219 additions & 0 deletions account_followup/data/account_followup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
<?xml version="1.0"?>
<odoo>
<!-- Mail template is done in a NOUPDATE block
so users can freely customize/delete them -->
<data noupdate="1">
<!--Mail template level 0-->
<record id="email_template_account_followup_level0" model="mail.template">
<field name="name">First polite payment follow-up reminder email</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">

<p>Dear ${object.name},</p>
<p>
Exception made if there was a mistake of ours, it seems that the following amount stays unpaid. Please, take
appropriate measures in order to carry out this payment in the next 8 days.

Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to
contact our accounting department.

</p>
<br/>
Best Regards,
<br/>
<br/>
${user.name}

<br/>
<br/>


<br/>

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

<!--Mail template level 1 -->
<record id="email_template_account_followup_level1" model="mail.template">
<field name="name">A bit urging second payment follow-up reminder email</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">

<p>Dear ${object.name},</p>
<p>
We are disappointed to see that despite sending a reminder, that your account is now seriously overdue.
It is essential that immediate payment is made, otherwise we will have to consider placing a stop on your account
which means that we will no longer be able to supply your company with (goods/services).
Please, take appropriate measures in order to carry out this payment in the next 8 days.
If there is a problem with paying invoice that we are not aware of, do not hesitate to contact our accounting
department. so that we can resolve the matter quickly.
Details of due payments is printed below.
</p>
<br/>
Best Regards,

<br/>
<br/>
${user.name}

<br/>
<br/>

<br/>

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

<!--Mail template level 2 -->
<record id="email_template_account_followup_level2" model="mail.template">
<field name="name">Urging payment follow-up reminder email</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">

<p>Dear ${object.name},</p>
<p>
Despite several reminders, your account is still not settled.
Unless full payment is made in next 8 days, legal action for the recovery of the debt will be taken without
further notice.
I trust that this action will prove unnecessary and details of due payments is printed below.
In case of any queries concerning this matter, do not hesitate to contact our accounting department.
</p>
<br/>
Best Regards,
<br/>
<br/>
${user.name}
<br/>
<br/>


<br/>

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

<!-- Default follow up message -->
<record id="email_template_account_followup_default" model="mail.template">
<field name="name">Default payment follow-up reminder e-mail</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">

<p>Dear ${object.name},</p>
<p>
Exception made if there was a mistake of ours, it seems that the following amount stays unpaid. Please, take
appropriate measures in order to carry out this payment in the next 8 days.
Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to
contact our accounting department.
</p>
<br/>
Best Regards,
<br/>
<br/>
${user.name}
<br/>
<br/>


<br/>
</div>
]]></field>
</record>

<record id="demo_followup1" model="account_followup.followup" forcecreate="False">
<field name="company_id" ref="base.main_company"/>
</record>

<record id="demo_followup_line1" model="account_followup.followup.line" forcecreate="False">
<field name="name">Send first reminder email</field>
<field name="sequence">0</field>
<field name="delay">15</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="send_email">True</field>
<field name="description">
Dear %(partner_name)s,

Exception made if there was a mistake of ours, it seems that the following amount stays unpaid. Please, take appropriate measures in order to carry out this payment in the next 8 days.

Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to contact our accounting department.

Best Regards,
</field>
<field name="email_template_id" ref="email_template_account_followup_level0"/>
</record>

<record id="demo_followup_line2" model="account_followup.followup.line" forcecreate="False">
<field name="name">Send reminder letter and email</field>
<field name="sequence">1</field>
<field name="delay">30</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="email_template_id" ref="email_template_account_followup_level1"/>
<field name="send_email">True</field>
<field name="send_letter">True</field>
<field name="description">
Dear %(partner_name)s,

We are disappointed to see that despite sending a reminder, that your account is now seriously overdue.

It is essential that immediate payment is made, otherwise we will have to consider placing a stop on your account which means that we will no longer be able to supply your company with (goods/services).
Please, take appropriate measures in order to carry out this payment in the next 8 days.

If there is a problem with paying invoice that we are not aware of, do not hesitate to contact our accounting department, so that we can resolve the matter quickly.

Details of due payments is printed below.

Best Regards,
</field>
</record>

<record id="demo_followup_line3" model="account_followup.followup.line" forcecreate="False">
<field name="name">Call the customer on the phone</field>
<field name="sequence">3</field>
<field name="delay">40</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="email_template_id" ref="email_template_account_followup_level2"/>
<field eval="False" name="send_email"/>
<field name="manual_action">True</field>
<field name="manual_action_note">Call the customer on the phone! </field>
<field name="description">
Dear %(partner_name)s,

Despite several reminders, your account is still not settled.

Unless full payment is made in next 8 days, then legal action for the recovery of the debt will be taken without further notice.

I trust that this action will prove unnecessary and details of due payments is printed below.

In case of any queries concerning this matter, do not hesitate to contact our accounting department.

Best Regards,
</field>
</record>
</data>
</odoo>
46 changes: 46 additions & 0 deletions account_followup/demo/account_followup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record id="demo_followup_line4" model="account_followup.followup.line">
<field name="name">Urging reminder email</field>
<field name="sequence">4</field>
<field name="delay">50</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="send_email">True</field>
<field name="email_template_id" ref="email_template_account_followup_level2"/>
<field name="description">
Dear %(partner_name)s,

Despite several reminders, your account is still not settled.

Unless full payment is made in next 8 days, then legal action for the recovery of the debt will be taken without further notice.

I trust that this action will prove unnecessary and details of due payments is printed below.

In case of any queries concerning this matter, do not hesitate to contact our accounting department.

Best Regards,
</field>
</record>
<record id="demo_followup_line5" model="account_followup.followup.line">
<field name="name">Urging reminder letter</field>
<field name="sequence">5</field>
<field name="delay">60</field>
<field name="followup_id" ref="demo_followup1"/>
<field eval="False" name="send_email"/>
<field name="send_letter">True</field>
<field name="email_template_id" ref="email_template_account_followup_level2"/>
<field name="description">
Dear %(partner_name)s,

Despite several reminders, your account is still not settled.

Unless full payment is made in next 8 days, then legal action for the recovery of the debt will be taken without further notice.

I trust that this action will prove unnecessary and details of due payments is printed below.

In case of any queries concerning this matter, do not hesitate to contact our accounting department.

Best Regards,
</field>
</record>
</odoo>
4 changes: 4 additions & 0 deletions account_followup/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright 2018 Access Bookings Ltd (https://accessbookings.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import account_followup
Loading