-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
9.0 [MIG] event_email_reminder #65
Conversation
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/199/8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9.0
<!-- © 2016 Sergio Teruel <sergio.teruel@tecnativa.com> | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<openerp> | ||
<data noupdate="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<odoo noupdate="1">
self, days=7, draft_events=False, near_events=False, | ||
template_id=None): | ||
"""Enqueue mail with a summary of events that begin on days parameter | ||
:param int days: number of days to reminder when events star |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"start"
<field name="active" eval="True"/> | ||
<field name="model" eval="'event.event'"/> | ||
<field name="function" eval="'run_event_email_reminder'"/> | ||
<field name="args" eval="'(5, False, False, None)'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You add 5 by default here, and 7 in the method. I think it's more consistent to have the same default in both places.
<field name="args" eval="'(5, False, False, None)'"/> | ||
<field name="doall" eval="False"/> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So everyday you get an email with next events?
Well, I guess you can change that, but seems a bit spamming default. Not blocker though.
:param str template_id: id of a template or None | ||
""" | ||
today = fields.Date.context_today(self) | ||
limit_date = datetime.strptime( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use here fields.Date.from_string()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one still remains untouched.
def setUp(self): | ||
super(TestEventEmailReminder, self).setUp() | ||
today = time.strftime(DEFAULT_SERVER_DATE_FORMAT) | ||
date_event_1 = datetime.strptime( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use fields.Date.from_string
[ADD][8.0] event_email_reminder: Send reminder events by email
e737bc3
to
fc92d68
Compare
He's on holidays are comments have been attended
Changes included:
- Imported last updates from v8
- Adapted to v9
- Fix error on tests
cc @Tecnativa