簡體   English   中英

如何在 Odoo 8 中更改向導的寬度?

[英]How to change width of wizard in Odoo 8?

有沒有辦法更改 Odoo 中特定向導類的向導寬度? 我創建了一個 css 文件,將寬度增加到 odoo 在呈現窗口彈出窗口時創建的特殊 div 中, class="modal-content openerp"class="modal-content openerp"所有向導都已更改。 我只想更改某個TransientModel的寬度。 是否可以?

將@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>

您可以通過以下方式更改向導的大小:

<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>

希望這對你有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM