[英]How to change width of wizard in Odoo 8?
Is there a way to change the wizard width for a specific wizards class in Odoo?有没有办法更改 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.我创建了一个 css 文件,将宽度增加到 odoo 在呈现窗口弹出窗口时创建的特殊 div 中,
class="modal-content openerp"
但class="modal-content openerp"
所有向导都已更改。 I just want to change the width for a certain TransientModel
.我只想更改某个
TransientModel
的宽度。 Is it possible?是否可以?
Adapting the solution of @Marcel to Odoo 11 to almost fill the browser window:将@Marcel 的解决方案适配到 Odoo 11 几乎填满浏览器窗口:
<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>
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.希望这对你有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.