vertelab / odoo-af

2 stars 5 forks source link

AFC-2322 - Add a tab with sent messages to the jobseeker-form #588

Closed fredrikarvas-vertel closed 3 years ago

fredrikarvas-vertel commented 3 years ago

Userstory: Userstoy: As a Caseworker I want to see messages that have been sent to the current jobseeker. image

Solution Extend the module https://github.com/vertelab/odoo-mail/blob/Dev-12.0/af_mail_client_contact (renamed to mail_partner_messages) will depend on mail and partner_view_360)

to add a tab on the https://github.com/vertelab/odoo-base/tree/Dev-12.0/partner_view_360 user-form-view.

This tab should only be visible for users in the Newsletter-Manual-group image

Module name: (added by Nils or Fredrik) Old Name: odoo-mail/af_mail_client_contact New name: odoo-mail/mail_partner_messages

Development Branch name: Dev-12.0-AFC-2322-add_message_tab_to_jobseeker

Target Branch name: https://github.com/vertelab/odoo-mail/tree/Dev-12.0

Test-steps: Install the module Go to a Jobseeker who has recived an newsletter. = The newsletter should be visible as a line in the tab and, if clicked on, the complete newsletter should be visible.

Description to the manifest: This version adds a link to the sent-newsletters.

Estimate: (@developers: Add your times here, not in comments please) Estimated Hours: Estimated Date: Actual Hours: 3 Hours and 30 mins 2 Hours and 10 mins for Added button to redirect Email from Message, Added email statistics in Message, Set default true and required 'Keep Archive' flag in Mass Mailing, Added supporter level 3 group on Message menu.

rupareliyahemangi145 commented 3 years ago

Hello @FredrikArvas

I checked af_mail_client_contact module. This module just add Message menu inside contact and list messages of res.partner(Contact) model. It means it will list message of Contact model's chatter log only.

As we need Newsletter(Email marketing) messages we can't direct list mail.message.Because mail.message are deleted from odoo standard after mail sent. And we can't show list which is from Mass mailing Email Sent button because it redirect list view based on model which is selected in mass mailing like sale order, crm, mailing list, contacts etc.

To achieve this requirement I found one solution that when mass mailing mail sent we can made new entry in new model. And list that new model in Message tab of Contacts. When mail sent at that time we can get following information:

  1. Document - Like sale order, contact, mailing list, crm
  2. Whole mass mailing record

So in message tab we can list following:

  1. Document
  2. Mass mailing name(subject)
  3. sent date
  4. If want to list any information from Mass mailing record
rupareliyahemangi145 commented 3 years ago

Hello @FredrikArvas

I've created PR https://github.com/vertelab/odoo-mail/pull/57 for this issue.

Here is videos:

  1. https://www.loom.com/share/c2c2be991158448ab17e2b2a67be92ad
  2. https://www.loom.com/share/d3d46394c156444f8d3add30d8077c9a
  3. https://www.loom.com/share/833dc9fa4ccb4b9590f88d88f38bc283
  4. https://www.loom.com/share/2fb02aceafb341e7b780d75a206f87bf

Please check it and let me know if anything.

Thanks.

Regards, Hemangi.

fredrikarvas-vertel commented 3 years ago

Hi @rupareliyahemangi145 I have now tested and I would like to ask for the following changes.

1 Add usergroup for the tab, since it should not be visible for all case-workers yet. image

2 If possible, add statistics to the email-line image

3 Add user-group to this menu image They are here: https://github.com/vertelab/odoo-base/tree/Dev-12.0-Fenix-Sprint-02/base_user_groups_dafa

4 Please make this field mandatory (it is used by "Show in web-browser". image

5 Please link the message-line to the content of the message. I see two alternatives here: 1 link to the record in the outgoing email-log. 2 find the "Chatter-log"-record that is currently displayed below the contact-form. image

6 If possible, hide/remove the mail-logging to Chatter-log image

4

rupareliyahemangi145 commented 3 years ago

Hello @FredrikArvas

I've worked on previous points and Created PR https://github.com/vertelab/odoo-mail/pull/58 for those.

Here is video for that: https://www.loom.com/share/841f6a0b61394398960b1bf03f613269

1 Already added Newsletter >> Manual user group in Tab. Please let me know if doesn't work. If user has access of Newsletter >> Automatic or Editor then user can see because these groups inherited Manual group.

2 This will work on new messages. In video didn't show but it will work on server. In local replied, clicked etc are not updated on Mass mailing record. But on server if statistics update on mass mailing record it will also update in messages.

3 I found Support level - 3 group af_security.3_line_support from af_security module. Didn't used https://github.com/vertelab/odoo-base/blob/Dev-12.0-Fenix-Sprint-02/base_user_groups_dafa module as it is for Dafa support 3rd level group. Please let me know if I wrong.

4 Done

5 Added button for this that will redirect user to Email. Because it is not possible to redirect from field on message list view inside tab.

6 Could not reproduce this in my local system. This may comes from different module. I also tested mail_massmailing_sender_logs module but it only add one log when Mass mailing record goes in 'In Queue' stage.

Please check it and let me know if anything.

Thanks.

Regards, Hemangi.