Merge lp:~openerp-dev/openobject-addons/7.0-opw-586534-msh into lp:openobject-addons/7.0

Proposed by Mohammed Shekha(Open ERP) on 2013-03-06
Status: Merged
Approved by: Naresh(OpenERP) on 2013-04-11
Approved revision: no longer in the source branch.
Merged at revision: 9210
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-586534-msh
Merge into: lp:openobject-addons/7.0
Diff against target: 23 lines (+3/-3)
1 file modified
share/static/src/js/share.js (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-586534-msh
Reviewer Review Type Date Requested Status
Olivier Dony (Odoo) Approve on 2013-06-06
Naresh(OpenERP) (community) 2013-03-06 Approve on 2013-04-11
Review via email:

Description of the change


Fixed the issue of context not passed call, due to which view strings are not translated.

Demo:- Go to any menu tree view, select any record and share that record(do this any other language than english), wizard is opened but string of wizard is not translated.

Reason: Context is not passed in method call.


To post a comment you must log in.
review: Approve
Olivier Dony (Odoo) (odo-openerp) wrote :

Looks good, but the addition of $.when() was not necessary as DataSet.create() always returns a Deferred, and the use of then() instead of done() was not necessary either (cfr the jQuery Deferred documentation).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/static/src/js/share.js'
2--- share/static/src/js/share.js 2012-12-15 16:28:57 +0000
3+++ share/static/src/js/share.js 2013-03-06 06:00:32 +0000
4@@ -16,7 +16,7 @@
5 domains: [domain],
6 contexts: [view.dataset.context]
7 }).done(function (result) {
8- Share.create({
9+ $.when(Share.create({
10 name:,
11 record_name: rec_name,
12 domain: result.domain,
13@@ -24,8 +24,8 @@
14 user_type: user_type || 'embedded',
15 view_type: view.fields_view.type,
16 invite: invite || false,
17- }).done(function(share_id) {
18- var step1 ='go_step_1', [[share_id]]).done(function(result) {
19+ })).then(function(share_id) {
20+ var step1 ='go_step_1', [[share_id], result.context]).done(function(result) {
21 var action = result;
22 self.do_action(action);
23 });