Browse Source

Merge pull request #30 from x620/mail-addons-8.0-res_partner_mails_count

Mail addons 8.0 res partner mails count
pull/3/head
Ivan Yelizariev 9 years ago
parent
commit
6e8a41eb5e
  1. 16
      res_partner_mails_count/README.rst
  2. 4
      res_partner_mails_count/static/src/js/main.js
  3. 4
      res_partner_mails_count/templates.xml

16
res_partner_mails_count/README.rst

@ -0,0 +1,16 @@
Smart buttons for mails count
=============================
This module adds Smart buttons with "Mails from" and "Mails to" count of mails in the partner form.
Usage
-----
You can see Smart buttons "Mails from" and "Mails to" in the contact form in the Messaging/Contacts menu. If you click on these buttons, you can see list of corresponded mails. Click on the "Send a message" link to send mail to the partner.
Further information
-------------------
HTML Description: https://apps.odoo.com/apps/modules/8.0/res_partner_mails_count/
Tested on Odoo 8.0 5209f6d2f26a38f66c063f05d32a962974741f40

4
res_partner_mails_count/static/src/js/main.js

@ -2,7 +2,9 @@ openerp.res_partner_mails_count = function(instance){
instance.mail.Wall.include({
init: function(){
this._super.apply(this, arguments);
delete this.defaults.model;
if(this.context.ignore_search_model){
delete this.defaults.model;
}
}
});
};

4
res_partner_mails_count/templates.xml

@ -18,13 +18,13 @@
<xpath expr="//div[@name='buttons']" position="inside">
<button class="oe_inline oe_stat_button" type="action"
name="%(action_mails)d"
context="{'search_default_partner_ids': [active_id]}"
context="{'search_default_partner_ids': [active_id], 'default_model': 'res.partner', 'default_res_id': active_id}"
icon="fa-envelope">
<field string="Mails to" name="mails_to" widget="statinfo"/>
</button>
<button class="oe_inline oe_stat_button" type="action"
name="%(action_mails)d"
context="{'search_default_author_id': active_id}"
context="{'search_default_author_id': active_id, 'default_model': 'res.partner', 'default_res_id': active_id}"
icon="fa-envelope-o">
<field string="Mails from" name="mails_from" widget="statinfo"/>
</button>

Loading…
Cancel
Save