Code Monkey home page Code Monkey logo

mail-addons's People

Contributors

actions-user avatar itpp-bot avatar yelizariev avatar

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

Watchers

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

mail-addons's Issues

Reply can't send

Hi all,

when send reply the mesenge can't send. This is log:
WARNING vmb odoo.models: mail.compose.message.create() includes unknown fields: content_subtype, subtype.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

mail_archive: Unable to check/mark mails as Read or Starred

After installing mail_archive I can't check/mark mails as Read or Starred. Nothing is shown in the log file. With only mail_base installed every thin is fine. Anyway very welcome app.:)
After updating my OCA - OCB Community version to the latest version it works now!

[FIX] mail_base - odoo_10_mails_reply_error

?debug=assets
Traceback (most recent call last):
File "/mnt/odoo-source/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/mnt/odoo-source/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/mnt/odoo-source/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/mnt/odoo-source/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/mnt/odoo-source/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/mnt/odoo-source/odoo/http.py", line 942, in call
return self.method(*args, **kw)
File "/mnt/odoo-source/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/mnt/odoo-source/addons/web/controllers/main.py", line 899, in call_button
action = self._call_kw(model, method, args, {})
File "/mnt/odoo-source/addons/web/controllers/main.py", line 887, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/mnt/odoo-source/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/mnt/odoo-source/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/mnt/odoo-source/addons/mail/wizard/mail_compose_message.py", line 194, in send_mail_action
return self.send_mail()
File "/mnt/addons/it-projects-llc/mail-addons/mail_base/models.py", line 27, in send_mail
res = super(MailComposer, self).send_mail(auto_commit=auto_commit)
File "/mnt/odoo-source/addons/mail/wizard/mail_compose_message.py", line 258, in send_mail
**mail_values)
File "/mnt/odoo-source/addons/mail/models/mail_thread.py", line 1886, in message_post
new_message = MailMessage.create(values)
File "/mnt/odoo-source/addons/mail/models/mail_message.py", line 738, in create
values['reply_to'] = self._get_reply_to(values)
File "/mnt/odoo-source/addons/mail/models/mail_message.py", line 705, in _get_reply_to
return self.env[model].message_get_reply_to([res_id], default=email_from)[res_id]
AttributeError: 'mail.mail' object has no attribute 'message_get_reply_to'


Traceback (most recent call last):
File "/mnt/odoo-source/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/mnt/odoo-source/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/mnt/odoo-source/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/mnt/odoo-source/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/mnt/odoo-source/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/mnt/odoo-source/odoo/http.py", line 942, in call
return self.method(*args, **kw)
File "/mnt/odoo-source/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/mnt/odoo-source/addons/web/controllers/main.py", line 899, in call_button
action = self._call_kw(model, method, args, {})
File "/mnt/odoo-source/addons/web/controllers/main.py", line 887, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/mnt/odoo-source/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/mnt/odoo-source/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/mnt/odoo-source/addons/mail/wizard/mail_compose_message.py", line 194, in send_mail_action
return self.send_mail()
File "/mnt/addons/it-projects-llc/mail-addons/mail_base/models.py", line 27, in send_mail
res = super(MailComposer, self).send_mail(auto_commit=auto_commit)
File "/mnt/odoo-source/addons/mail/wizard/mail_compose_message.py", line 258, in send_mail
**mail_values)
File "/mnt/odoo-source/addons/mail/models/mail_thread.py", line 1886, in message_post
new_message = MailMessage.create(values)
File "/mnt/odoo-source/addons/mail/models/mail_message.py", line 738, in create
values['reply_to'] = self._get_reply_to(values)
File "/mnt/odoo-source/addons/mail/models/mail_message.py", line 705, in _get_reply_to
return self.env[model].message_get_reply_to([res_id], default=email_from)[res_id]
AttributeError: 'mail.mail' object has no attribute 'message_get_reply_to'


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

[9.0] Mail Addons Kill Odoo's Live-chat notifications (both chrome notifications &

@yelizariev ,

Thanks for building these much-needed addons, they're very useful!

I've noticed though that having these installed seems to kill Odoo's built-in livechat notifications feature.

Basically if these addons are installed then when a customer starts a live chat session on the website there will be no chat popup in the backend, and no google chrome notifications (if they are enabled) to notify a live-chat operator that someone is talking to them.

I've uninstalled them for now due to this issue, however i'll post back with complete steps to reproduce and a screenshot later when I can find time.

For now it looks like:

  1. install mail_base and all other installable mail_... addons in this repo
  2. switch on live chat for the Odoo website
  3. join as an operator
  4. switch to a separate browser and visit the website (not logged in)
  5. start a live chat session)
  6. check in admin and there will be no notification of a new chat session being started

mail_private 12.0 error

File "/home/odoo/xplace/ext/mail_private/models.py", line 56, in _notify

return self._notify_recipients(rdata, record, msg_vals, force_send, send_after_commit, model_description, mail_auto_delete)

TypeError: _notify_recipients() takes 4 positional arguments but 8 were given

[12.0] mail_sent: wrong cached messages

Steps:

  • install mail_sent
  • install contacts
  • open some Contact. Delete all followerers. Send internal message ("Log Note")
  • Open Discuss >> Sent. Refresh page. Result: some or no message. Ok
  • At the same browser tab nagivate to the contact with log note.
  • Go back Discuss >> Sent. Result: you see the note. Wrong

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

mail_to: TypeError: data.partner_ids is undefined

Impacted versions: discovered in 12.0, reproduced in 11.0, needs checks in 13.0
Source: https://github.com/itpp-labs/mail-addons/tree/12.0/mail_to

Steps to reproduce:

  1. Send message /help to OdooBot in pop up chat window
    help

  2. The following error occurs:
    error

Error:
TypeError: data.partner_ids is undefined

http://localhost/web/content/389-8a27419/web.assets_backend.js:2956
Traceback:
_makeMessage@http://localhost/web/content/389-8a27419/web.assets_backend.js:2956:279
OdooClass.extend/Class.include/</prototype[name]</<@http://localhost/web/content/388-3c73411/web.assets_common.js:3541:371
_addNewMessage@http://localhost/web/content/389-8a27419/web.assets_backend.js:2524:533
addMessage@http://localhost/web/content/389-8a27419/web.assets_backend.js:2517:963
addMessage@http://localhost/web/content/389-8a27419/web.assets_backend.js:2544:20
OdooClass.extend/Class.include/</prototype[name]</<@http://localhost/web/content/388-3c73411/web.assets_common.js:3541:371
_handlePartnerTransientMessageNotification@http://localhost/web/content/389-8a27419/web.assets_backend.js:2563:273
_handlePartnerNotification@http://localhost/web/content/389-8a27419/web.assets_backend.js:2561:1281
_onNotification/<@http://localhost/web/content/389-8a27419/web.assets_backend.js:2564:1435
_.forEach@http://localhost/web/content/388-3c73411/web.assets_common.js:12:566
_onNotification@http://localhost/web/content/389-8a27419/web.assets_backend.js:2564:1170
trigger@http://localhost/web/content/388-3c73411/web.assets_common.js:3641:180
trigger@http://localhost/web/content/388-3c73411/web.assets_common.js:3647:148
_onPoll@http://localhost/web/content/389-8a27419/web.assets_backend.js:2306:45
_onPoll@http://localhost/web/content/389-8a27419/web.assets_backend.js:2321:481
OdooClass.extend/</prototype[name]</<@http://localhost/web/content/388-3c73411/web.assets_common.js:3538:488
_poll/<@http://localhost/web/content/389-8a27419/web.assets_backend.js:2305:178
then/</</<@http://localhost/web/content/388-3c73411/web.assets_common.js:802:681
fire@http://localhost/web/content/388-3c73411/web.assets_common.js:796:299
fireWith@http://localhost/web/content/388-3c73411/web.assets_common.js:801:202
Deferred/</deferred[tuple[0]]@http://localhost/web/content/388-3c73411/web.assets_common.js:803:56
rpc/<@http://localhost/web/content/388-3c73411/web.assets_common.js:3589:448
then/</</<@http://localhost/web/content/388-3c73411/web.assets_common.js:802:681
fire@http://localhost/web/content/388-3c73411/web.assets_common.js:796:299
fireWith@http://localhost/web/content/388-3c73411/web.assets_common.js:801:202
Deferred/</deferred[tuple[0]]@http://localhost/web/content/388-3c73411/web.assets_common.js:803:56
fire@http://localhost/web/content/388-3c73411/web.assets_common.js:796:299
fireWith@http://localhost/web/content/388-3c73411/web.assets_common.js:801:202
Deferred/</deferred[tuple[0]]@http://localhost/web/content/388-3c73411/web.assets_common.js:803:56
genericJsonRpc/<@http://localhost/web/content/388-3c73411/web.assets_common.js:3558:10
then/</</<@http://localhost/web/content/388-3c73411/web.assets_common.js:802:681
fire@http://localhost/web/content/388-3c73411/web.assets_common.js:796:299
fireWith@http://localhost/web/content/388-3c73411/web.assets_common.js:801:202
then/</</<@http://localhost/web/content/388-3c73411/web.assets_common.js:802:874
fire@http://localhost/web/content/388-3c73411/web.assets_common.js:796:299
fireWith@http://localhost/web/content/388-3c73411/web.assets_common.js:801:202
done@http://localhost/web/content/388-3c73411/web.assets_common.js:1192:95
callback@http://localhost/web/content/388-3c73411/web.assets_common.js:1212:23

Expected behavior:
don't get error

[10.0] Don't rewrite core odoo mail javascript

All mail-addons depend on module mail_base that is just a long copy-paste of Odoo source. I think it's a bad practice that could lead to conflicts with updates or with other modules. I think there are other ways to extend the core functionalities like done in some modules on OCA/social and OCA/web.

Mail_to - mail.utils

I wanted to see how to "mail_to" is working so I installed this and "mail_base" but it's not working. In the console is everything ok but in browser console is an error that module can not be loaded and that "mail.utils" is missing dependency. What should I do to make it work?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

[10.0] Error unsubscribing from a channel or closing a chat (instant messages)

After installing module mail_archives, trying to unsubscribe from a channel or closing a chatter window (instant messages in the discuss menu) following errore appears:

Uncaught ReferenceError: remove_channel is not defined
https://xxxxxxxxx/web/content/399-74b3eea/web.assets_backend.js:3197
Traceback:
ReferenceError: remove_channel is not defined
    at Class.on_partner_notification (https://xxxxxxxxx/web/content/399-74b3eea/web.assets_backend.js:3197:1)
    at https://xxxxxxxxx/web/content/399-74b3eea/web.assets_backend.js:3195:324
    at Function._.each._.forEach (https://xxxxxxxxx/web/content/391-937aad0/web.assets_common.js:12:558)
    at Class.on_notification (https://xxxxxxxxx/web/content/399-74b3eea/web.assets_backend.js:3195:3)
    at Class.<anonymous> (https://xxxxxxxxx/web/content/399-74b3eea/web.assets_backend.js:3215:608)
    at Class.trigger (https://xxxxxxxxx/web/content/391-937aad0/web.assets_common.js:3099:180)
    at Class.trigger (https://xxxxxxxxx/web/content/391-937aad0/web.assets_common.js:3103:148)
    at Class.on_notification (https://xxxxxxxxx/web/content/399-74b3eea/web.assets_backend.js:2890:45)
    at Class.on_notification (https://xxxxxxxxx/web/content/399-74b3eea/web.assets_backend.js:2893:474)
    at Class.prototype.(anonymous function) [as on_notification] (https://xxxxxxxxx/web/content/391-937aad0/web.assets_common.js:3010:559)

It seems there's a problem with mail_base addon, since the same problem occurs installing on a new DB also mail_all or mail_sent...
Need to logout and login again to gain access to discuss funztions (and see that unsubscription effectively worked)... Uninstalling the modules, the problem persists...
Sorry for not being able to give some more help in solving this issue (i'm not a developer)...

[9.0 ENT] Modules Not Compatible with 9.0e

@yelizariev ,

I'm planning on deploying this modules for the Enterprise version, however it seems at present the modules are not compatible with enterprise Discuss and may require some view changes in order for the different sections to show up in Discuss.

Do you have any plans for making these mail-addons modules enterprise compatible, or would you be open to accept a PR for these changes?

[12.0] mail_sent, psycopg2.ProgrammingError: column mail_message

With the last update of Sentbox when trying to mark as done a planned activity the following error appears:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 23

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/fields.py", line 981, in get
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('mail.compose.message(23,).sent', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 23

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/fields.py", line 981, in get
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('mail.compose.message(23,).channel_ids', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/odoo/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/http.py", line 941, in call
return self.method(*args, **kw)
File "/opt/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/addons/calendar/models/mail_activity.py", line 34, in action_feedback
res = super(MailActivity, self).action_feedback(feedback)
File "/opt/odoo/addons/mail/models/mail_activity.py", line 374, in action_feedback
mail_activity_type_id=activity.activity_type_id.id,
File "/opt/odoo/addons/mail/models/mail_thread.py", line 2119, in message_post_with_view
record.message_post_with_template(False, **kwargs)
File "/opt/odoo/addons/mass_mailing/models/mail_thread.py", line 54, in message_post_with_template
return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs)
File "/opt/odoo/addons/mail/models/mail_thread.py", line 2146, in message_post_with_template
).create(kwargs)
File "</usr/local/lib/python3.6/dist-packages/decorator.py:decorator-gen-122>", line 2, in create
File "/opt/odoo/odoo/api.py", line 430, in _model_create_single
return create(self, arg)
File "/opt/odoo/addons/mail/models/mail_message.py", line 988, in create
message = super(Message, self).create(values)
File "</usr/local/lib/python3.6/dist-packages/decorator.py:decorator-gen-3>", line 2, in create
File "/opt/odoo/odoo/api.py", line 451, in _model_create_multi
return create(self, [arg])
File "/opt/odoo/odoo/models.py", line 3607, in create
self.recompute()
File "/opt/odoo/odoo/models.py", line 5270, in recompute
vals = {n: rec[n] for n in ns}
File "/opt/odoo/odoo/models.py", line 5270, in
vals = {n: rec[n] for n in ns}
File "/opt/odoo/odoo/models.py", line 5117, in getitem
return self._fields[key].get(self, type(self))
File "/opt/odoo/odoo/fields.py", line 985, in get
self.determine_value(record)
File "/opt/odoo/odoo/fields.py", line 1074, in determine_value
self.compute_value(recs)
File "/opt/odoo/odoo/fields.py", line 1052, in compute_value
self._compute_value(records)
File "/opt/odoo/odoo/fields.py", line 1043, in _compute_value
getattr(records, self.compute)()
File "/opt/odoo/mail-addons/mail_sent/models.py", line 23, in _compute_sent
len(r_sudo.channel_ids)
File "/opt/odoo/odoo/fields.py", line 985, in get
self.determine_value(record)
File "/opt/odoo/odoo/fields.py", line 1088, in determine_value
record._prefetch_field(self)
File "/opt/odoo/odoo/models.py", line 2836, in _prefetch_field
result = records.read([f.name for f in fs], load='_classic_write')
File "/opt/odoo/addons/mail/models/mail_message.py", line 1011, in read
return super(Message, self).read(fields=fields, load=load)
File "/opt/odoo/odoo/models.py", line 2774, in read
self._read_from_database(stored, inherited)
File "/opt/odoo/odoo/models.py", line 2935, in _read_from_database
field.read(fetched)
File "/opt/odoo/odoo/fields.py", line 2676, in read
records._cr.execute(query, where_params)
File "/opt/odoo/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/opt/odoo/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: column mail_message_mail_channel_rel.mail_compose_message_id does not exist
LINE 1: SELECT mail_message_mail_channel_rel.mail_compose_message_i...
^

Thanks,


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

[10.0]mail private context not properly set

Hi,
When using the original new message above objects, the default_is_private is not correctly set in the context causing a crash.
spectacle s30694

Using the sen internal message work perfectly

[10.0] mail_archives / web_base: error

I tried to use the mail_archives module on odoo v10, but there's a JS error appearing as soon as you click on archives :

TypeError: channel is undefined

http://localhost:8069/mail/static/src/js/client_action.js:408
Traceback:
set_channel@http://localhost:8069/mail/static/src/js/client_action.js:408:13
click .o_mail_chat_channel_item@http://localhost:8069/mail/static/src/js/client_action.js:92:13
proxy/<@http://localhost:8069/web/static/src/js/framework/widget.js:398:20
dispatch@http://localhost:8069/web/static/lib/jquery/jquery.js:4640:50
add/elemData.handle@http://localhost:8069/web/static/lib/jquery/jquery.js:4309:41

The reason for it, seems to come from web_base module, more exactly here :
https://github.com/it-projects-llc/mail-addons/blob/11.0/mail_base/static/lib/base.js#L14

As odoo doesn't have this class in v10, the module won't be loaded although it gets installed.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

[11.0] mail_base: TypeError: channel is undefined

Impacted versions: discovered in 11.0 while using the module mail_to (mail_base is a dependency)
Source: https://github.com/itpp-labs/mail-addons/tree/11.0/mail_base

How to reproduce:

  1. Create two users and write in direct messages from one to another
  2. Login as another user and get the following error
Error:
TypeError: channel is undefined

http://localhost/mail_base/static/lib/base.js:433
Traceback:
chat_manager.get_channel_cache@http://localhost/mail_base/static/lib/base.js:433:9
chat_manager.get_messages@http://localhost/mail_base/static/lib/base.js:979:42
open_chat/<@http://localhost/mail/static/src/js/window_manager.js:106:37
then/</</<@http://localhost/web/static/lib/jquery/jquery.js:3276:89
fire@http://localhost/web/static/lib/jquery/jquery.js:3119:58
add@http://localhost/web/static/lib/jquery/jquery.js:3165:53
then/</<@http://localhost/web/static/lib/jquery/jquery.js:3275:77
each@http://localhost/web/static/lib/jquery/jquery.js:383:58
then/<@http://localhost/web/static/lib/jquery/jquery.js:3272:56
Deferred@http://localhost/web/static/lib/jquery/jquery.js:3332:30
then@http://localhost/web/static/lib/jquery/jquery.js:3271:55
open_chat@http://localhost/mail/static/src/js/window_manager.js:104:14
trigger@http://localhost/web/static/src/js/core/mixins.js:226:31
trigger@http://localhost/web/static/src/js/core/mixins.js:330:42
add_channel@http://localhost/mail/static/src/js/chat_manager.js:285:30
_.forEach@http://localhost/web/static/lib/underscore/underscore.js:145:17
_onMailClientAction/<@http://localhost/mail/static/src/js/chat_manager.js:677:15
_.forEach@http://localhost/web/static/lib/underscore/underscore.js:150:17
_onMailClientAction@http://localhost/mail/static/src/js/chat_manager.js:676:11
then/</</<@http://localhost/web/static/lib/jquery/jquery.js:3276:89
fire@http://localhost/web/static/lib/jquery/jquery.js:3119:58
fireWith@http://localhost/web/static/lib/jquery/jquery.js:3231:53
Deferred/</deferred[tuple[0]]@http://localhost/web/static/lib/jquery/jquery.js:3321:62
fire@http://localhost/web/static/lib/jquery/jquery.js:3119:58
fireWith@http://localhost/web/static/lib/jquery/jquery.js:3231:53
Deferred/</deferred[tuple[0]]@http://localhost/web/static/lib/jquery/jquery.js:3321:62
fire@http://localhost/web/static/lib/jquery/jquery.js:3119:58
fireWith@http://localhost/web/static/lib/jquery/jquery.js:3231:53
then/</</<@http://localhost/web/static/lib/jquery/jquery.js:3283:104
fire@http://localhost/web/static/lib/jquery/jquery.js:3119:58
fireWith@http://localhost/web/static/lib/jquery/jquery.js:3231:53
then/</</<@http://localhost/web/static/lib/jquery/jquery.js:3283:104
fire@http://localhost/web/static/lib/jquery/jquery.js:3119:58
fireWith@http://localhost/web/static/lib/jquery/jquery.js:3231:53
done@http://localhost/web/static/lib/jquery/jquery.js:9275:42
callback@http://localhost/web/static/lib/jquery/jquery.js:9685:65

Expected behavior:
don't get error

Scenarios for mail_base, mail_archive, mail_private

Scenarios

Check Inbox (Demo User)

  1. Click Mark all read
  2. All messages are disappeared with a rainbow sticker
    

Check Starred

  1. Go to Inbox and press the star
  2. This message appears in Starred
  3. Go to any channel
  4. Make the same step
  5. Click Unstar all
  6. All messages are disappeared

Check Archive

  1. All messages from Inbox, channels, Direct messages, Private channels appear in Archive

Check Direct messages

  1. Go to any channel
  2. Write to Demo User
  3. Demo User is created in Direct Messages

Check Private Channels

  1. Create Private Channel, 123 for example
  2. Invite Demo User
  3. Go to Demo User mode
  4. Check this Channel appears
  5. Unsubscribe
  6. Channel is disappeared in Demo user mode
  7. In Admin mode Demo User left # 123

mail_private scenario:
1 .Go to Discuss menu
2. Click on message from any partner and open his form
3. Write message "Hello"
4.Click on the button Send internal message
5. Choose recepients: Demo User, for example
6. Click on Send button
7. Log out
8. Log in as Demo User
9. Check Inbox and find message "Hello"
10. Repeat steps 3-7 for Demo User 2
11. Log in as Demo User
12. Open the same form
13. Check that Demo User didn't get private message adressed to Demo User2


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

[11.0] mail_reply

i <3 your modules. Thank you. Thats all, what i ever search :-)

Which support is necassary to port this module to 11.0 ?

regards
Axel

mail_base: AttributeError: 'module' object has no attribute 'bus'

When placing mail_base into addons and restart Odoo
I got this messege

2017-02-02 17:45:07,934 13667 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
application_iter = app(environ, start_response)
File "/media/akram/Data/projects/servers/Odoo/odoo10/odoo/service/server.py", line 246, in app
return self.app(e, s)
File "/media/akram/Data/projects/servers/Odoo/odoo10/odoo/service/wsgi_server.py", line 184, in application
return application_unproxied(environ, start_response)
File "/media/akram/Data/projects/servers/Odoo/odoo10/odoo/service/wsgi_server.py", line 170, in application_unproxied
result = handler(environ, start_response)
File "/media/akram/Data/projects/servers/Odoo/odoo10/odoo/http.py", line 1305, in call
self.load_addons()
File "/media/akram/Data/projects/servers/Odoo/odoo10/odoo/http.py", line 1326, in load_addons
m = import('odoo.addons.' + module)
File "/media/akram/Data/projects/servers/Odoo/odoo10/odoo/modules/module.py", line 81, in load_module
execfile(modfile, new_mod.dict)
File "/media/akram/Data/projects/servers/Odoo/addons/odoo10/mail_base/init.py", line 4, in
from . import controllers
File "/media/akram/Data/projects/servers/Odoo/addons/odoo10/mail_base/controllers/init.py", line 1, in
from . import main
File "/media/akram/Data/projects/servers/Odoo/addons/odoo10/mail_base/controllers/main.py", line 6, in
class MailChatController(odoo.addons.bus.controllers.main.BusController):
AttributeError: 'module' object has no attribute 'bus'

Odoo shows Error 500 and stops working

To fix this, I change the main.py to

from odoo.addons.bus.controllers.main import BusController

class MailChatController(BusController):

instead

import openerp.addons.bus.controllers.main.BusController

class MailChatController(openerp.addons.bus.controllers.main.BusController):

Tested on Odoo 10 Build 28/1/2017

Translate field

Hello,
I am trying to translate fields from this module in version 10. But Nothing works.
I have translated all fields that value are Send internal message or is_private. I also tried to create et po file but it isn't integrated my values.

Thank you for your help

Regards

[12.0] mail_sent: compute field issues

Computing field in descendant models

Odoo tries compute sent field in mail.compose.message which is inherited from mail.message. It may lead to error on module installation in case when there are records in mail.compose.message table. Possible solutions:

  1. add store=False here

sent = fields.Boolean("Sent", help="dummy field to fix inherit error")

  1. check self._model in compute method to avoid computing in non-mail.message models

    def _compute_sent(self):
    for r in self:
    r_sudo = r.sudo()
    recipient_ids = r_sudo.partner_ids
    author_id = r_sudo.author_id
    res_id = (
    r_sudo.model
    and r_sudo.res_id
    and r_sudo.env[r_sudo.model].browse(r_sudo.res_id)
    )
    sent = author_id and (
    len(recipient_ids) > 1
    or (len(recipient_ids) == 1 and recipient_ids[0].id != author_id.id)
    or (len(r_sudo.channel_ids))
    or (res_id and len(res_id.message_partner_ids - author_id) > 0)
    )
    r.sent = sent

  2. set field to store=False and use search=... instead

What ever solution must have a automatic test (idea: create mail.compose.message record) or steps for manual reproducing the problem (Idea: try to sent message via Composer before module installation)

Long installation time

Field computing is not optimal and leads to delay on installation (we have an example 1 000 000 records in mail.message model). Possible solutions:

  1. The same as p.3 from previous section

  2. optimize _compute_sent to compute sent for multiple records at once

  3. Compute sent via SQL request on installation:

extend _auto_init method and add something like below (see here for understanding)

columns = tools.table_columns(cr, self._table)
field = self._fields['sent']
new = field.update_db(self, columns)
if new:
    # EXECUTE SQL REQUEST HERE TO COMPUTE sent FIELD

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.