Browse Source

Corrected Send a message and check ignore_search_model parameter

pull/3/head
x620 9 years ago
parent
commit
5177ae31c2
  1. 2
      res_partner_mails_count/static/src/js/main.js
  2. 4
      res_partner_mails_count/templates.xml

2
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);
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