Giter Site home page Giter Site logo

oca / social Goto Github PK

View Code? Open in Web Editor NEW
151.0 60.0 587.0 72.11 MB

Addons concerning odoo's social ERP features and messaging in general

Home Page: https://odoo-community.org/project/99

License: GNU Affero General Public License v3.0

Python 50.31% HTML 43.51% JavaScript 6.10% SCSS 0.08%
erp hacktoberfest odoo python

social's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

social's Issues

[11.0][MAIL][ADD] New folder for messages read in DISCUSS.

Currently when a message arrives it appears in the INBOX folder. If a message is marked as read, the message disappears.

The objective is to be able to keep a history of the messages and have access to the messages read in a folder other than INBOX, called ARCHIVED, for example.

This will allow you to search and consult about old messages.

Mail verification

I need a module for the verification of email registration in newsletters. I let this module developed by my partners and it should be available in OCA.

This procedure is necessary after GDPR. Email-Verification would also be useful for the account registration and other parts of Odoo eg "follow the forum".

Is this the right place for this module? Its a good idea to develope this feature with focus to newsletter regitration or its better a more general approach (eg technical module for account-registration, newsletter-registration, following)

[?][8.0][mail_tracking] How to track user clicks

@pedrobaeza @antespi, I ping you two because you are the contributors of this module.

I'm trying to figure out how to track user clicks on email links.
I thought it was possible, because the event_type: click exists and its tested.

However, after looking at the controller's code, it seems there's no route to handle this event (IMO: it should track the event and then redirect to the desired url through headers)

Am I missing something big on how to use this, or is this functionality indeed not yet implemented?

[8.0] Global name 'mail_id' is not defined

Module "mass mailing Extra statistic"
When sending a mail displays the following error in the log:

"Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/odoo/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/opt/odoo/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo/addons/web/controllers/main.py", line 944, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo/openerp/api.py", line 256, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/addons/mail/mail_thread.py", line 1721, in message_post
msg_id = mail_message.create(cr, uid, values, context=context)
File "/opt/odoo/openerp/api.py", line 256, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/addons/mail/mail_message.py", line 811, in create
user_signature=context.get('mail_notify_user_signature', True))
File "/opt/odoo/openerp/api.py", line 256, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/addons/mail/mail_message.py", line 880, in _notify
force_send=force_send, user_signature=user_signature
File "/opt/odoo/openerp/api.py", line 256, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/addons/mail/mail_followers.py", line 261, in _notify
self._notify_email(cr, SUPERUSER_ID, new_notif_ids, message_id, force_send, user_signature, context=context)
File "/opt/odoo/openerp/api.py", line 256, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/addons/mail/mail_followers.py", line 227, in _notify_email
email_ids.append(self.pool.get('mail.mail').create(cr, uid, mail_values, context=context))
File "/opt/odoo/openerp/api.py", line 256, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/openerp/api.py", line 360, in old_api
result = method(recs, _args, *_kwargs)
File "/opt/Extra_Addons/social/mass_mailing_statistic_extra/models/mail_mail.py", line 33, in create
return mail_id
NameError: global name 'mail_id' is not defined "

¿you know the problem that I can have?
thanks

Carles Antolí

[10.0] RFC: Mass Mailing Theme Boilerplate (Community)

I've written a mass mailing theme template:

https://github.com/OdooCommunityWidgets/mass_mailing_themes_boilerplate

based on the default (community) mass mailing theme here:

https://github.com/odoo/odoo/blob/10.0/addons/mass_mailing/views/snippets_themes.xml

The template is still very much a work in progress, however it provides a boilerplate for others to customise and built their own mass mailing themes on top of.

I am planning on adding more themes to the project as standalone modules under mass_mailing_themes_*, inside the mass_mailing_themes_boilerplate repository in the future as well.

Would this type of project be accepted into the OCA, and is this the right repository to submit a PR to when it's ready for review?

[8.0] mail_notification_email_template: E-mails created with template are created with admin rights

When using the module mail_notification_email_template, when sending a message from a chatter box, the generated e-mail is from user Administrator, and it creates user access rights problems when displaying the message.

When the module is not installed (or disable template), the generated e-mail is from the user sending the message. I think that this line is the problem :

https://github.com/OCA/social/blob/8.0/mail_notification_email_template/models/mail_notification.py#L47

But I don't see how it results of an administrator record creation.

Help

I added the following into odoo system parameters:

image

The keys and values didn't exist till I added them. Am I missing something I can't get the webhooks to work, when I test them in Mailgun they all fail "Response: <type 'exceptions.Exception'>"

Thanks I am using Odoo 10 Enterprise

[8.0][mail_notification_email_template][mail_tracking] Tracking status not visible in object thread

When using both modules mail_notification_email_template and mail_tracking, I have issues in the mail threads with the icon tracking the message because :

  • When a message is posted, it creates a new mail.notification record for the e-mail with template
  • The e-mail is sent and the tracking is attached to the message of the mail.notification object
  • In the thread, the message displayed is not the one from the mail.notification record, but the original one. Therefore, the tracking icon cannot track the status of the e-mail

Do you know how the tracking info can be pushed back in the original message post?

[10.0] Mail tracking for Mailgun

I installed the module Mail tracking for Mailgun. I entered the parameters:
mailgun.apikey:
mailgun.api_url:
mailgun.validation_key:

When checking mail or by pressing the Re-sync Mailgun button, I receive the following message:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 641, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 333, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 326, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 506, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 894, in call_button
    action = self._call_kw(model, method, args, {})
  File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 882, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/var/lib/odoo/addons/10.0/mail_tracking_mailgun/models/mail_tracking_email.py", line 240, in action_manual_check_mailgun
    content = json.loads(res.content, res.apparent_encoding)
  File "/usr/lib64/python2.7/json/__init__.py", line 351, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

What could this mean?
Tnanks!

[RFC] bus_presence_override: Chose availability states

Currently Odoo presence (IM availability) states are based purely on a hard coded AWAY_TIMER, which is set at 30 minutes of inactivity. bus_presence_override module will improve upon this logic by providing the ability for users to select their current availability state - as you would in a standard IM system.

It will accomplish this by adding a two buttons (red, yellow, and green) in the header of the MessagingMenu:

image

Clicking the red will make you offline, the yellow away, the green online.

The technical side of this looks fairly simple. We will add an im_status_custom to res.partner that will be used to overload the default _compute_im_status. I think we'll need to break the inheritance chain here in order to be efficient & just rewrite the direct SQL, but I don't think that's too big of a deal in this instance. Alternatively, we could re-iterate the partners after calling super in order to append any manual changes - but I think that's going to do more harm than good.

Does anyone know of anything doing something similar to this? It seems weird to me that we can't control these states manually, so I honestly feel like I'm missing something.

RFC: Message Anti-Spam Module

We are currently planning a new module to combat spam messages in Odoo. The plan at the moment is to implement a basic backpropagation algorithm similar to this.

The algorithm will be trained initially using some open source datasets like Enron, SpamAssassin, LingSpam, etc.

It will create a private Junk channel for each user, automatically filtering identified spam to it. Any item moved out of junk would be marked as a false positive, and anything moved into junk would be considered a false negative. TBD how this will play into the learning algorithm.

Messages would be evaluated in the create method of mail.message.

Spam scanning will need to be strictly opt-in. I'm thinking it makes sense to put this at the model level; something similar to the ir.model.website_form_access used for forms, with the mail.message.res_model dictating the model.

Challenges I currently foresee:

  • The obvious - training the algorithm
  • Support of multiple languages
  • Handling of spam not directed to specific users (projects, help desk, blog, crm)
  • Storage and subsequent search of data. Looks like pickle may work though, but with some challenges in terms of upgrades - we will need to add versioning, re-training, and a/b testing.

Nice to haves:

  • Model training on a user level (Cindy may like spam from CompanyA, but John might not) - this will require training the SVM in an incremental manor, instead of batch.
    • This is not so easy in sklearn, and we will be limited to linear case using Stochastic Gradient Descent (SGD). Would need to use something like pagasos instead
  • Client/Server model, allowing for centralized & offloaded training

Additional reading for anyone interested:

Migration to version 9.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-9.0

Modules to migrate

  • mail_optional_autofollow - By @lmignon - #62
  • email_template_qweb - By @lasley - #57
  • mail_as_letter
  • mail_attach_existing_attachment - By @sergio-teruel - #68
  • mail_debrand - By @darshan-serpent - #155
  • mail_full_expand
  • mass_mailing_custom_unsubscribe
  • mail_compose_select_lang
  • mail_restrict_follower_selection
  • mail_follower_custom_notification
  • mail_footer_notified_partners
  • mail_forward
  • mail_full_expand
  • mail_mandrill
  • mail_optional_autofollow
  • mail_read_new_window
  • mail_restrict_follower_selection
  • mail_sent
  • mail_tracking
  • mail_tracking_mailgun
  • mail_tracking_mass_mailing - By @cubells - #144
  • marketing_security_group > mass_mailing_security_group - By @cubells - #128
  • mass_mailing_custom_unsubscribe
  • mass_mailing_statistic_extra
  • mass_mailing_unique - By @cubells - #136
  • portal_welcome_email_template - By @nicomacr - #134
  • social_media_dribbble
  • social_media_tripadvisor
  • social_media_xing
  • website_mail_snippet_bg_color > web_editor_background_color - By @yajo OCA/web#582
  • website_mail_snippet_table_edit

[RFC] Enable bots by parsing commands in mail messages

Example use cases:

  • Reply to a Task mail notification with a message containing something like "!!close" to trigger a server-side action closing that Task.
  • Reply to a Lead mail notification with a message containing something like "@CRMBot open amounts" to trigger a server-side reply mail with a list of the Partner open amounts.

MailGun - Deliver _ BadRequest

Hi,
I am trying to configure Odoo to recive e-mail information from mailgun.

I configured the odoo parameters according and i configure the domain in mailgun, but when i am trying in webhooks separator do a test, i recive BadRequest as a response.

Event Type :Delivered Message
URL to test: https://<your_domain>/mail/tracking/all/<your_database>

I think the problem is that lib http.py from odoo expects post parameters inthe httprequest and they dont exist in the request coming from mailgun.

Any ideia?
Thanks.

[11.0] mail_tracking: compute email_score field take a lot of time when partner has a lot of mail.tracking.email records

This is happening for the change made in email_is_bounced and email_score_from_email methods,
in version 9.0 we were filtering the last 10 records, while in version 11.0 we are searching in all the "mail.tracking.email" records. Visual diff bellow.

Does we need actually search in all the mail.tracking.email that exists? Maybe we could filter the last N records making N customizable by the admin user. Or have a ir.cron that clean the records that we are not consulting since they are very old.

diff-9-11-mail_tracking

[10.0] mail_debrand, text to match has changed

Emails in v10 are being sent with a "Powered by Odoo" branding instead of "using" and "Odoo"

Is it feasible to extend the module to remove both instances of "Powered by Odoo" and "Sent using Odoo"?

image

[8.0][mail_tracking_mass_mailing] Error and emails not being sent

I have the mail_tracking_mass_mailing and mail_tracking modules installed. Outbound emails are not working properly. Even if I remove the mass mailing modules, the email still doesn't work. I get the error in my logs as follows:

2017-04-07 10:57:12,734 4958 ERROR xxxx-yyyy-org openerp.addons.mail.mail_mail: failed sending mail.mail 3230 Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/mail_mail.py", line 261, in send email_list.append(self.send_get_email_dict(cr, uid, mail, context=context)) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/mass_mailing/models/mail_mail.py", line 100, in send_get_email_dict res = super(MailMail, self).send_get_email_dict(cr, uid, mail, partner, context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 372, in old_api result = method(recs, *args, **kwargs) File "/opt/odoo/.local/share/Odoo/addons/8.0/mail_tracking/models/mail_mail.py", line 40, in send_get_email_dict tracking_email = m_tracking.sudo().create(vals) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/.local/share/Odoo/addons/8.0/mail_tracking_mass_mailing/models/mail_tracking_email.py", line 38, in create self.tracking_ids_recalculate( AttributeError: 'mail.tracking.email' object has no attribute 'tracking_ids_recalculate'

Migration to version 12.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0

Modules to migrate

Unable to send email on new template

module: mail_notification_email_template
version: 8.0

Steps to reproduce

  • Install Sales module and activate technical settings
    -configure and test one outgoing server
  • Create a new template for Quotation sent ( can keep most values the same as per the Discussions example) , although my final goal is to utilize fields from the sales Quotation
  • Create a new draft quotation , add new followers (internal users and one customer)
  • make sure that followers is part of the Quotation sent sub type (eg they will receive emails)
  • Print the quotation

Current behavior

  • Emails fails most of the time to all followers, although i have had cases where it succeeds in sending to one.
    -remainder of emails is stuck showing failed status.
    Log file shows :
    odoo attributeerror: 'mail.notification' object has no attribute '_get_access_link'

Expected behavior
-All emails are supposed to go out using the configured template.

(i have had success where i manually configure the to Email field with email addresses, thus the issue is possibly with the formatting of the to(partners) field, which is currently
${object.partner_id.ids|join(',')}

I currently don't have access to my server logs, but will attach clean logs asap.
Is there any verbose mode i might need to activate? (there is debugging on the outgoing servers, but it doesn't seem to generate more data)

Migration to version 11.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0

Modules to migrate

[RFC] mail_followup: Abstract Followup Messaging

This module will allow for customizable outbound emails for any record. A few use cases are for medical appointments (what to bring, arrive early, etc), car repair (notice of warranty and rights), and just simple sales followups.

It will add a new model mail.followup, which will:

  • Allow for you to choose a model to operate on
  • Allow for you to choose a domain filter for records to match (similar to server actions)
  • Allow for you to choose fields to group notifications by
  • Allow you to select a mail.template for use
  • Allow you to select the field on the model representing the partner to send the notification to

Security to this new model will be restricted to Administrators only. Contextual modules can then be created to override this if wanted, such as if Sales reps need to configure messages for Sales.

A new scheduled task will be added that will iterate the active mail.followup records, search for the filter, then send the mail.

The records matched in the filter will be grouped by the defined fields, then the groups will be iterated - with the recordset provided to the mail.template as object.

A default mail template will be provided, but it will be pretty basic and will mostly be to outline how to create custom templates.

This somewhat overlaps with OCA/product-attribute#253, which will likely just use this module as a base. I didn't quite realize the overlap until after I abstracted out some other requirements 🚀

Anyone know of anything similar we can base on? I know this is technically possible with Server Actions, but we need something a bit more contextual due to the amount of notifications that are needed.

Problems with character encoding

module: email_template_qweb
version: 10.0

Steps to reproduce
insert some non standard characters like äöü into the qweb e-mail template code, e.g.

<t t-name="email_template_qweb.view_email_template_demo1"> <!-- because we can simply call the ci here, we don't need to repeat it /--> <t t-call="email_template_qweb.view_email_template_corporate_identity"> <!-- the template we call uses this as title if we set it /--> <t t-set="email_heading" t-value="email_template.subject"/> <h2>Dear <t t-esc="object.name"/>,</h2> <p> This is an email template using qweb. öäüÖÄÜ </p> </t> </t>

Then click the preview button to preview the template.

  • ...

Current behavior
The characters are shown as

This is an email template using qweb. öäüÖÄÜ

Expected behavior
The characters are shown as

This is an email template using qweb. öäüÖÄÜ

The same behaviour is also observed, when the special characters are not directly written into the template code but stem from some database fields like company.name

[8.0] mail_debrand not working

I tried to use mail debrand locally and it did not work for me, the last line mentioning about Odoo was still appearing.

I looked at the code and I did not understand how it could work.

mail_debrand seems to override the function get_signature_footer from odoo/addons/mail, but the function has a wrong name (extra _ as first character) to override: _get_signature_footer instead of get_signature_footer.

Related source code:

I can submit a PR for this tiny fix if somebody could confirm that their is actually a problem (I did not succeed to perform a meaningful test to reproduce on Runbot).

Unable to Import Module

module: mail_forward
version: 8.0.7.0.0

Steps to reproduce

  • Goto Settings - import Module - select file and import

Current behavior
error message...
Error while importing module 'mail_forward': '"ValidateError\nField(s) arch failed against a constraint: Invalid view definition\n\nError details:\nModel not found: mail_forward.compose_message\n\nError context:\nView Forward Email Form\n[view_id: 1518, xml_id: n/a, model: mail_forward.compose_message, parent_id: 223]" while parsing file:///c:/windows/temp/tmpkgjb6f/mail_forward/views/compose_message.xml:9, near\n\n Forward Email Form\n mail_forward.compose_message\n \n \n \n \n \n {\n 'required': [('destination_object_id', '=', False)]\n }\n \n\n \n \n \n\n \n \n \n\n \n \n {\n 'invisible': [('destination_object_id', '=', False)]\n }\n \n \n \n'

Expected behavior
Module loaded successfully

"Click here to see mail content" module?

Does anybody know if there is any module that adds functionality of displaying a mass mailing in a web page in case somebody cannot read it right in the mailing client?

[8.0-mail_mandrill] Mandrill future ?

Hello @rafaelbn @antespi
I'm sorry to ask that question here because it's not an issue...
Since Mandrill dramatically increased their prices in april 2016, do you plan to develop a new module for another platform ? (sendinblue, mailjet, sendgrid... or else)
Thanks in advance for your reply
Cyril

[11.0][mail_tracking] User with Technical settings (group_no_one) cannot display email messages

When a user has the debug mode (Technical Settings) activated they cannot display the mails associated to mail tracking, due to a permissions issue. Only users in group Administration/Settings can access to object mail.tracking.value.

It is very common for certain users to have the technical settings (base.group_no_one) activated.

IMHO the root cause of the problem is that mail_tracking provides the ability for any user to access emails. tracking values associated to mail.message should only be accessible by Administrator/Settings users, not by 'base.group_no_one'.

I have reported the issue to odoo odoo/odoo#28340

But in a sense, the emails are not offered for display to users except on this module.

Perhaps the module should add groups='base.group_system' to https://github.com/odoo/odoo/blob/11.0/addons/mail/views/mail_message_views.xml#L82

[ROADMAP] Use tags in message subject instead of mail alias

Purpose

Use tags in message subject instead of mail alias, to avoid requiring catchall mail server rules.

Currently Odoo incoming mail needs a "catchall" account, and then uses the email "to" address to match with a Mail Alias and attach the message to the corresponding record.

It is desirable to instead use an identifier tag in the email subject, thus removing the need to have a mail server catchall configuration, that has it's own disadvantages.

[RFC] mail_from_force: force the "From" address to a fixed email

In some scenarios, the outgoing mail server enforces the "From" email address to be the one for User connected to the mail server.

This means that if I connect to the outgoing mail server using "admin", all sent emails must be from "[email protected]", and an email From "[email protected]" would be rejected by the mail server.

AFAICS this behavior is not configurable, so I'm preparing an extension to solve this:
The From would be changed to keep the sender's name, but use the Outgoing Mail user's address.

Following the example above, Daniel's email From would be something like "Daniel Reis [email protected]" or "On behalf of Daniel Reis [email protected]"

Technically, we just need to override the _get_default_from method of mail.message.

[RFC] mail_outbound_static: Email FROM Headers

This module will allow you to configure the FROM header for any outbound email server, overriding the default operation of using the partner's email address in the FROM header.

The reasoning behind this is because manipulation of the FROM header is exactly what spammers do, and is called email spoofing. This is why all of my emails to Odoo Community mailing lists go to SPAM, and this is why Odoo is not compatible with Amazon SES.

For anyone interested in email spoofing, particularly those of you who have email on your own domain and are not going to people's spam, I recommend you read this article and implement.

Simple enough of a goal here - was just wondering if anyone knows of something pre-existing that we can base on for this?

Migration to version 10.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-10.0

Modules to migrate

  • base_search_mail_content - By @mreficent - #180
  • email_template_qweb - By @dbo-odoo - #98
  • mail_as_letter - By @dbo-odoo - #100
  • mail_attach_existing_attachment - By @dbo-odoo - #99
  • mail_compose_select_lang - By @dbo-odoo - #101
  • mail_debrand - By @pedrobaeza - #168
  • mail_digest - By @simahawk - #187
  • mail_footer_notified_partners - By @SimoRubi - #200
  • mail_forward - By @ecino - #256
  • mail_full_expand- By @dbo-odoo - #112
  • mail_optional_autofollow- By @dbo-odoo - #109
  • mail_optional_follower_notification - By @adrienpeiffer - #115
  • mail_restrict_follower_selection- By @dbo-odoo - #110
  • mail_tracking - By @dbo-odoo - #108
  • mail_tracking_mailgun - By @dbo-odoo - #111
  • mail_tracking_mass_mailing - By @chienandalu - #174
  • mass_mailing_custom_unsubscribe - By @yajo - #178
  • mass_mailing_event - By @chienandalu - #173
  • mass_mailing_partner - By @chienandalu - #171
  • mass_mailing_unique - By @pedrobaeza - #188
  • website_mass_mailing_name - By @yajo - #179

[RFC] mail_thread_recursive: Multiple threads per record

This module will provide the ability for true threaded conversations on Odoo models. In the current implementation of mail.thread, a record is considered to have one thread & is therefore considered one discussion. In some contexts, however, multiple independent discussions may be occurring - all with their own context and followers.

An example of this is a blog, such as this article, which contains numerous independent conversations regarding different aspects of the article. Each person that commented on the article could care less about the other comments on the article, but they also want to receive notifications for replies to their comment.

To be honest I have absolutely no idea where to begin here, so for a first time ever - I am submitting a blank RFC & am hoping that someone has an idea. I'll keep pondering as well, and update this if I come up with something substantial.

Following are the high level requirements:

  • Creating a new message in a record should create an entirely new mail.thread associated to the record
  • All mail.threads associated to the record should be displayed in reverse chronological order (of last message received)
    • All messages of the mail.thread should be grouped together (think of email conversation view)
    • mail.thread views should be collapsible.
  • Following the record will follow all mail.threads for the record
  • mail.thread operation should not be changed
  • Logic is required to catch the calls to all message functions at the record level & perform recursive actions instead

I'm thinking we can accomplish this view-side by simply iterating the mail.thread widgets. The real stumpers are:

  • What to encapsulate the mail.threads in
  • How to override the mail.thread functionality from models already implementing that functionality, providing both the recursive and the regular threads (a regular thread would just be treated in the same way as the recursive I'm thinking)

So yeah as I said, this is a totally rough sketch. Anyone have some pointers or existing code?

[8.0] When you send an e-mail from Odoo with is the correct language: user (who sends) or partner (who receicves)

Hi,

I know this is an Odoo issue, we opened here: odoo/odoo#7896. But Odoo answers

Hello Rafael,
We transmit your query to our usability team and they will look into your query.
As of now we can't do anything else to change this behaviour, only we can send your request to usability team for improvement that's all we can do due to our stable policy.
Thank you.

This means: OCA is agree to fix this in OCB, OR OCA accept in this project a module which FIX this.

Resume:

  • If you send a quote, sale order or an invoice, it will be sent in the language of the partner
  • [TOFIX] If you send an e-mail to a Partner through the chatter in the partner's form it will send an e-mail with user's signature in the language of the user an not of the partner.
  • [TOFIX] If you select multiple partners and go to "more" -> mass mailing selected partners you will also send the e-mails in the language of the user an not of the parter

Basically (big error of Odoo in my opinion), no matter you translate e-mails templates or anything they will be sent in user's languages and not in partner's languages.

So OCA, what do you think?

Thanks

Delivered State

Hi,

on mail_tracking app, i can not make the tracking to log delivered state.

I am using version 9 of mail_tracking and its working fine for open and sent state, but that is all i can see in the logs.

Is there any configuration i am missing or its a bug?

Thanks.

How to override chat_manager.js of mail module?

Good evening friends please help me I would like to know how to inherit the mail.chat_manager file from odoo and modify the functions of the ChatManager varibles. thank you

``odoo.define('mail_modern.chat_manager', function (require) {
"use strict";

var bus = require('bus.bus').bus;
var utils = require('mail.utils');
var config = require('web.config');
var Bus = require('web.Bus');
var core = require('web.core');
var session = require('web.session');
var time = require('web.time');
var web_client = require('web.web_client');
var Mixins = require('web.mixins');
var Class = require('web.Class');
var chat_manage = require('mail.chat_manager');

var _t = core._t;
var _lt = core._lt;

// Private model
//----------------------------------------------------------------------------------
var messages = [];
var global_unread_counter = 0;
var client_action_open = false;

// Global unread counter and notifications
//----------------------------------------------------------------------------------
bus.on("window_focus", null, function () {
global_unread_counter = 0;
web_client.set_title_part("_chat");
});

chat_manage.include({
    
})


var ChatManager = Class.extend(Mixins.EventDispatcherMixin, ServicesMixin, {
    // these two functions are exposed for extensibility purposes and shouldn't be called by other modules
    make_message: make_message,
    make_channel: make_channel,

    init: function (parent) {
        var self = this;
        Mixins.EventDispatcherMixin.init.call(this);
        this.setParent(parent);

        this.bus = new Bus(this);
        this.bus.on('client_action_open', null, function (open) {
            client_action_open = open;
        });

        bus.on('notification', null, on_notification);

        this.channel_seen = _.throttle(function (channel) {
            return self._rpc({
                model: 'mail.channel',
                method: 'channel_seen',
                args: [[channel.id]],
            }, {
                shadow: true
            });
        }, 3000);
        this._super(parent);
    },

    start: function () {
        this.is_ready = session.is_bound.then(function () {
            var context = _.extend({isMobile: config.device.isMobile}, session.user_context);
            return session.rpc('/mail/client_action', {context: context});
        }).then(this._onMailClientAction.bind(this));

        add_channel({
            id: "channel_inbox",
            name: _lt("Inbox"),
            type: "static",
        }, {display_needactions: true});

        add_channel({
            id: "channel_starred",
            name: _lt("Starred"),
            type: "static"
        });
    },

    get_message: function (id) {
        return _.findWhere(messages, {id: id});
    },
    get_messages: function (options) {
        var channel;

        if ('channel_id' in options && options.load_more) {
            // get channel messages, force load_more
            channel = this.get_channel(options.channel_id);
            return this._fetchFromChannel(channel, {domain: options.domain || {}, load_more: true});
        }
        if ('channel_id' in options) {
            // channel message, check in cache first
            channel = this.get_channel(options.channel_id);
            var channel_cache = get_channel_cache(channel, options.domain);
            if (channel_cache.loaded) {
                return $.when(channel_cache.messages);
            } else {
                return this._fetchFromChannel(channel, {domain: options.domain});
            }
        }
        if ('ids' in options) {
            // get messages from their ids (chatter is the main use case)
            return this._fetchDocumentMessages(options.ids, options).then(function (result) {
                chat_manager.mark_as_read(options.ids);
                return result;
            });
        }
        if ('model' in options && 'res_id' in options) {
            // get messages for a chatter, when it doesn't know the ids (use
            // case is when using the full composer)
            var domain = [['model', '=', options.model], ['res_id', '=', options.res_id]];
            this._rpc({
                model: 'mail.message',
                method: 'message_fetch',
                args: [domain],
                kwargs: {limit: 30},
            })
                .then(function (msgs) {
                    return _.map(msgs, add_message);
                });
        }
        console.log(messages);
        this._super(options);
    },
});

});``

[11.0] [mail_activity_board] restrict visibility on users to models in which they have permissions

The board of activities is an interesting concept, but IMHO has a major drawback and itnis the security. Anyone can view all activities related to any object.

But it makes more sense that sales looks at activities relating to leads and sales orders, but not purchase orders.

@dajuayen @hbrunn do you thibk that it makes sense? Not sure of this is possible at all from a technical perspective. Would require to check the security on the object related to the activity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.