Browse Source

Merge branch '9.0-res_partner_mails_count' of https://github.com/x620/mail-addons into 9.0-mail_reply

pull/21/head
x620 9 years ago
parent
commit
2b1d2ff5d7
  1. 2
      mail_archives/__openerp__.py
  2. 2
      mail_archives/static/description/index.html
  3. 15
      mail_archives/static/src/js/archives.js
  4. 2
      mail_base/__openerp__.py
  5. 10
      mail_base/static/src/js/base.js
  6. 2
      mail_fix_553/README.rst
  7. 5
      mail_fix_553/data.xml
  8. 3
      mail_fix_553/mail_fix_553.py
  9. 2
      mail_sent/__openerp__.py
  10. 10
      mail_sent/static/src/js/sent.js
  11. 4
      mail_to/__openerp__.py
  12. 2
      res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js

2
mail_archives/__openerp__.py

@ -13,7 +13,7 @@
'currency': 'EUR', 'currency': 'EUR',
"depends": [ "depends": [
"mail_sent",
"mail_base",
], ],
"data": [ "data": [

2
mail_archives/static/description/index.html

@ -21,7 +21,7 @@
<div class="oe_row oe_spaced"> <div class="oe_row oe_spaced">
<div class="oe_span12"> <div class="oe_span12">
<p class="oe_mt32"> <p class="oe_mt32">
This menu shows all messages.
This menu shows archive messages, i.e. ones you sent or received.
</p> </p>
</div> </div>
<div class="oe_row_img oe_centered"> <div class="oe_row_img oe_centered">

15
mail_archives/static/src/js/archives.js

@ -18,10 +18,11 @@ var _lt = core._lt;
var ChatAction = core.action_registry.get('mail.chat.instant_messaging'); var ChatAction = core.action_registry.get('mail.chat.instant_messaging');
ChatAction.include({ ChatAction.include({
get_thread_rendering_options: function (messages) {
var options = this._super.apply(this, arguments);
options.display_subject = options.display_subject || this.channel.id === "channel_archive";
return options;
init: function(parent, action, options) {
this._super.apply(this, arguments);
var channel_name = 'channel_archive';
// Add channel Archive for enable "display_subject" option
this.channels_display_subject.push(channel_name);
} }
}); });
@ -42,10 +43,7 @@ base_obj.MailTools.include({
} }
// If author or recipient // If author or recipient
if (
(data.sent && data.author_id[0] == session.partner_id)
|| (recipients_ids.indexOf(session.partner_id) != -1)
) {
if (data.author_id[0] == session.partner_id || recipients_ids.indexOf(session.partner_id) != -1) {
msg.is_archive = true; msg.is_archive = true;
} }
@ -60,7 +58,6 @@ base_obj.MailTools.include({
get_domain: function(channel){ get_domain: function(channel){
return (channel.id === "channel_archive") ? [ return (channel.id === "channel_archive") ? [
'|', ['partner_ids', 'in', [openerp.session.partner_id]], '|', ['partner_ids', 'in', [openerp.session.partner_id]],
'&', ['sent', '=', true],
['author_id.user_ids', 'in', [openerp.session.uid]] ['author_id.user_ids', 'in', [openerp.session.uid]]
] : this._super.apply(this, arguments); ] : this._super.apply(this, arguments);
} }

2
mail_base/__openerp__.py

@ -9,6 +9,8 @@
"author": "IT-Projects LLC, Pavel Romanchenko", "author": "IT-Projects LLC, Pavel Romanchenko",
"website": "https://it-projects.info", "website": "https://it-projects.info",
"license": "LGPL-3", "license": "LGPL-3",
'price': 9.00,
'currency': 'EUR',
"depends": [ "depends": [
"base", "base",

10
mail_base/static/src/js/base.js

@ -65,7 +65,8 @@ var ChatAction = core.action_registry.get('mail.chat.instant_messaging');
ChatAction.include({ ChatAction.include({
init: function(parent, action, options) { init: function(parent, action, options) {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.show_send_message_button = ['channel_inbox'];
this.channels_show_send_button = ['channel_inbox'];
this.channels_display_subject = [];
}, },
start: function() { start: function() {
var result = this._super.apply(this, arguments); var result = this._super.apply(this, arguments);
@ -104,8 +105,13 @@ ChatAction.include({
return $.when(result).done(function() { return $.when(result).done(function() {
self.$buttons self.$buttons
.find('.o_mail_chat_button_new_message') .find('.o_mail_chat_button_new_message')
.toggle(self.show_send_message_button.indexOf(channel.id) != -1);
.toggle(self.channels_show_send_button.indexOf(channel.id) != -1);
}); });
},
get_thread_rendering_options: function (messages) {
var options = this._super.apply(this, arguments);
options.display_subject = options.display_subject || this.channels_display_subject.indexOf(this.channel.id) != -1;
return options;
} }
}); });

2
mail_fix_553/README.rst

@ -19,6 +19,8 @@ Configuration
You can configure default alias at Settings -> System Parameters -> mail.catchall.alias_from You can configure default alias at Settings -> System Parameters -> mail.catchall.alias_from
You can configure name for default alias at Settings -> System Parameters -> mail.catchall.name_alias_from
Known issues / Roadmap Known issues / Roadmap
====================== ======================

5
mail_fix_553/data.xml

@ -6,5 +6,10 @@
<field name="key">mail.catchall.alias_from</field> <field name="key">mail.catchall.alias_from</field>
<field name="value">portal</field> <field name="value">portal</field>
</record> </record>
<!-- Name for Catchall Email Alias -->
<record id="icp_mail_catchall_name_alias_from" model="ir.config_parameter">
<field name="key">mail.catchall.name_alias_from</field>
<field name="value">Odoo</field>
</record>
</data> </data>
</openerp> </openerp>

3
mail_fix_553/mail_fix_553.py

@ -38,6 +38,7 @@ class mail_mail(osv.Model):
# NEW STUFF # NEW STUFF
catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias_from", context=context) catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias_from", context=context)
catchall_alias_name = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.name_alias_from", context=context)
catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context)
correct_email_from = '@%s>?\s*$'%catchall_domain correct_email_from = '@%s>?\s*$'%catchall_domain
@ -101,6 +102,8 @@ class mail_mail(osv.Model):
email_from = mail.email_from email_from = mail.email_from
if re.search(correct_email_from, email_from) is None: if re.search(correct_email_from, email_from) is None:
email_from = default_email_from email_from = default_email_from
if catchall_alias_name:
email_from = formataddr((catchall_alias_name, email_from))
msg = ir_mail_server.build_email( msg = ir_mail_server.build_email(
email_from=email_from, # NEW STUFF email_from=email_from, # NEW STUFF

2
mail_sent/__openerp__.py

@ -9,7 +9,7 @@
"author": "IT-Projects LLC, Ivan Yelizariev, Pavel Romanchenko", "author": "IT-Projects LLC, Ivan Yelizariev, Pavel Romanchenko",
"website": "https://it-projects.info", "website": "https://it-projects.info",
"license": "LGPL-3", "license": "LGPL-3",
'price': 9.00,
'price': 40.00,
'currency': 'EUR', 'currency': 'EUR',
"depends": [ "depends": [

10
mail_sent/static/src/js/sent.js

@ -20,13 +20,11 @@ var ChatAction = core.action_registry.get('mail.chat.instant_messaging');
ChatAction.include({ ChatAction.include({
init: function(parent, action, options) { init: function(parent, action, options) {
this._super.apply(this, arguments); this._super.apply(this, arguments);
var channel_name = 'channel_sent';
// Add channel Sent for show "Send message" button // Add channel Sent for show "Send message" button
this.show_send_message_button.push('channel_sent');
},
get_thread_rendering_options: function (messages) {
var options = this._super.apply(this, arguments);
options.display_subject = options.display_subject || this.channel.id === "channel_sent";
return options;
this.channels_show_send_button.push(channel_name);
// Add channel Sent for enable "display_subject" option
this.channels_display_subject.push(channel_name);
} }
}); });

4
mail_to/__openerp__.py

@ -9,8 +9,8 @@
"author": "IT-Projects LLC, Pavel Romanchenko", "author": "IT-Projects LLC, Pavel Romanchenko",
"website": "https://it-projects.info", "website": "https://it-projects.info",
"license": "LGPL-3", "license": "LGPL-3",
#"price": 9.00,
#"currency": "EUR",
"price": 40.00,
"currency": "EUR",
"depends": [ "depends": [
'mail_base', 'mail_base',

2
res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js

@ -8,7 +8,7 @@ odoo.define('res_partner_mails_count.res_partner_mails_count_tour', function (re
id: 'mails_count_tour', id: 'mails_count_tour',
name: _t("Mails count Tour"), name: _t("Mails count Tour"),
mode: 'test', mode: 'test',
path: '/web?&res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner',
path: '/web?res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner',
steps: [ steps: [
{ {
title: _t("Mails count tutorial"), title: _t("Mails count tutorial"),

Loading…
Cancel
Save