Reputation: 41
Is there a way to change the wizard width for a specific wizards class in Odoo?
I've created a css file to increase the width into a special div that odoo create when the window popup is rendered, with class="modal-content openerp"
but all the wizards in Odoo had been changed. I just want to change the width for a certain TransientModel
. Is it possible?
Upvotes: 3
Views: 2753
Reputation: 9670
Adapting the solution of @Marcel to Odoo 11 to almost fill the browser window:
<record id="your_wizard_id" model="ir.ui.view">
<field name="name">your wizard name</field>
<field name="model">your wizard model</field>
<field name="arch" type="xml">
<form string="....." version="7.0">
<script>
$(document).ready(function(){
$('.modal-dialog').css({'width': '97%', 'height': '97%'});
$('.modal-content').css({'height': '100%'});
$('.modal-body').css({'height': '100%'});
});
</script>
<!-- rest of the form -->
</form>
</field>
Upvotes: 3
Reputation: 51
You can change the size of a wizard by following way:
<record id="your_wizard_id" model="ir.ui.view">
<field name="name">your wizard name</field>
<field name="model">your wizard model</field>
<field name="arch" type="xml">
<form string="....." version="7.0">
<sheet>
<script>
$(document).ready(function(){
$('.ui-dialog').css({'width': '680px'});
$('.oe_form_sheet_width').css({'MAXwidth': '550px'});
});
</script>
</sheet>
</form>
</field>
Hope this helps you.
Upvotes: 2