-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
[MIG][14.0][mail_footer_notified_partner] Migration to v14 with renaming of module #855
base: 14.0
Are you sure you want to change the base?
Conversation
@cvinh thanks a lot for the PR.
|
f5fcc94
to
30fc948
Compare
Hey @cvinh, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
c7cff71
to
f8611b7
Compare
|
More than improvement it seems to me a significant change that goes against the module name itself. I would keep the module as is. At least, you could propose this change in another PR after this will be merged. |
a596f19
to
d024694
Compare
) | ||
|
||
self.assertTrue(rep, "message not send") | ||
self.assertTrue( |
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.
I don't eliminate at all the tests. I think it's worth to keep at least the following part.
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.
@cvinh what do you think?
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.
@cvinh what do you think?
Yes I'm working on it
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.
@tafaRU tests have to be rewritten, I'm not good with it, do you want to finish it ?
Maybe this one is better --> https://github.com/OCA/social/tree/12.0/mail_show_follower . Did you have a look? |
d024694
to
2932bb4
Compare
@HaraldPanten Thanks for pointing that one |
2932bb4
to
2e9aff2
Compare
/ocabot migration mail_footer_notified_partner |
@rafaelbn @tafaRU IMHO mail_show_followers is great but it will not warn email recipients that if they reply to the catchall address, all the followers (internal or external) will ne notified by odoo... which is very dangerous, see my comment here to see why #289 (comment) |
This is a good point #855 (comment) what do you think @Shide @yajo @ValentinVinagre @HaraldPanten ? |
Well... Normally workers shouldn't be unpolite, rude or insult anybody by using their company email address. If you do so, you know that you'll have to accept the responsibility of the consequences. On the other hand, an option that allows users to add a "warning" to inform the recipients that replies to the catchall address will be sent to all the followers could be an improvement to mail_show_follower module. |
Agreed with that. This could come in a separate PR in order to improve the module. Migration code LGTM, but I think module PR #862 has more options. Once this PR #862 is on v15, I will backport/migrate to v14. On the other hand: |
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.
LGTM
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.
It seems to me that this module is not necessary. The one in #862 seems a better implementation IMHO, and the only extra feature that this module adds (saying: "Also notified") doesn't justify a whole new module.
The feature itself means adding 2 words to #862. I think we should close this PR and fix it in #862 instead. Then backport, as @Shide said.
I think the same as @yajo , I don't see this module as necessary having the mail_show_follower . A warning could be added to the footer as an improvement, if it is activated and thus reduce the use case to a module, but if you want to use 2 separate modules, I have no problem either. As @HaraldPanten indicates, workers should not send emails with inappropriate words using the company email (or any other). If they do so, they must assume the consequences of their actions. |
we need to save the complete list of partners because _message_notification_recipients builds recipients grouped by users groups. Thus get_additional_footer would get a partial list of recipients
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-12.0/social-12.0-mail_footer_notified_partner Translate-URL: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_footer_notified_partner/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-12.0/social-12.0-mail_footer_notified_partner Translate-URL: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_footer_notified_partner/
Currently translated at 50.0% (1 of 2 strings) Translation: social-12.0/social-12.0-mail_footer_notified_partner Translate-URL: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_footer_notified_partner/fr/
f10838b
to
ef562bc
Compare
2279d76
to
0d84ba3
Compare
0d84ba3
to
43e0d1a
Compare
|
||
|
||
class TestMailNotification(common.TransactionCase): | ||
def test_get_signature_footer(self): |
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.
For this migration to be accepted, instead of removing the tests code and then adding it back in a new commit, you should not remove it in the previous commit. That way, you preserve the lines history.
self.mail_auto_delete = True | ||
|
||
def test_get_signature_footer(self): | ||
rep = self.recipient._notify( |
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 method doesn't seem to exist anymore in v14. You will probably need to adapt a bit this test code.
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.
Thank you for your comment. Unfortunately this is out of my knowledge... could you please suggest the fix ?
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.
I don't know the fix. I'd have to dig deep in the code of Odoo 16 to know that. However, how would I do it if I were you?
First thing would be to understand how unit tests work. It seems to me you never did these kind of tests, which is fine, but if you're migrating modules, this is an essential part of the migration work. Keep in mind that, if you've used modules and they work fine, it's because many others have devoted their time to write these tests. If you learn to do the same, you'll get to the next level! So, try starting by reading docs about tests. Install the module locally (I imagine you already did, but just in case), and run the tests. See the failure and fix it.
Now... how to fix it? As you can see, in v12 _notify()
was declared here. However, in v13 that method no longer exists. So I'd go and review the commits (or PRs) between v12 and v13 and see which one removed that method. It should lead you to the explanation about why it was removed and what replaces that functionality.
Once you find the replacement, just adapt this call and you'll get it fixed! 😃
Hello @OCA/social-maintainers , anyone with technical skills could help to @cvinh ? @sbidoul are you going to adopt this module in the future ( #855 (comment) )? |
Resume:
The original PR fron @JonathanNEMRY of this module named
For Odoo 16 I would like a module name mail_notified_partner or mail_show_notification_partner that make the same of mail_show_follower with out BUGs. The name mail_show_follower IMHO in incorrect. Why:
Model: Other points of interest: |
Thanks for this resume, it's very welcome
IMHO all the followers should be shown, as long as they are notified (by Odoo's messaging or classical email). |
If you talk about mail_body_notify_partner, you might not count the i18n files. |
This could be done easily by inheriting the view and set position=after instead of position=before. |
Hello all! In this FIX in Odoo 16 some of the problems commented in this PR are solved:
Just FYI Best regards |
Superseeds #801