[STEP BACK] One step back in the cleaning process. Maybe for v8.
authorFabien Meghazi <fme@openerp.com>
Wed, 5 Dec 2012 16:05:36 +0000 (17:05 +0100)
committerFabien Meghazi <fme@openerp.com>
Wed, 5 Dec 2012 16:05:36 +0000 (17:05 +0100)
bzr revid: fme@openerp.com-20121205160536-p9dm7zdxq2qb9mqs

addons/web/static/src/js/view_form.js
addons/web/static/src/js/views.js

index 93075a7..1e7d8f6 100644 (file)
@@ -1190,7 +1190,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
         }
     },
     get_arch_fragment: function() {
-        var doc = this.fvg.arch_doc.documentElement.cloneNode(true);
+        var doc = $.parseXML(instance.web.json_node_to_xml(this.fvg.arch)).documentElement;
         // IE won't allow custom button@type and will revert it to spec default : 'submit'
         $('button', doc).each(function() {
             $(this).attr('data-button-type', $(this).attr('type')).attr('type', 'button');
index b273452..decad15 100644 (file)
@@ -1396,9 +1396,8 @@ instance.web.View = instance.web.Widget.extend({
  */
 instance.web.fields_view_get = function(args) {
     function postprocess(fvg) {
-        fvg.arch_string = fvg.arch;
-        fvg.arch_doc = $.parseXML(fvg.arch);
-        fvg.arch = instance.web.xml_to_json(fvg.arch_doc, true);
+        var doc = $.parseXML(fvg.arch).documentElement;
+        fvg.arch = instance.web.xml_to_json(doc, (doc.nodeName.toLowerCase() !== 'kanban'));
         if ('id' in fvg.fields) {
             // Special case for id's
             var id_field = fvg.fields['id'];