-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TA#72138 [16.0][MIG] partner_key_date (#161)
--------- Co-authored-by: Lanto R. <[email protected]>
- Loading branch information
1 parent
2750477
commit 184f233
Showing
24 changed files
with
891 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Partner Key Dates | ||
================= | ||
This module adds key dates to partners. | ||
|
||
A key date is an important event in the timeline of a contact. | ||
|
||
Key dates require a type, and these types are configurable. | ||
To configure key date types, go to `Contacts / Configuration / Key Date Types`. | ||
|
||
.. image:: static/description/key_date_types_tree_view.png | ||
|
||
.. image:: static/description/key_date_types_form_view.png | ||
|
||
Key dates can be accessed from Contacts / Dates. | ||
|
||
.. image:: static/description/key_date.png | ||
|
||
Age Calculation | ||
--------------- | ||
The module includes a cron job to calculate and update the age associated with key dates. | ||
This cron ensures that the age field is kept up-to-date. | ||
|
||
.. image:: static/description/cron_compute_age.png | ||
|
||
Anniversary Emails | ||
------------------ | ||
The module also adds functionality to send emails on the anniversary of key dates. | ||
|
||
In the list view of key dates, the column `Diffusion` allows you to specify which dates should trigger an email on their anniversary. | ||
|
||
A scheduled action (cron) is responsible for sending these emails to the relevant contacts. | ||
|
||
.. image:: static/description/cron_send_mail.png | ||
|
||
Contributors | ||
------------ | ||
* Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
* Savoir-faire Linux | ||
|
||
More Information | ||
----------------- | ||
* Meet us at https://bit.ly/numigi-com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright 2017 Savoir-faire Linux | ||
# Copyright 2022-today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2017 Savoir-faire Linux | ||
# Copyright 2022-today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
{ | ||
"name": "Partner Key Dates", | ||
"version": "16.0.1.0.0", | ||
"author": "Savoir-faire Linux", | ||
"maintainer": "Numigi", | ||
"website": "https://bit.ly/numigi-com", | ||
"license": "LGPL-3", | ||
"category": "Partner Management", | ||
"depends": ["contacts"], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"data/ir_cron_data.xml", | ||
"data/mail_template_data.xml", | ||
"views/res_partner_views.xml", | ||
"views/res_partner_date_views.xml", | ||
"views/res_partner_date_type_views.xml", | ||
], | ||
"installable": True, | ||
"external_dependencies": { | ||
"python": ["freezegun"], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<data noupdate="1"> | ||
|
||
<record id="ir_cron_compute_age" model="ir.cron"> | ||
<field name="name">Compute Key Date Ages</field> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="model_res_partner_date" /> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="False" /> | ||
<field name="code">model.update_age_for_all_dates()</field> | ||
</record> | ||
|
||
<record id="ir_cron_send_anniversary_email" model="ir.cron"> | ||
<field name="name">Send Key Date Anniversary Emails</field> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="model_res_partner_date" /> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="False" /> | ||
<field name="code">model.send_anniversary_emails()</field> | ||
</record> | ||
|
||
</data> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<data noupdate="1"> | ||
|
||
<record id="anniversary_email_template" model="mail.template"> | ||
<field name="name">Send Partner Anniversary Email</field> | ||
<field name="model_id" ref="model_res_partner_date" /> | ||
<field name="auto_delete" eval="False" /> | ||
<field name="subject">Best Wishes</field> | ||
<field name="body_html" type="html"> | ||
<div> | ||
<p>Hello | ||
<t t-out="object.partner_id.name or ''">Marc Demo</t> | ||
</p> | ||
|
||
<p>Occasion : <t t-out="object.date_type_id.name or ''">Date type name</t></p> | ||
<p> | ||
Anniversary message... | ||
</p> | ||
</div> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</odoo> |
Oops, something went wrong.