-
-
Notifications
You must be signed in to change notification settings - Fork 89
[add] cms_notification #13
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
Conversation
3f3ab41 to
ffc9e83
Compare
7c418d1 to
e20222b
Compare
guewen
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.
Performance improvement suggestion.
I like the feature!
| ('needaction_partner_ids', 'in', item.partner_id.id), | ||
| ('subtype_id.cms_type', '=', True), | ||
| ] | ||
| item.has_unread_notif = bool(msg_model.search_count(domain)) |
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.
With a large number of mail.message, a search with a limit=1 is drastically faster than a search_count. It has to search only 1 line vs all of them.
f002c62 to
1a8157d
Compare
|
Please don't use plurals on module name. cms_notification is good enough I think, or if not, cms_multi_notification. |
|
@pedrobaeza is it that fundamental? I have it already in production and I'd love to skip a painful migration here 😛 |
|
Yeah, I think so. It's already a guideline and avoid typos. You can migrate it very easily with openupgradelib and shell command: |
|
@pedrobaeza didn't knew that. TIL thanks :) |
|
EDIT: I have fixed the syntax of the code that was incorrect |
1a8157d to
a636a1a
Compare
a636a1a to
bd8161d
Compare
|
You can hit this button too after OCA/social/pull/158 is merged ❤️ |
|
@pedrobaeza OCA/social#158 merged, any blocker 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.
Why don't you use FontAwesome included in Odoo?
cms_notification/README.rst
Outdated
| }) | ||
| return res | ||
| Usage |
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 is incorrectly indented
| @@ -0,0 +1,81 @@ | |||
| # Translation of Odoo Server. | |||
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.
Remove POT file
oca_dependencies.txt
Outdated
| # | ||
| # To provide both the URL and a branch, use: | ||
| # sale-workflow https://github.com/OCA/sale-workflow branchname | ||
| social https://github.com/camptocamp/social add-mail_digest |
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 should be changed
|
@pedrobaeza font-awesome from odoo is old, at least in v9 |
|
Yeah, but possibly the icons (or similar) used here are in this version, because bundling libraries on each module is very heavy, and more if the use is very light as this one. |
bd8161d to
6255bff
Compare
|
@pedrobaeza they are not. There's no envelope open for instance. This is why I added it. To be honest: I'd say that icons should be updated in OCB. Here, maybe, I can create a custom one... |
|
OK, what about having a module base_fontawesome with this lib? On v10, we can deprecate it as the version is more modern. Can you obtain the same way of declaring icons with this new module, so you don't have to change anything in this module? |
6255bff to
9311a7c
Compare
|
hmm could be a good idea and allow to reuse it for several v9 modules. |
|
@pedrobaeza there you go OCA/server-tools#866 |
e3159cd to
fecd4e4
Compare
|
final bits to get this merged: replace oca dependency url as OCA/server-tools#866 has been merged a long time ago. |
CMS form for managing personal notifications settings.
Depends on mail_digest PR and cms_form PR