Merge lp:~openerp-dev/openerp-web/trunk-bug-901579-bth into lp:openerp-web

Proposed by Bhumi Thakkar (Open ERP)
Status: Merged
Merge reported by: Fabien Meghazi (OpenERP)
Merged at revision: not available
Proposed branch: lp:~openerp-dev/openerp-web/trunk-bug-901579-bth
Merge into: lp:openerp-web
Diff against target: 85 lines (+16/-5)
5 files modified
addons/web/common/http.py (+1/-1)
addons/web_mobile/static/src/js/form_mobile.js (+5/-1)
addons/web_mobile/static/src/js/list_mobile.js (+5/-1)
addons/web_mobile/static/src/web_mobile.html (+4/-1)
addons/web_mobile/static/src/xml/web_mobile.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-bug-901579-bth
Reviewer Review Type Date Requested Status
OpenERP R&D Web Team Pending
Review via email: mp+85635@code.launchpad.net

Description of the change

Hello,

I have modify the statement.

Thanks,
Bhumi Thakkar

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/common/http.py'
2--- addons/web/common/http.py 2011-11-22 05:18:03 +0000
3+++ addons/web/common/http.py 2011-12-14 11:11:18 +0000
4@@ -406,7 +406,7 @@
5 params = urllib.urlencode(request.args)
6 return werkzeug.utils.redirect(self.root + '?' + params, 301)(
7 environ, start_response)
8- elif request.path == '/mobile' or ('#' in request.path):
9+ elif request.path == '/mobile':
10 return werkzeug.utils.redirect(
11 '/web_mobile/static/src/web_mobile.html', 301)(environ, start_response)
12
13
14=== modified file 'addons/web_mobile/static/src/js/form_mobile.js'
15--- addons/web_mobile/static/src/js/form_mobile.js 2011-12-01 11:26:58 +0000
16+++ addons/web_mobile/static/src/js/form_mobile.js 2011-12-14 11:11:18 +0000
17@@ -68,12 +68,16 @@
18 var rel_ids = values[relational];
19 var head = rel_field.string;
20 if (rel_ids) {
21+ var list_ids = [];
22 var datasearch = new openerp.web.DataSetSearch(self, rel_field.relation, rel_field.context);
23 datasearch.domain=[['id', 'in', rel_ids]];
24 datasearch.read_slice(['name'], {context:rel_field.context, domain: datasearch.domain, limit:80}, function(listrec){
25+ _.each(listrec, function(i) {
26+ list_ids.push(i.id);
27+ });
28 _.extend(rel_field.context,{"html_name_get" : true});
29 var dataset = new openerp.web.DataSet(self, rel_field.relation,rel_field.context);
30- dataset.name_get(listrec,function(res){
31+ dataset.name_get(list_ids,function(res){
32 var additional = "";
33 if(res['html_name_get']){
34 additional = res['display'];
35
36=== modified file 'addons/web_mobile/static/src/js/list_mobile.js'
37--- addons/web_mobile/static/src/js/list_mobile.js 2011-12-01 11:26:58 +0000
38+++ addons/web_mobile/static/src/js/list_mobile.js 2011-12-14 11:11:18 +0000
39@@ -30,12 +30,16 @@
40 },
41 on_search_data: function(ev){
42 var self = this;
43+ var list_ids = [];
44 var datasearch = new openerp.web.DataSetSearch(self, self.action.res_model,self.action.context);
45 datasearch.domain = self.action.domain;
46 datasearch.read_slice(['name'], {context:datasearch.context, domain: datasearch.domain, limit:80}, function(listresult){
47+ _.each(listresult, function(i) {
48+ list_ids.push(i.id);
49+ });
50 _.extend(self.action.context,{"html_name_get" : true});
51 var dataset = new openerp.web.DataSet(self, datasearch.model,datasearch.context);
52- dataset.name_get(listresult,function(res){
53+ dataset.name_get(list_ids,function(res){
54 var additional = "";
55 if(res['html_name_get']){
56 additional = res['display'];
57
58=== modified file 'addons/web_mobile/static/src/web_mobile.html'
59--- addons/web_mobile/static/src/web_mobile.html 2011-11-25 14:39:18 +0000
60+++ addons/web_mobile/static/src/web_mobile.html 2011-12-14 11:11:18 +0000
61@@ -38,7 +38,10 @@
62
63 <script type="text/javascript">
64 var QWeb;
65- $(function() {
66+ $(function() {
67+ if(document.URL!="http://"+window.location.host+"/web_mobile/static/src/web_mobile.html"){
68+ window.location.replace('/mobile');
69+ }
70 var oe = openerp.init();
71 openerp.web_mobile(oe);
72 oe.web_mobile.mobilewebclient("moe");
73
74=== modified file 'addons/web_mobile/static/src/xml/web_mobile.xml'
75--- addons/web_mobile/static/src/xml/web_mobile.xml 2011-11-30 11:26:14 +0000
76+++ addons/web_mobile/static/src/xml/web_mobile.xml 2011-12-14 11:11:18 +0000
77@@ -130,7 +130,7 @@
78 <t t-call="Header" />
79 <div id="content" data-role="content">
80 <t t-if="!(records.length>0)">
81- There is no records to show.
82+ There are no records to show.
83 </t>
84 <t t-if="records.length>0">
85 <ul data-role="listview" data-inset="true" data-theme="d" data-filter="true">