3
0
Fork 0

[FIX] web_dialog_size: special dialogs

TT36323
13.0
david 2022-05-10 17:45:22 +02:00
parent df4c5f7f58
commit d0b680edfa
1 changed files with 8 additions and 2 deletions

View File

@ -52,13 +52,19 @@ odoo.define("web_dialog_size.web_dialog_size", function(require) {
return this._super.apply(this, arguments); return this._super.apply(this, arguments);
}, },
_trigger_resize: function() {
if (this.getParent() && this.getParent().trigger_up) {
this.trigger_up("resize");
}
},
_extending: function() { _extending: function() {
var dialog = this.$modal.find(".modal-dialog"); var dialog = this.$modal.find(".modal-dialog");
dialog.addClass("dialog_full_screen"); dialog.addClass("dialog_full_screen");
dialog.find(".dialog_button_extend").hide(); dialog.find(".dialog_button_extend").hide();
dialog.find(".dialog_button_restore").show(); dialog.find(".dialog_button_restore").show();
// Recompute o2m columns width if needed // Recompute o2m columns width if needed
this.trigger_up("resize"); this._trigger_resize();
}, },
_restore: function() { _restore: function() {
@ -67,7 +73,7 @@ odoo.define("web_dialog_size.web_dialog_size", function(require) {
dialog.find(".dialog_button_restore").hide(); dialog.find(".dialog_button_restore").hide();
dialog.find(".dialog_button_extend").show(); dialog.find(".dialog_button_extend").show();
// Recompute o2m columns width if needed // Recompute o2m columns width if needed
this.trigger_up("resize"); this._trigger_resize();
}, },
}); });
}); });