From 9ce3447d884fd6e03a78a65134c35e9b5bd178ee Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 19 Oct 2011 12:26:44 +0530 Subject: [PATCH 1/8] [IMP] When result is null then displayed message in listview for no any records found and filter is hide. bzr revid: bth@tinyerp.com-20111019065644-nalzsdy6k0klb7jb --- .../web_mobile/static/src/xml/web_mobile.xml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index 775ac90c66c..f395600ae73 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -132,13 +132,18 @@
- + + No one record is created + + + +
From 7b5b0faafe22a77a3962238dd2d3c6646eb24bfd Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 19 Oct 2011 12:39:19 +0530 Subject: [PATCH 2/8] [IMP] Meetings are displayed. bzr revid: bth@tinyerp.com-20111019070919-yubxuakxhqr7prcf --- addons/web_mobile/static/src/js/form_mobile.js | 3 +++ addons/web_mobile/static/src/xml/web_mobile.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 1cb1dfb494e..1c719855268 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -256,6 +256,9 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ if (view_fields[i].tag == 'group') { this.get_fields(view_fields[i].children, this.fields); } + if (view_fields[i].tag == 'level') { + this.get_fields(view_fields[i].children, this.fields); + } } return this.fields; }, diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index f395600ae73..a51b75ee110 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -290,6 +290,9 @@
+ + + From 00dd58370bb0ef5865392597f76ac8860865d085 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 19 Oct 2011 14:45:55 +0530 Subject: [PATCH 3/8] [IMP] Image displayed with the m2o,url & email type field in small screen. bzr revid: bth@tinyerp.com-20111019091555-ms7uds7k0ffti66e --- .../web_mobile/static/src/js/form_mobile.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 1c719855268..14c7494deca 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -283,6 +283,18 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $(this).val(dateresult); } } + $('[id^="'+id+'"]').find('#website').each(function(){ + $(this).css('display','inline-block'); + $(this).css('width','60%'); + }); + $('[id^="'+id+'"]').find('#email').each(function(){ + $(this).css('display','inline-block'); + $(this).css('width','60%'); + }); + $('[id^="'+id+'"]').find('#email_from').each(function(){ + $(this).css('display','inline-block'); + $(this).css('width','60%'); + }); }); // Temp: Selection set as disabled $('[id^="'+id+'"]').find('select').each(function() { @@ -300,6 +312,16 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $(this).css('left', '-9999px'); }); }); + // image displayed with m2o field + $('[id^="'+id+'"]').find('div[class=ui-select]').each(function(){ + $(this).next().each(function(){ + if($(this).attr('id')=="formbutton"){ + $(this).prev().css('display','inline-table'); + $(this).prev().find('a').find('.ui-btn-inner').removeClass('ui-btn-inner'); + $(this).prev().find('a').find('span:first').css('padding-right','150px'); + } + }); + }); } } }); From 45b5fd73a219995e01d6904ca0e862c0fac97bde Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 19 Oct 2011 16:35:29 +0530 Subject: [PATCH 4/8] [FIX] Some minor issues with UI. bzr revid: bth@tinyerp.com-20111019110529-wu9jb6v847dutnww --- addons/web_mobile/static/src/xml/web_mobile.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index a51b75ee110..17ac82253e2 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -153,12 +153,11 @@
-
- - - -
').appendTo('#moe'); - $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').html(openerp.web.qweb.render("ListView", {'records' : res})); + $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').html(openerp.web.qweb.render("ListView", {'records' : res,'data': additional})); $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('h1').html(head); $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); @@ -194,7 +201,11 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ } } } - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html(self.render({'get_fields': get_fields_test, 'notebooks': false, 'fields' : fields_test, 'values' : data_relational, 'temp_flag':'1' })); + if(notebook){ + $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html(self.render({'get_fields': get_fields_test, 'notebooks': false, 'fields' : fields_test, 'values' : data_relational, 'temp_flag':'1' })); + }else{ + $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html(self.render({'get_fields': get_fields_test, 'notebooks': false, 'fields' : fields, 'values' : data_relational, 'temp_flag':'1' })); + } $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('h1').html(head_title); $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); @@ -241,7 +252,8 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ }else{ $.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", false, true); } - }); + }); + }); } }); $.mobile.changePage("#"+self.element_id, "slide", false, true); diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index 69e499e36c4..9a07da21ebe 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -138,10 +138,21 @@
  • - - - - + + + + + + + +

    + + + + + +

    +
  • From ffbdc3fc1e5408b41b0e70a364d548c8feb22e67 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Thu, 10 Nov 2011 12:11:45 +0530 Subject: [PATCH 7/8] [FIX] Fixing issues related o2m relational field in notebook. bzr revid: bth@tinyerp.com-20111110064145-trcvnzyibt4wxwf9 --- .../web_mobile/static/src/js/form_mobile.js | 18 +++++++++--------- .../web_mobile/static/src/xml/web_mobile.xml | 19 ++++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 75058bbf8e9..598f3c29739 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -93,17 +93,9 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ var get_fields_test = self.get_fields(fields[get_fields[i].attrs.name].views.form.arch.children); var fields_test = fields[get_fields[i].attrs.name]['views'].form.fields; var notebook=fields[get_fields[i].attrs.name].views.form.arch; - if(notebook){ - var til = notebook.attrs.string; - } } } } - } - - if(notebook){ - $(this).find('div#page_content').html(self.render({'get_fields': get_fields,'fields' : result.fields, 'values' : self.datarecord,'til': til })); - }else{ $(this).find('div#page_content').html(self.render({'get_fields': get_fields,'fields' : result.fields, 'values' : self.datarecord})); } self.formatdata(get_fields, fields, result, self.datarecord,'page_content','element'); @@ -186,6 +178,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ } if(!$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html()){ $('
    ').appendTo('#moe'); + for (var k = 0; k < notebooks.children.length; k++) { if (notebooks.children[k].attrs.string == lastid) { get_fields = self.get_fields(notebooks.children[k].children); @@ -240,7 +233,11 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ } } }); - self.formatdata(get_fields_test, fields_test, result, data_relational,'oe_form_'+listid+result.fields[relational].relation,'element'); + if(notebook){ + self.formatdata(get_fields_test, fields_test, result, data_relational,'oe_form_'+listid+result.fields[relational].relation,'element'); + }else{ + self.formatdata(get_fields_test, fields, result, data_relational,'oe_form_'+listid+result.fields[relational].relation,'element'); + } $.mobile.changePage('#oe_form_'+listid+result.fields[relational].relation, "slide", false, true); self.formatdata('', '', '', '','oe_form_'+listid+result.fields[relational].relation,'slider'); }else{ @@ -271,6 +268,9 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ if (view_fields[i].tag == 'level') { this.get_fields(view_fields[i].children, this.fields); } + if (view_fields[i].tag == 'page') { + this.get_fields(view_fields[i].children, this.fields); + } } return this.fields; }, diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index 9a07da21ebe..8299d40c171 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -168,7 +168,7 @@
    - +
    @@ -346,4 +347,4 @@
    - + \ No newline at end of file From a1dfda310b032d0d025417ac4df4722d69f41ca5 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Thu, 10 Nov 2011 12:51:48 +0530 Subject: [PATCH 8/8] [IMP] Minor change. bzr revid: jra@tinyerp.com-20111110072148-4lcpu2m3vir86xul --- addons/web_mobile/static/src/js/chrome_mobile.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/web_mobile/static/src/js/chrome_mobile.js b/addons/web_mobile/static/src/js/chrome_mobile.js index 99b9651fa7b..516de784adc 100644 --- a/addons/web_mobile/static/src/js/chrome_mobile.js +++ b/addons/web_mobile/static/src/js/chrome_mobile.js @@ -20,13 +20,10 @@ openerp.web_mobile.MobileWebClient = openerp.web.Widget.extend({ openerp.web.qweb.add_template("xml/web_mobile.xml"); var params = {}; this.$element.html(this.render()); - this.session = new openerp.web.Session("oe_errors"); this.crashmanager = new openerp.web.CrashManager(this); this.login = new openerp.web_mobile.Login(this, "oe_login"); -// this.session.on_session_invalid.add(this.login.do_ask_login); }, start: function() { - this.session.start(); this.login.start(); } });