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

9.0 [MIG] event_email_reminder #65

Merged
merged 3 commits into from Nov 26, 2016

Conversation

cubells
Copy link
Sponsor Member

@cubells cubells commented Nov 15, 2016

Changes included:
- Imported last updates from v8
- Adapted to v9
- Fix error on tests

cc @Tecnativa

@cubells cubells changed the title 9.0 mig event email reminder 9.0 [MIG] event_email_reminder Nov 15, 2016
yajo
yajo previously requested changes Nov 17, 2016

.. 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
Copy link
Member

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">
Copy link
Member

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
Copy link
Member

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)'"/>
Copy link
Member

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>
Copy link
Member

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(
Copy link
Member

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()

Copy link
Member

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(
Copy link
Member

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

@pedrobaeza pedrobaeza dismissed yajo’s stale review November 26, 2016 15:52

He's on holidays are comments have been attended

@pedrobaeza pedrobaeza merged commit 1832da6 into OCA:9.0 Nov 26, 2016
@pedrobaeza pedrobaeza deleted the 9.0-mig-event_email_reminder branch November 26, 2016 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants