Chirag Patel (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-572791-cpa into lp:openerp-web/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-572791-cpa/+merge/102640
Hello,
Fixed view editor remove tag from xml view when add field.
Demo: Sales > sales orders
1) From the view editor, try to edit the form view of the Sale Order.
2) Add a page on the sale order near 'History" page.
3) Save and update the view.
Observed: Sale order line form view changed.
when add page at that time remove tag "<form string='Sales Order Lines'>" from
order_line field.
so sale order line form view changed.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-572791-cpa/+merge/102640
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-572791-cpa.
=== modified file 'addons/web/static/src/js/view_editor.js'
--- addons/web/static/src/js/view_editor.js 2012-02-13 10:53:41 +0000
+++ addons/web/static/src/js/view_editor.js 2012-04-19 07:28:20 +0000
@@ -630,11 +630,9 @@
insert = _.intersection(_.flatten(temp_obj.att_list),_.uniq(check_list));
if (insert.length == _.uniq(check_list).length ) {return xml_child;}
});
+ xml_arch = QWeb.load_xml(arch.arch);
}
- arch_to_pass = _.filter($(arch.arch), function (child) {
- return child.nodeType == 1;
- });
- return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0],obj[0].child_id, move_direct, update_values,arch);
+ return self.do_save_xml(xml_arch.documentElement, obj[0].child_id[0],obj[0].child_id, move_direct, update_values,arch);
},
get_object_by_id: function(id, one_object, result) {
var self = this;
@@ -708,12 +706,12 @@
case "After":
self.edit_xml_dialog.$element.
find("tr[id='viewedit-"+after_append+"']").after(clone);
- $(arch1).after(update_values[0]);
+ $(arch1).after($(update_values[0]));
child_list.splice(index + 1, 0, object_xml);
break;
case "Before":
tr_click.before(clone);
- $(arch1).before(update_values[0]);
+ $(arch1).before($(update_values[0]));
child_list.splice(index - 1, 0, object_xml);
break;
case "Inside":
@@ -724,7 +722,7 @@
self.do_parent_img_hide_show(this);
}));
}
- $(arch1).append(update_values[0]);
+ $(arch1).append($(update_values[0]));
self.edit_xml_dialog.$element.
find("tr[id='viewedit-"+after_append+"']").after(clone);
obj.child_id.push(object_xml);
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp