콘텐츠로 건너뛰기
메뉴
신고된 질문입니다
2 답글
916 화면

I have the problem that for all products with several lines of text in the description column of a rendered document like INV or SO, the other values of the other columns appear on the last line (bottom) instead on the first line. 

Idealy I'd like to only use xml to change it.

If possible I'd like to also reduce the spacing distance between these description lines of a product using CSS or style elements.
I am using Odoo 17

Help is appreciated.
Thanks.


아바타
취소
베스트 답변

Hi Elias

For your first problem:

Ensure Top Alignment for Other Columns: Add the vertical-align: top; style to cells containing other column values, so they align with the first line of the description. Or use bootstarp call 

<span class="align-top">top</span>



For line space:

Reduce Line Spacing in Description: Use line-height to control the spacing between lines in the description column.

or use bootstarp
https://getbootstrap.com/docs/5.0/utilities/spacing/


here an example:

<!-- This is an example of a table row in the report template -->

<tr>

    <!-- Description Column -->

    <td style="line-height: 1.2; padding: 5px;"> <!-- Adjust '1.2' to control line spacing -->

        <span t-esc="line.description"/>

    </td>


    <!-- Other Columns with Top Alignment -->

    <td style="vertical-align: top; padding: 5px;">

        <span t-esc="line.product_uom_qty"/>

    </td>

    <td style="vertical-align: top; padding: 5px;">

        <span t-esc="line.price_unit"/>

    </td>

    <td style="vertical-align: top; padding: 5px;">

        <span t-esc="line.price_subtotal"/>

    </td>

</tr>


아바타
취소
작성자 베스트 답변

much appreciated!
both solutions work.

아바타
취소