-
-
Notifications
You must be signed in to change notification settings - Fork 699
[add] mail_digest #158
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
[add] mail_digest #158
Conversation
|
TODO: check / fix failing tests w/ other social modules. |
|
@antespi @pedrobaeza I'm checking failing tests. I see 2017-03-24 08:42:43,626 5399 ERROR openerp_test openerp.addons.mail_tracking_mailgun.models.mail_tracking_email: Mailgun: Database 'bad_db' is not the current database
[...]
2017-03-24 08:42:44,481 5399 ERROR openerp_test openerp.addons.mail_tracking_mailgun.models.mail_tracking_email: Mailgun: event type 'bad_event' not supportedand other similar errors, both on travis and on my local setup (with just mail_tracking tests running). Actually I found the same errors in the original PR https://travis-ci.org/OCA/social/jobs/161414564 Is there any particular setting to run tests for mail_tracking or can I just ignore them? |
ecfd4b5 to
13e1a3b
Compare
|
AFAIK, these are the intended behavior of the tests, proving a wrong DB in them to see if it fails, so this is not problem for the status (and indeed Travis is green). |
|
@pedrobaeza is green since I fixed my stuff :) I wanted to make sure I didn't break anything else before debugging. Tnx anyway. |
mail_digest/models/res_partner.py
Outdated
| message_sudo = message.sudo() | ||
| if not message_sudo.message_type == 'email': | ||
| return | ||
| # TODO: what to do when a partner updates frequency? |
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.
what to do when a partner updates frequency?
Frequency tells how often we will try to send a digest to the Partner.
Whenever we hit that time, all unsent messages will be collected into that digest, and marked as sent.
It you look at it this way, the answer is trivial.
With this design, the frequency is irrelevant for the mail.digest queue; it only matters for the digest mail process.
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.
yep, you are right here. In your opinion, is there any other place where this should be taken into account?
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.
Can't remember any. Frequency should only be relevant to trigger the "cron job".
|
@pedrobaeza @dreispt anything else to do here but rebase? |
|
rebased! |
|
@pedrobaeza @rafaelbn @dreispt any stopper here? |
pedrobaeza
left a comment
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.
Little changes
mail_digest/__openerp__.py
Outdated
| ], | ||
| 'data': [ | ||
| 'data/ir_cron.xml', | ||
| # TODO: fix permissions (only admin now) |
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.
Is still this TODO?
mail_digest/README.rst
Outdated
| * with digest mode on select a frequency: "daily" or "weekly" | ||
| * configure specific rules per message subtype (enabled/disabled) | ||
|
|
||
| to receive or not receive any email notification for a given subtype. |
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.
"to receive or to not receive"
a79dcb6 to
8fda609
Compare
|
@pedrobaeza updated. Should be ready for merge ;) |
Syncing from upstream OCA/social (11.0)
This module allows users/partners to:
and receive or not receive any email notification for a given subtype.
This module is needed by its CMS integration module cms_notifications