Skip to content
Draft
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
140 changes: 140 additions & 0 deletions hr_expense_advance_overdue_reminder/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
=================================
Employee Advance Overdue Reminder
=================================

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

.. |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%2Fhr--expense-lightgray.png?logo=github
:target: https://github.com/OCA/hr-expense/tree/18.0/hr_expense_advance_overdue_reminder
:alt: OCA/hr-expense
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_advance_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/hr-expense&target_branch=18.0
:alt: Try me on Runboat

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

This module allow company to send overdue advance reminders to the
employee. it sends a reminder for an expense advance when it has past
it's *Due Date* An overdue reminder for a employee always include all
the overdue advance an amount of that employee.

The module supports a clever expense reimbursement reminder counter
mechanism:

- the reminder counter is a property of an expense advance,
- the reminder counter of each overdue expense advance is incremented
every time when you sending a reminder by email / letter.
- in an email template, you can configure at *Settings > Technical >
Email > Email Templates > Name 'Advance: Overdue Reminder'*

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to:

1. Go to *Expenses > Configuration > Reminder Definition*.
2. Set reminder definition.
3. Specify the time period for the set due date clearing advance. This
field is Terms Due Date has default 30 days and it will compute due
date by today + Terms Due Date, when you Post Journal Entries on
expense sheet.
4. Specify other fields (if any)

Usage
=====

**This module has the following steps to use:**

1. Create an advance document and submit it to manager for approval.
2. Once approved, post the journal entries.
3. If the due date is not manually selected, it will be auto-generated
from the reminder settings.
4. Register Payment.

**To check for overdue and uncleared advances:**

1. Go to Expenses > Expense Reports > Reports to Overdue.
2. Select an advance that needs a reminder.
3. Click on Action > Overdue Reminder.
4. Verify the information and click the "Start" button to create an
overdue reminder.
5. It will generate a reminder only for the selected document.

**To send a reminder to an employee:**

1. Go to Expenses > Employee Overdue > Overdue Reminder
2. Select the document for which you need to send a reminder to the
employee.
3. Verify the information and Send or print the reminder to the
employee.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-expense/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/hr-expense/issues/new?body=module:%20hr_expense_advance_overdue_reminder%0Aversion:%2018.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
-------

* Ecosoft

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

- `Ecosoft <http://ecosoft.co.th>`__:

- Saran Lim. <saranl@ecosoft.co.th>
- Pimolnat Suntian <pimolnats@ecosoft.co.th>

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-Saran440| image:: https://github.com/Saran440.png?size=40px
:target: https://github.com/Saran440
:alt: Saran440

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

|maintainer-Saran440|

This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/18.0/hr_expense_advance_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 hr_expense_advance_overdue_reminder/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
25 changes: 25 additions & 0 deletions hr_expense_advance_overdue_reminder/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2023 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Employee Advance Overdue Reminder",
"version": "18.0.1.0.0",
"category": "Human Resources",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"summary": "Simple mail overdue employee advance reminder",
"website": "https://github.com/OCA/hr-expense",
"depends": [
"hr_expense_advance_clearing_sequence",
],
"data": [
"security/ir.model.access.csv",
"data/mail_template.xml",
"data/sequence_data.xml",
"views/reminder_definition_view.xml",
"views/hr_expense_views.xml",
"views/hr_advance_overdue_view.xml",
],
"installable": True,
"maintainers": ["Saran440"],
}
100 changes: 100 additions & 0 deletions hr_expense_advance_overdue_reminder/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="email_template_overdue_reminder" model="mail.template">
<field name="name">Advance: Overdue Reminder</field>
<field
name="model_id"
ref="hr_expense_advance_overdue_reminder.model_hr_advance_overdue_reminder"
/>
<field
name="subject"
>{{ object.company_id.name }} - Overdue advance reminder {{ object.name or 'n/a' }}</field>
<field
name="email_from"
>{{ (object.user_id.email_formatted or user.email_formatted or '') }}</field>
<field name="email_to">{{ object.employee_work_email }}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear <t t-out="object.employee_id.name" />,
<br /><br />
According to our books, the following expense advance are overdue:
</p>
<table
style="border-spacing: 0; border-collapse: collapse; width: 100%; text-align: center;"
>
<thead>
<tr>
<th
style="padding: 5px; border: 1px solid black;"
>Expense Number</th>
<th
style="padding: 5px; border: 1px solid black;"
>Expense Name</th>
<th style="padding: 5px; border: 1px solid black;">Date</th>
<th
style="padding: 5px; border: 1px solid black;"
>Due Date</th>
<th
style="padding: 5px; border: 1px solid black;"
>Total Amount</th>
<th
style="padding: 5px; border: 1px solid black;"
>Residual</th>
</tr>
</thead>
<tbody>
<t t-foreach="object.expense_sheet_ids" t-as="sheet">
<tr>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="sheet.number" />
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="sheet.name" />
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="sheet.account_move_ids.date" />
</td>
<td style="padding: 5px; border: 1px solid black;">
<t t-out="sheet.clearing_date_due" />
</td>
<td
style="padding: 5px; border: 1px solid black; text-align: right;"
>
<t t-out="'{0:,.2f}'.format(sheet.total_amount)" />
</td>
<td
style="padding: 5px; border: 1px solid black; text-align: right;"
>
<t
t-out="'{0:,.2f}'.format(sheet.clearing_residual)"
/>
</td>
</tr>
</t>
<t
t-set="total_residual"
t-value="sum(object.expense_sheet_ids.mapped('clearing_residual'))"
/>
<tr>
<td
colspan="5"
style="padding: 5px; border: 1px solid black; font-weight: bold; text-align: right;"
>
<t t-out="'{0:,.2f}'.format(total_residual)" />
</td>
<td />
</tr>
</tbody>
</table>
<p style="margin: 0px; padding: 0px; font-size: 13px;">
<br /><br />
If you made a clearing for these advance a few days ago, please ignore this email.
<br /><br />
Regards,<br />
<t t-out="user.signature" />
</p>
</div>
</field>
</record>
</odoo>
9 changes: 9 additions & 0 deletions hr_expense_advance_overdue_reminder/data/sequence_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="seq_advance_overdue_reminder" model="ir.sequence">
<field name="name">Advance Overdue Reminder Sequence</field>
<field name="code">advance.overdue.reminder.sequence</field>
<field name="padding" eval="4" />
<field name="prefix">EXOR</field>
</record>
</odoo>
Loading
Loading