[fix] problem in o2m readonly, showed too much buttons

lp bug: https://launchpad.net/bugs/907736 fixed

bzr revid: nicolas.vanhoren@openerp.com-20111223111211-bxly88xx2fz0owz8
This commit is contained in:
niv-openerp 2011-12-23 12:12:11 +01:00
parent ff90fce816
commit 3314eb1062
1 changed files with 3 additions and 0 deletions

View File

@ -2160,6 +2160,9 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
if (self.is_readonly())
controller.set_editable(false);
} else if (view_type == "form" || view_type == 'page') {
if (view_type == 'page' || self.is_readonly()) {
$(".oe_form_buttons", controller.$element).children().remove();
}
controller.on_record_loaded.add_last(function() {
once.resolve();
});