From 3fd509b634c0c817052244da22affbb7524c3d37 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 12 Nov 2012 10:59:41 +0100 Subject: [PATCH 01/52] [IMP] mail: change the counter of the need action menu when a message is read. Actually reload all the widget menu but we can upgrade and change the number only (less request) bzr revid: chm@openerp.com-20121112095941-yitxdd3dpjox4das --- addons/mail/static/src/js/mail.js | 36 +++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 7acebe9b1df..5832f10bebb 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -748,7 +748,13 @@ openerp.mail = function (session) { this.ds_notification.call('set_message_read', [ [this.id].concat( this.get_child_ids() ) , this.to_read, this.context]).then(function () { self.$el.removeClass(self.to_read ? 'oe_msg_unread':'oe_msg_read').addClass(self.to_read ? 'oe_msg_read':'oe_msg_unread'); self.to_read = !self.to_read; + // CHM note: put this function inside a check of display message after star/read... + // we can make a function for manualy set the counter (menu.needaction_counter) and don't reload all the widget menu + if( self.options._parents[0].__parentedParent.__parentedParent.get_menu_emails ) { + self.options._parents[0].__parentedParent.__parentedParent.get_menu_emails().widget.do_reload(); + } }); + return false; }, @@ -1556,10 +1562,10 @@ openerp.mail = function (session) { */ init: function (parent, action) { this._super(parent); - var options = action.params || {}; - this.options = options; - this.options.domain = options.domain || []; - this.options.context = options.context || {}; + this.action = action; + this.options = action.params; + this.options.domain = action.params.domain || []; + this.options.context = action.params.context || {}; this.search_results = {'domain': [], 'context': {}, 'groupby': {}} this.ds_msg = new session.web.DataSetSearch(this, 'mail.message'); }, @@ -1573,6 +1579,28 @@ openerp.mail = function (session) { return $.when(searchview_ready, thread_displayed); }, + /** + * crete an object "related_menu" + * contain the menu widget and the the sub menu related of this wall + */ + get_menu_emails: function () { + var self = this; + if (!this.related_menu) { + var menu = this.__parentedParent.__parentedParent.menu; + var sub_menu = _.filter(menu.data.data.children, function (val) {return val.id == 100;})[0]; + + var menu_active = false; + _.find(sub_menu.children, function (sub_menu) { + return _.find(sub_menu.children, function (sub_sub_menu) { + menu_active = sub_sub_menu; + return sub_sub_menu.id == self.action.menu_id; + }); + }); + this.related_menu = {'widget': menu, 'menu': menu_active}; + } + return this.related_menu; + }, + /** * Load the mail.message search view * @param {Object} defaults ?? From c6557b4089b9f204a1e64150e307359df57aa020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 12 Nov 2012 17:23:00 +0100 Subject: [PATCH 02/52] [IMP] Demo data, by CHM, taken from old branch, to clean history. bzr revid: tde@openerp.com-20121112162300-3whtwa78qaskpey8 --- addons/mail/data/mail_demo.xml | 101 +++++++++++++++++---------------- 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index f189b10650c..6bef4edc2db 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -7,6 +7,38 @@ none + + + Hello Demo User! I was wondering whether you had some issues with our secret task about putting cats everywhere in OpenERP. + comment + + + + + + No specific issues, I think everything is clear. + + comment + + + + + Ow, just to be sure... we were talking about lolcats, right ? + + comment + + + + + Absolutely! + + comment + + + + + + mail.group @@ -51,39 +83,6 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company - - - Hello Demo User! I was wondering whether you had some issues with our secret task about putting cats everywhere in OpenERP. - comment - - - - - - No specific issues, I think everything is clear. - - comment - - - - - - Ow, just to be sure... we were talking about lolcats, right ? - - comment - - - - - - Absolutely! - - comment - - - - - Plan to install OpenERP @@ -96,8 +95,10 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company Sophie email + + 2012-11-12 9:13:32 ir.attachment @@ -117,9 +118,10 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company comment - + - + + @@ -199,6 +201,7 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company + 2012-11-12 10:53:32 mail.group @@ -216,31 +219,31 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company - mail.group + res.partner + I changed the infrastructure of networks, if there are still changes to be made please do not hesitate to contact me. comment + + + 2012-11-12 9:49:32 + + + Thank you, the networks is perfect now ! Could you add a IP phone for Jhon ? + + comment + + 2012-11-12 10:09:32 - - mail.group - Thank you, the networks is perfect now ! Could you add a IP phone for Jhon ? + + It's right, his internal phone number is 0093 comment - - mail.group - It's right, his internal phone number is 0093 - - comment - - - - - From ac05be9f5823c32b76354b80b6e43c7df3010f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 12 Nov 2012 18:09:29 +0100 Subject: [PATCH 03/52] [IMP] mail: removed CSS on p, because of paragraphes used in chatter messages leading to ugly chatter. bzr revid: tde@openerp.com-20121112170929-36xtb03v8khvtnyx --- addons/mail/static/src/css/mail.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 1f90c75632f..1bef563d6ff 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -87,6 +87,10 @@ margin-bottom: 0px; margin-top: 2px; } +.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_body p{ + margin-top: 0px; + margin-bottom: 0px; +} /* a) Indented Messages */ From 206b015f8b8249e53da8c83ec62ed2503c56cb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 12 Nov 2012 18:09:56 +0100 Subject: [PATCH 04/52] [IMP] [DEMO] mail: Wip about demo data. No time enough today, will be continued asap. bzr revid: tde@openerp.com-20121112170956-o31nqximygax6is6 --- addons/mail/__openerp__.py | 5 +- addons/mail/data/mail_demo.xml | 55 ++++++++++---------- addons/mail/data/mail_group_data.xml | 17 +++---- addons/mail/data/mail_group_demo_data.xml | 62 +++++++++++++++++++++++ 4 files changed, 99 insertions(+), 40 deletions(-) create mode 100644 addons/mail/data/mail_group_demo_data.xml diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py index 9ad3232d396..c535e3f7024 100644 --- a/addons/mail/__openerp__.py +++ b/addons/mail/__openerp__.py @@ -65,7 +65,10 @@ Main Features 'mail_alias_view.xml', 'res_users_view.xml', ], - 'demo': ['data/mail_demo.xml'], + 'demo': [ + 'data/mail_demo.xml', + 'data/mail_group_demo_data.xml', + ], 'installable': True, 'auto_install': False, 'application': True, diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index 6bef4edc2db..ef4487d3336 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -1,11 +1,15 @@ - + + - + none + + none + @@ -35,78 +39,75 @@ comment - - mail.group - Your monthly meal vouchers arrived. You can get them at Christine's office. -This month you also get 250 EUR of eco-vouchers if you have been in the company for more than a year. + Your monthly meal vouchers arrived. You can get them at Christine's office.

]]>
comment +
mail.group - + Oh, I had forgotten. This month you also get 250 EUR of eco-vouchers if you have been in the company for more than a year.

]]>
comment +
mail.group - Thanks, but where is Christine's office, if I may ask? (I'm new here) + Thanks! Could you please remind me where is Christine's office, if I may ask? I'm new here!

]]>
comment +
mail.group - Building B3, second floor on the right :-) + Building B3, second floor on the right :-).

]]>
comment +
mail.group - Great news, I need to buy a new fridge, I think I can pay it with the eco-vouchers! + Many thanks. Actually that's good news, next year I'll have to buy a new fridge, I think I will pay it with the eco-vouchers!

]]>
comment +
- - + + Plan to install OpenERP mail.message - - <![CDATA[Email0 inquiry]]> - <div><font size="2">Hello,</font></div><div><font size="2"><br></font></div> - <div><font size="2">I am interested in your company's product and I plan to install OpenERP for my company and affordable price.</font></div><br/> - <div><font size="2">Can you please send me services catalogue?</font></div><br/> - Sophie - + Hello +I am interested in your company's product and I plan to install OpenERP for my company and affordable price. +Can you please send me services catalogue? +Sophie]]> email - + virginie@agrolait.fr - 2012-11-12 9:13:32 - - ir.attachment + bWlncmF0aW9uIHRlc3Q= catalogue 2012.pdf catalogue 2012.pdf - + Re: Plan to install OpenERP Dear Customer,<br/> @@ -117,11 +118,9 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company comment - + - - - + diff --git a/addons/mail/data/mail_group_data.xml b/addons/mail/data/mail_group_data.xml index 11d0ee7d04b..8d002e1ec64 100644 --- a/addons/mail/data/mail_group_data.xml +++ b/addons/mail/data/mail_group_data.xml @@ -1,15 +1,12 @@ - + + - - Sales - Discussion about best sales practices and deals. - Whole Company - Discussion about best sales practices and deals. + Discussion about the company. @@ -18,11 +15,9 @@ notification Welcome to OpenERP! - Your homepage is a summary of messages you received and key information about documents you follow. - -The top menu bar contains all applications you installed. You can use this <i>Settings</i> menu to install more applications, activate others features or give access to new users. - -To setup your preferences (name, email signature, avatar), click on the top right corner. + Your homepage is a summary of messages you received and key information about documents you follow.

+

The top menu bar contains all applications you installed. You can use this <i>Settings</i> menu to install more applications, activate others features or give access to new users.

+

To setup your preferences (name, email signature, avatar), click on the top right corner.

]]>
diff --git a/addons/mail/data/mail_group_demo_data.xml b/addons/mail/data/mail_group_demo_data.xml new file mode 100644 index 00000000000..c81df963d50 --- /dev/null +++ b/addons/mail/data/mail_group_demo_data.xml @@ -0,0 +1,62 @@ + + + + + + + Best Sales Practices + Discussion about best sales practices and deals. + + + + Board meetings + Board meetings and agenda + + + + RD + Research and development discussion group + + + + Leasing + Leasing, cars and fuel cards + + + + Support + Support team + + + + mail.group + + MESSAGE UNREAD

]]>
+ comment + +
+ + mail.group + + MESSAGE UNREAD

]]>
+ comment + +
+ + mail.group + + MESSAGE UNREAD LIKED

]]>
+ comment + +
+ + mail.group + + MESSAGE UNREAD LIKES

]]>
+ comment + +
+
+
+ + From cf4d660ce5e38063c2d1a08ebd457779c9805afb Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 13 Nov 2012 11:58:50 +0100 Subject: [PATCH 05/52] [FIX] mail: do not destroy double message if there are no message.id (for expandable message) bzr revid: chm@openerp.com-20121113105850-ur1h9igelvk4uzcj --- addons/mail/data/mail_demo.xml | 113 +++++++++++++++++------------- addons/mail/static/src/js/mail.js | 2 +- 2 files changed, 64 insertions(+), 51 deletions(-) diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index ef4487d3336..b64b0356dbe 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -133,56 +133,69 @@ Sophie]]>
ir.attachment - /9j/4AAQSkZJRgABAQEASABIAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkz - ODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2Nj - Y2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wAARCABkAGQDAREA - AhEBAxEB/8QAGgAAAwEBAQEAAAAAAAAAAAAAAAQFAwIBBv/EAD0QAAEDAgMDCAcHAwUAAAAAAAEA - AgMEEQUSsiExchMzNDVBUXFzIjJhkbGzwRQVJGKBwtElg6FCUlPh8P/EABoBAQADAQEBAAAAAAAA - AAAAAAADBAUBAgb/xAAwEQACAQIDBgYBBAMBAAAAAAAAAQIDBBEyMwUSMUFx8BMhNFGx0cEUgZGh - I0LhNf/aAAwDAQACEQMRAD8A+55QFzgA4lpsbDttf6qqoN8D0e5z/sf7l3w5HMQz/kd7k8OQxOJX - SOheIgWyFpDXFtwDbYV1U5DETLcVFwySnDQLNuHOO/Zc227LBevDGJ1kxE2DpYiA6+xrgSMzT3dw - d7wm4xiZtZiwLS+andZrb+g4XdcZuzdbNb22TcGINbi4YbzU7nZTuY7a6+zs3Af5HtTwxidPbihe - MksDWAvuCxxJF/R7O7f4puDE8DcVLiXSwZc7TZrHXDRa43du33puDEoZ/wAjvcvHhyGIZ/yO9yeH - IYgx4e27d1yP1BsvLWDwZ0Uyh9VVB2W4y5Mx2XLf+h7lIm1FYHBSsldTcoMk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y3JdsslUNB76EIR+RBw3LatyVSrk9QpaAJzWUPWd + B0zi1VkNbObGbGF6HyE6yRv2TuGj7/UQu+IaBTq7TrIOhHSBNY9PPGLoOmsZ+vBKQOIl8My05uDb + O1WR63FN74OlZFz8JXMmTfQLGZAPDeJjOFmZyeKi5hnC3upfvguj2XpIuNcinL/TXLn9/vLUpDNw + kxzLdwM111ZhJXPm0ixn3/rQxvK6Vd4vn//Z activity graph 2012.jpg activity graph 2012 diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index e214168cb25..a95ba1c14c8 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1255,7 +1255,7 @@ openerp.mail = function (session) { // check if the message is already create for (var i in self.messages) { - if (self.messages[i] && self.messages[i].id == message.id) { + if (message.id && self.messages[i] && self.messages[i].id == message.id) { console.log('Reload message', message.id); self.messages[i].destroy(); } From 2414585a14ea749a96893d42b70f03a34dc38bf6 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 13 Nov 2012 12:16:42 +0100 Subject: [PATCH 06/52] [IMP] mail: demo data bzr revid: chm@openerp.com-20121113111642-3ri3zbg07na1n3w9 --- addons/mail/data/mail_demo.xml | 44 ++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index b64b0356dbe..dcacf4f9fc5 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -93,14 +93,15 @@ Plan to install OpenERP mail.message - Hello -I am interested in your company's product and I plan to install OpenERP for my company and affordable price. -Can you please send me services catalogue? -Sophie]]> + Hello,
+I am interested in your company's product and I plan to install OpenERP for my company and affordable price.
+Can you please send me services catalogue?
+Virginie

]]>
email virginie@agrolait.fr +
bWlncmF0aW9uIHRlc3Q= @@ -109,13 +110,13 @@ Sophie]]>
Re: Plan to install OpenERP - - Dear Customer,<br/> - Thanks for showing interest in our products.<br/> - We have attached the catalogue,<br/> - We would like to know your interests, so let us know when we can call you for more details.<br/> + + Thanks for showing interest in our products.
+ We have attached the catalogue,
+ We would like to know your interests, so let us know when we can call you for more details.
Regards -
+ ]]>
comment @@ -202,30 +203,31 @@ Sophie]]>
mail.group - - Hi,<br/> - The beta OpenERP 7 is scheduled for November 12.<br/> - You will find attached the document for migration from version 6 to 7, and the activity graph for the current year. Good reading.<br/> + + The beta OpenERP 7 is scheduled for November 12.
+ You will find attached the document for migration from version 6 to 7, and the activity graph for the current year. Good reading.
Sincerely -
+ ]]>
comment - + 2012-11-12 10:53:32
mail.group - - Thank you,<br/> - Could you prepare and send us also the document for version 7.1 which will come soon?<br/> + + Could you prepare and send us also the document for version 7.1 which will come soon?
Sincerely -
+ ]]>
comment - + +
From b8f7e37715f4c72d968ad2196fc645aa7f5ae647 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 13 Nov 2012 13:56:51 +0100 Subject: [PATCH 07/52] [FIX] mail: openchatter reload message_ids for form view bzr revid: chm@openerp.com-20121113125651-cq67yb0g5n66ej55 --- addons/mail/static/src/js/mail.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index a95ba1c14c8..65f4a57473d 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1530,7 +1530,6 @@ openerp.mail = function (session) { 'display_indented_thread': -1, 'show_reply_button': false, 'show_read_unread_button': false, - 'show_compose_message': this.view.is_action_enabled('edit'), 'show_compact_message': 1, }, this.node.params); @@ -1556,9 +1555,10 @@ openerp.mail = function (session) { return; } - this.node.params = _.extend({ - 'message_ids': this.getParent().fields.message_ids ? this.getParent().fields.message_ids.get_value() : undefined, - }, this.node.params); + this.node.params = _.extend(this.node.params, { + 'message_ids': this.get_value(), + 'show_compose_message': this.view.is_action_enabled('edit'), + }); this.node.context = { 'default_res_id': this.view.datarecord.id || false, 'default_model': this.view.model || false, @@ -1571,7 +1571,6 @@ openerp.mail = function (session) { // create and render Thread widget this.root = new mail.Widget(this, _.extend(this.node, { 'domain' : (this.domain || []).concat([['model', '=', this.view.model], ['res_id', '=', this.view.datarecord.id]]), - })); return this.root.replace(this.$('.oe_mail-placeholder')); From 0f3845bee6a7dfdac381c8e096d606a6f08f28bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 13 Nov 2012 15:27:59 +0100 Subject: [PATCH 08/52] [FIX] [CLEAN] mail.js: removed references to mail.thread. There shouldnot have been any of them left... bzr revid: tde@openerp.com-20121113142759-wwhd3bssent1861a --- addons/mail/static/src/js/mail.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index f5d6941d96b..0d0cb9d0b31 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1003,10 +1003,7 @@ openerp.mail = function (session) { init: function (parent, datasets, options) { this._super(parent, options); this.domain = options.domain || []; - this.context = _.extend({ - default_model: 'mail.thread', - default_res_id: 0, - default_parent_id: false }, options.context || {}); + this.context = _.extend(options.context || {}); this.options = options.options; this.options.root_thread = (options.options.root_thread != undefined ? options.options.root_thread : this); @@ -1031,7 +1028,7 @@ openerp.mail = function (session) { // object compose message this.compose_message = false; - this.ds_thread = new session.web.DataSetSearch(this, this.context.default_model || 'mail.thread'); + this.ds_thread = new session.web.DataSetSearch(this, this.context.default_model); this.ds_message = new session.web.DataSetSearch(this, 'mail.message'); }, From 0c16b8b4fa96e4c04be679babe71f2edca450cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 13 Nov 2012 15:29:20 +0100 Subject: [PATCH 09/52] [IMP] better image preview in attachments bzr revid: fva@openerp.com-20121113142920-hojjecoz6x2vxuz4 --- addons/mail/static/src/css/mail.css | 17 ++++++++++------- addons/mail/static/src/xml/mail.xml | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 48b194cf08b..db53eef51d2 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -218,8 +218,8 @@ .openerp .oe_mail .oe_msg_attachment_list{ display: none; - margin-top: 12px; - margin-bottom: 12px; + margin-top: 4px; + margin-bottom: 4px; } .openerp .oe_mail .oe_msg_composer .oe_msg_attachment_list{ display: block; @@ -227,7 +227,7 @@ .openerp .oe_mail .oe_attachment{ display: inline-block; width: 100px; - margin: 2px; + margin: 4px 2px; min-height: 80px; position: relative; border-radius: 3px; @@ -240,7 +240,7 @@ padding: 1px 3px; margin-top: 50px; margin-bottom: 5px; - background: rgba(124, 123, 173, 0.13); + background: #F4F5FA; overflow: hidden; color: #4c4c4c; text-shadow: none; @@ -296,12 +296,13 @@ .openerp .oe_mail .oe_attachment.oe_preview .oe_name{ position: absolute; bottom: 0px; - margin: 0px; + margin: 3px; left: 0px; right: 0px; max-height: 64px; background: rgba(0,0,0,0.8); color: white; + border-radius: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; opacity: 0; @@ -330,9 +331,11 @@ position: relative; margin:0px; width: 100px; - height: 100px; - border-radius: 3px; + height: 80px; + border-radius: 1px; + border: solid 3px #FFF; margin-left: -50px; + box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.19); } .openerp .oe_mail .oe_attachment .oe_delete{ display: none; diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 2ba1733043a..7e394c8ccbb 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -84,7 +84,7 @@
- +
[
From b00a0ab7117f65fc59e66a7779441d60ceb9873c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 13 Nov 2012 15:54:53 +0100 Subject: [PATCH 10/52] [IMP] attachements are now always displayed bzr revid: fva@openerp.com-20121113145453-35v399hqgz201ndj --- addons/mail/static/src/css/mail.css | 1 - addons/mail/static/src/js/mail.js | 15 +-------------- addons/mail/static/src/xml/mail.xml | 7 ------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index db53eef51d2..1056b54927c 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -217,7 +217,6 @@ /* --------------------- ATTACHMENTS --------------------- */ .openerp .oe_mail .oe_msg_attachment_list{ - display: none; margin-top: 4px; margin-bottom: 4px; } diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 0d0cb9d0b31..e06e5fec4de 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -737,7 +737,7 @@ openerp.mail = function (session) { if(this.thread_level < this.options.display_indented_thread) { this.create_thread(); } - this.$('.oe_msg_attachments, .oe_msg_images').addClass("oe_hidden"); + this.display_attachments(); this.ds_notification = new session.web.DataSetSearch(this, 'mail.notification'); this.ds_message = new session.web.DataSetSearch(this, 'mail.message'); @@ -755,8 +755,6 @@ openerp.mail = function (session) { this.$('.oe_reply').on('click', this.on_message_reply); this.$('.oe_star').on('click', this.on_star); this.$('.oe_msg_vote').on('click', this.on_vote); - this.$('.oe_view_attachments').on('click', this.on_view_attachments); - }, /* Call the on_compose_message on the thread of this message. */ @@ -815,17 +813,6 @@ openerp.mail = function (session) { } }, - /* Call the on_compose_message on the thread of this message. */ - on_view_attachments:function (event) { - event.stopPropagation(); - var self = this; - if (!this.toggle_attachment) { - self.display_attachments(); - this.toggle_attachment = true; - } - this.$('.oe_msg_attachment_list').toggle(200); - }, - /** * Wait a confirmation for delete the message on the DB. * Make an animate destroy diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 7e394c8ccbb..ab371dfd358 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -217,13 +217,6 @@ • - - • - - 1 Attachment - Attachments - - •
From 62b376307b0607ca90674b1847ecdbfb658b59e4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 09:26:59 +0100 Subject: [PATCH 11/52] [IMP] mail: change the counter of the need action menu when a message is read. Actually reload all the widget menu but we can upgrade and change the number only (less request) bzr revid: chm@openerp.com-20121114082659-31vxgq5synhdpobl --- addons/mail/static/src/js/mail.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index e06e5fec4de..485b382d7c1 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -849,8 +849,8 @@ openerp.mail = function (session) { msg.renderElement(); msg.start(); } - if( self.options.root_thread.__parentedParent.__parentedParent.get_menu_emails ) { - self.options.root_thread.__parentedParent.__parentedParent.get_menu_emails().do_reload(); + if( self.options.root_thread.__parentedParent.__parentedParent.do_reload_menu_emails ) { + self.options.root_thread.__parentedParent.__parentedParent.do_reload_menu_emails(); } }); @@ -1623,14 +1623,17 @@ openerp.mail = function (session) { * crete an object "related_menu" * contain the menu widget and the the sub menu related of this wall */ - get_menu_emails: function () { - var self = this; - if (!this.related_menu) { - var menu = this.__parentedParent.__parentedParent.menu; - var sub_menu = _.filter(menu.data.data.children, function (val) {return val.id == 100;})[0]; - this.related_menu = menu; - } - return this.related_menu; + do_reload_menu_emails: function () { + var menu = this.__parentedParent.__parentedParent.menu; + return this.rpc("/web/menu/load", {'menu_id': 100}).done(function(r) { + _.each(menu.data.data.children, function (val) { + if (val.id == 100) { + val.children = _.find(r.data.children, function (r_val) {return r_val.id == 100;}).children; + } + }); + var r = menu.data; + menu.menu_loaded(r); + }); }, /** From 4a91e273a8c0ead6ca39255724b74b06e730eade Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 11:47:17 +0100 Subject: [PATCH 12/52] [IMP] mail: unactivate reload menu bzr revid: chm@openerp.com-20121114104717-zi5yl3knyhf7xgev --- addons/mail/static/src/js/mail.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 485b382d7c1..39d843b7e70 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1625,15 +1625,15 @@ openerp.mail = function (session) { */ do_reload_menu_emails: function () { var menu = this.__parentedParent.__parentedParent.menu; - return this.rpc("/web/menu/load", {'menu_id': 100}).done(function(r) { - _.each(menu.data.data.children, function (val) { - if (val.id == 100) { - val.children = _.find(r.data.children, function (r_val) {return r_val.id == 100;}).children; - } - }); - var r = menu.data; - menu.menu_loaded(r); - }); + // return this.rpc("/web/menu/load", {'menu_id': 100}).done(function(r) { + // _.each(menu.data.data.children, function (val) { + // if (val.id == 100) { + // val.children = _.find(r.data.children, function (r_val) {return r_val.id == 100;}).children; + // } + // }); + // var r = menu.data; + // menu.menu_loaded(r); + // }); }, /** From 758115c1a56a83d804b71e583073403decdc4ee4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 11:47:21 +0100 Subject: [PATCH 13/52] [IMP] mail: add date on messages for the datademo bzr revid: chm@openerp.com-20121114104721-8b5ajc21ii7cp8a2 --- addons/mail/data/mail_demo.xml | 55 ++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index dcacf4f9fc5..988c2cbdae1 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -49,6 +49,7 @@ comment + mail.group @@ -58,6 +59,7 @@ comment + mail.group @@ -67,6 +69,7 @@ comment + @@ -77,7 +80,8 @@ comment - + + mail.group @@ -87,29 +91,31 @@ comment + - Plan to install OpenERP + Plan to install servers mail.message Hello,
-I am interested in your company's product and I plan to install OpenERP for my company and affordable price.
+I am interested in your company's product and I plan to install 2 servers for my company.
Can you please send me services catalogue?
Virginie

]]>
email virginie@agrolait.fr - + +
- + - + ir.attachment bWlncmF0aW9uIHRlc3Q= migration.doc migration.doc - + ir.attachment /9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEP @@ -201,38 +208,39 @@ Virginie

]]>
activity graph 2012.jpg activity graph 2012
- + mail.group - The beta OpenERP 7 is scheduled for November 12.
- You will find attached the document for migration from version 6 to 7, and the activity graph for the current year. Good reading.
+ The next version of catalogue price list is scheduled for this next month.
+ You will find attached the catalogue and the activity graph for the current year. Good reading.
Sincerely ]]>
comment - + - 2012-11-12 10:53:32 +
- + mail.group - Could you prepare and send us also the document for version 7.1 which will come soon?
+ Could you add the price list of us services into this document ?
Sincerely ]]>
comment - + +
- + res.partner I changed the infrastructure of networks, if there are still changes to be made please do not hesitate to contact me. @@ -241,23 +249,26 @@ Virginie

]]>
2012-11-12 9:49:32 +
- + Thank you, the networks is perfect now ! Could you add a IP phone for Jhon ? - + comment 2012-11-12 10:09:32 + - + It's right, his internal phone number is 0093 - + comment + From a43662d1254dba1333cdc74bf01a3c7dcef76de7 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 13:20:33 +0100 Subject: [PATCH 14/52] [IMP] mail: change the header title and description for each mailbox and group discussion bzr revid: chm@openerp.com-20121114122033-dl70fqty2kbd5gj1 --- addons/mail/data/mail_demo.xml | 3 +-- addons/mail/mail_group.py | 1 + addons/mail/mail_group_view.xml | 11 +++++++++++ addons/mail/static/src/js/mail.js | 2 +- addons/mail/static/src/xml/mail.xml | 8 +++++++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index 988c2cbdae1..4866749cdae 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -80,7 +80,6 @@ comment - @@ -268,7 +267,7 @@ Virginie

]]>
- + diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index d4c9c565bf3..448d11230ba 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -133,6 +133,7 @@ class mail_group(osv.Model): 'context': {'default_model': 'mail.group', 'default_res_id': mail_group_id}, 'res_model': 'mail.message', 'thread_level': 1, + 'header_description': vals['description'], } cobj = self.pool.get('ir.actions.client') newref = cobj.copy(cr, SUPERUSER_ID, ref[1], default={'params': str(params), 'name': vals['name']}, context=context) diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index 214f6edf571..3f931327114 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -6,6 +6,17 @@ Discussion Group mail.wall mail.message + { + 'search_default_message_unread': True + } + { + 'read_action': 'read' + } + +

+ No message in this group. +

+
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 39d843b7e70..6cd7c576781 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1591,7 +1591,7 @@ openerp.mail = function (session) { this.action = _.clone(action); this.domain = this.action.params.domain || this.action.domain || []; - this.context = this.action.params.context || this.action.context || {}; + this.context = _.extend(this.action.params.context || {}, this.action.context || {}); this.defaults = {}; for (var key in this.context) { diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index ab371dfd358..2b9db8f195f 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -137,9 +137,15 @@

- Email box +

+ +
+ + + +
I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.
Can you please send me product catalogue?
+ ]]>
email @@ -557,12 +557,11 @@ Andrew
crm.lead comment - Dear Customer, -Thanks for showing interest in our products. -We have attached the catalogue, -We would like to know your interests, so let us know when we can call you for more details. - -Regards + +Thanks for showing interest in our products.
+We have attached the catalogue,
+We would like to know your interests, so let us know when we can call you for more details.
+Regards]]>
@@ -572,7 +571,7 @@ Regards comment <div>Thanks for the information,</div><div>I will visit the store soon.</div> - + @@ -581,7 +580,7 @@ Regards comment <font color="#1f1f1f">Can you tell me if the store is open at 9:00 PM?</b></font> - + @@ -590,7 +589,10 @@ Regards Yes, its open till 10:00 PM, you are welcome! email + + + Inquiry diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index c7891efb51b..4ba223f6c45 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -70,7 +70,6 @@ - mail.group diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 2b9db8f195f..deab58eca00 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -206,13 +206,11 @@
-

- +

+ +

- - -

From 7fc4f67e4ce95e5817f1a48e2ad1f2c4b0ec33e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 14 Nov 2012 14:43:56 +0100 Subject: [PATCH 17/52] [FIX] mail.group: fixed a description key not always present in mail.group creation. bzr revid: tde@openerp.com-20121114134356-5lbdx1tciw8tz2w0 --- addons/mail/mail_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index 448d11230ba..73e808daac3 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -133,7 +133,7 @@ class mail_group(osv.Model): 'context': {'default_model': 'mail.group', 'default_res_id': mail_group_id}, 'res_model': 'mail.message', 'thread_level': 1, - 'header_description': vals['description'], + 'header_description': vals.get('description'), } cobj = self.pool.get('ir.actions.client') newref = cobj.copy(cr, SUPERUSER_ID, ref[1], default={'params': str(params), 'name': vals['name']}, context=context) From 4011dd8760975bc55ca30ae1b4b68c210d7a3e7b Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 15:19:36 +0100 Subject: [PATCH 18/52] [FIX] mail_follower: clear the subtype_list when reload (delete double value) bzr revid: chm@openerp.com-20121114141936-atyfapg9qia3avsc --- addons/crm/crm_lead_demo.xml | 9 +++++---- addons/mail/static/src/js/mail_followers.js | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml index 26306edbaa6..5dde8f2ce3d 100644 --- a/addons/crm/crm_lead_demo.xml +++ b/addons/crm/crm_lead_demo.xml @@ -551,6 +551,7 @@ Andrew
Hello,
I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.
Can you please send me product catalogue?
]]> email + Re: Plan to buy a Laptop @@ -563,7 +564,7 @@ We have attached the catalogue,
We would like to know your interests, so let us know when we can call you for more details.
Regards]]>
- + Re: Plan to buy a Laptop @@ -572,7 +573,7 @@ Regards]]> comment <div>Thanks for the information,</div><div>I will visit the store soon.</div> - + Re: Plan to buy a Laptop @@ -581,7 +582,7 @@ Regards]]> comment <font color="#1f1f1f">Can you tell me if the store is open at 9:00 PM?</b></font> - + Re: Plan to buy a Laptop @@ -590,7 +591,7 @@ Regards]]> Yes, its open till 10:00 PM, you are welcome! email - + diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 7bb019cde4f..d299b9eb6f6 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -194,6 +194,7 @@ openerp_mail_followers = function(session, mail) { display_subtypes:function (data) { var self = this; var subtype_list_ul = this.$('.oe_subtype_list'); + subtype_list_ul.empty(); var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data; _(records).each(function (record, record_name) { record.name = record_name; From 52349a7525af50f978691d389bd41d397bd69e53 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 16:00:47 +0100 Subject: [PATCH 19/52] [IMP] mail and crm: demodata for search (has attachment) and expandable bzr revid: chm@openerp.com-20121114150047-f2d30euntwjurnt4 --- addons/mail/data/mail_demo.xml | 97 +++++++++++++++++++++-- addons/mail/data/mail_group_demo_data.xml | 29 ------- 2 files changed, 91 insertions(+), 35 deletions(-) diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index 4ba223f6c45..08cf45bffd4 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -10,8 +10,86 @@ none + + + bWlncmF0aW9uIHRlc3Q= + my_attachment.xls + my_attachment.xls + + + mail.thread + Comment with attachment + Demo data with attachment and others messages + comment + + + + + + + mail.thread + MESSAGE

]]>
+ comment + + + + +
+ + mail.thread + MESSAGE

]]>
+ comment + + + + +
+ + mail.thread + MESSAGE

]]>
+ comment + + + + +
+ + mail.thread + MESSAGE

]]>
+ comment + + + + +
+ + bWlncmF0aW9uIHRlc3Q= + my_other_attachment.ai + my_other_attachment.ai + + + mail.thread + MESSAGE

]]>
+ comment + + + + + +
+ + mail.thread + MESSAGE

]]>
+ comment + + + + +
+ + mail.thread Hello Demo User! I was wondering whether you had some issues with our secret task about putting cats everywhere in OpenERP. comment @@ -19,6 +97,7 @@ + mail.thread No specific issues, I think everything is clear. comment @@ -26,6 +105,7 @@ + mail.thread Ow, just to be sure... we were talking about lolcats, right ? comment @@ -93,12 +173,13 @@ + mail.thread Plan to install servers - mail.message Hello,
-I am interested in your company's product and I plan to install 2 servers for my company.
-Can you please send me services catalogue?
-Virginie

]]>
+ I am interested in your company's product and I plan to install 2 servers for my company.
+ Can you please send me services catalogue?
+ Virginie

+ ]]>
email virginie@agrolait.fr @@ -106,10 +187,12 @@ Virginie

]]>
+ + From b581043859bc402e778d1426233154906584f834 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 16:53:25 +0100 Subject: [PATCH 22/52] [FIX] mail: expandable insert after bzr revid: chm@openerp.com-20121114155325-kuqyke9hcfmb0yyb --- addons/mail/static/src/js/mail.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index fb0634a606d..006f9529272 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -599,10 +599,10 @@ openerp.mail = function (session) { this.parent_thread.context ]).done(function (record) { var thread = self.parent_thread; - if (self.options.display_indented_thread < self.thread_level && thread.parent_message) { - var hread = thread.parent_message.parent_thread; - } var root = thread == self.options.root_thread; + if (self.options.display_indented_thread < self.thread_level && thread.parent_message) { + var thread = thread.parent_message.parent_thread; + } // create object and attach to the thread object thread.message_fetch([['id', 'child_of', [self.id]]], false, [record], function (arg, data) { var message = thread.create_message_object( data[0] ); @@ -1268,10 +1268,9 @@ openerp.mail = function (session) { this.$('.oe_view_nocontent').remove(); - if (dom_insert_after) { message.insertAfter(dom_insert_after); - }if (prepend) { + } else if (prepend) { message.prependTo(self.$el); } else { message.appendTo(self.$el); From 3c8f8915b227fc4f7e8fa519d7240941c4029f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 14 Nov 2012 16:58:10 +0100 Subject: [PATCH 23/52] [FIX] mail: expandables: expandable was placed at a wrong place in the message list. bzr revid: tde@openerp.com-20121114155810-q284caaual2sk8ka --- addons/mail/mail_message.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 9fd476d9d7f..e7288a46853 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -377,7 +377,9 @@ class mail_message(osv.Model): id_max = child_id elif nb > 0: exp_domain = [('id', '>=', id_min), ('id', '<=', id_max), ('id', 'child_of', message_id)] - messages.append(_get_expandable(exp_domain, nb, message_id, False)) + idx = [msg.get('id') for msg in messages].index(child_id) + 1 + # messages.append(_get_expandable(exp_domain, nb, message_id, False)) + messages.insert(idx, _get_expandable(exp_domain, nb, message_id, False)) id_min, id_max, nb = max(child_ids), 0, 0 else: id_min, id_max, nb = max(child_ids), 0, 0 From b387836284c86d1e976487a7638d2a821459614e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 14 Nov 2012 17:30:07 +0100 Subject: [PATCH 24/52] [IMP] mail.group: updating the descrpition, also update the description in the params of the client action related to the mail group. bzr revid: tde@openerp.com-20121114163007-91z50xmkepnc436l --- addons/mail/mail_group.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index 73e808daac3..c589b54d4f9 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -114,7 +114,7 @@ class mail_group(osv.Model): alias_id = mail_alias.create_unique_alias(cr, uid, # Using '+' allows using subaddressing for those who don't # have a catchall domain setup. - {'alias_name': "group+"+vals['name']}, + {'alias_name': "group+" + vals['name']}, model_name=self._name, context=context) vals['alias_id'] = alias_id @@ -161,6 +161,13 @@ class mail_group(osv.Model): result = super(mail_group, self).write(cr, uid, ids, vals, context=context) if vals.get('group_ids'): self._subscribe_users(cr, uid, ids, context=context) + # if description is changed: update client action + if vals.get('description'): + cobj = self.pool.get('ir.actions.client') + for action in [group.action for group in self.browse(cr, SUPERUSER_ID, ids, context=context) if group.action]: + new_params = action.params + new_params['header_description'] = vals.get('description') + cobj.write(cr, SUPERUSER_ID, [action.id], {'params': str(new_params)}, context=context) return result def action_follow(self, cr, uid, ids, context=None): From 3f655858d89b6910c24fa3dbc8a85adcc20a8046 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 15 Nov 2012 11:05:42 +0100 Subject: [PATCH 25/52] [IMP] mail: the placeholder of textarea on compose message can be custom with an attribute placeholder on the field bzr revid: chm@openerp.com-20121115100542-7gigxjnxjloqt8ue --- addons/mail/static/src/js/mail.js | 7 ++++++- addons/mail/static/src/xml/mail.xml | 13 ++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 006f9529272..7d874a8d1fe 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1231,6 +1231,7 @@ openerp.mail = function (session) { 'default_parent_id': self.id, }}); } else { + data.record_name= (data.record_name != '' && data.record_name) || (self.parent_message && self.parent_message.record_name); var message = new mail.ThreadMessage(self, data, {'context':{ 'default_model': data.model, 'default_res_id': data.res_id, @@ -1447,6 +1448,7 @@ openerp.mail = function (session) { 'show_record_name' : false, 'show_compose_message' : false, 'show_compact_message' : false, + 'compose_placeholder': false, 'view_inbox': false, 'message_ids': undefined, }, this.action.params); @@ -1511,7 +1513,6 @@ openerp.mail = function (session) { init: function (parent, node) { this._super.apply(this, arguments); this.node = _.clone(node); - this.node.params = _.extend({ 'display_indented_thread': -1, 'show_reply_button': false, @@ -1520,6 +1521,10 @@ openerp.mail = function (session) { 'show_compact_message': 1, }, this.node.params); + if (this.node.attrs.placeholder) { + this.node.params.compose_placeholder = this.node.attrs.placeholder; + } + this.domain = this.node.params && this.node.params.domain || []; }, diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index deab58eca00..f4518dc6fa7 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -39,8 +39,9 @@
-