Merge lp:~openerp-dev/openobject-addons/trunk-bug-1187778-bth into lp:openobject-addons

Proposed by Bhumi Thakkar (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1187778-bth
Merge into: lp:openobject-addons
Diff against target: 13 lines (+1/-2)
1 file modified
mail/static/src/js/mail_followers.js (+1/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1187778-bth
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+168388@code.launchpad.net

Description of the change

Hello,

  Fixed issue if reload whole page when click on subtype checkbox.
In latest trunk unnecessary requests are going when click on checkbox.
=> 'message_subscribe_users' of current model is called then
=> 'read' method of current model
=> 'read' method of 'res.partner' is called
=> 'message_get_subscription_data' of current model is called.

When click on checkbox no need to call read method of current model and res.partner model and also message_get_subscription_data method.

When click on checkbox user should be subscribed with that action. So just only call 'message_subscribe_users'.

To post a comment you must log in.

Unmerged revisions

8757. By Bhumi Thakkar (Open ERP)

[FIX] Fixed: No need to reload whole page when click on checkbox of subtype.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mail/static/src/js/mail_followers.js'
--- mail/static/src/js/mail_followers.js 2013-04-11 12:44:46 +0000
+++ mail/static/src/js/mail_followers.js 2013-06-10 09:22:31 +0000
@@ -269,8 +269,7 @@
269 }269 }
270 } else {270 } else {
271 var context = new session.web.CompoundContext(this.build_context(), {});271 var context = new session.web.CompoundContext(this.build_context(), {});
272 return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], checklist, context])272 return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], checklist, context]);
273 .then(this.proxy('read_value'));
274 }273 }
275 },274 },
276 });275 });

Subscribers

People subscribed via source and target branches

to all changes: