跳至内容
菜单
此问题已终结
2 回复
150 查看

I want to move the red section to under the "Quotation" heading to the right of the customer details.

https://ibb.co/5g7MRrBk

形象
丢弃
最佳答案

Hii,

Here is version 16 code please try this 
Example XML to move it

<odoo>

    <template id="report_saleorder_document_inherit_move_red_section"

              inherit_id="sale.report_saleorder_document">


        <!-- Remove the original red section -->

        <xpath expr="//div[@class='row mt32 mb32']//div[@class='col-auto']" position="replace">

            <!-- leave blank to remove -->

        </xpath>


        <!-- Insert the red section next to customer details -->

        <xpath expr="//div[@class='row mt32 mb32']//div[@class='col-auto']//.." position="after">

            <div class="row mt32 mb32">

                <div class="col-6">

                    <!-- Keep customer details here -->

                    <div>

                        <strong t-esc="doc.partner_id.name"/>

                        <br/>

                        <span t-esc="doc.partner_id.contact_address"/>

                    </div>

                </div>

                <div class="col-6 text-right" style="color:red;">

                    <p><strong>Quotation #:</strong> <span t-esc="doc.name"/></p>

                    <p><strong>Date:</strong> <span t-esc="doc.date_order.strftime('%d/%m/%Y')"/></p>

                    <p><strong>Salesperson:</strong> <span t-esc="doc.user_id.name"/></p>

                </div>

            </div>

        </xpath>


    </template>

</odoo>


i hope it is use full

形象
丢弃
最佳答案

Hi,


To move the "Question Date", "Expiration", and "Salesperson" section to the right of the "Quotation # 00004" heading in an Odoo report (likely a QWeb report), you'll need to modify the report's XML template.


- Locate the QWeb Report Template(sale.report_saleorder_document)

- Inherit the template and make changes in the inherited template.


Add your div or group by using XPath.

<xpath expr="//div[@name='informations_reference']" position="after">
<!-- Your custom div here -->
</xpath>



Ensure to upgrade the module.


Hope it helps


形象
丢弃
相关帖文 回复 查看 活动
3
8月 25
418
3
8月 25
1664
1
7月 25
683
0
8月 25
544
1
6月 25
1015