Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3544 Widoki

I want to filter a report monthly, but I couldn't do it, searching this forum I found this method: <filter string = "Today" domain = "[('date', '& lt; =', time .strftime ('% Y -% m-% d 23:59:59 ')), (' date ',' & gt; = ', time.strftime ('% Y-% m-% d 00:00: 00 '))] " />.

however, when I add it to the report view, errors appear.
Does anyone know where it is added, in view of the report or in view of the table, where?
link questions foro:  \https://www.odoo.com/es_ES/forum/ayuda-1/question/how-to-save-a-filter-with-today-value-from-context-41459  

part of the report vie:

<report
        id = "larger_list"
        model = "project_rc.account"
        string = "Lmayor"
        name = "project_rc.report_cuenta_view"
        file = "project_rc.report_lmayor"
        report_type = "qweb-html" />

    <template id = "report_cuenta_view">
        <t t-call = "web.html_container">
            <t t-foreach = "docs" t-as = "i">
                <t t-call = "web.internal_layout">
                    <div class = "page">

                                  h2 style = "text-align: center"> Ledger

                        <h3> Account

                            <span t-esc = "i.title" />

                        </h3>

                        <table class = "table">

                            <tr>

                                <th style = "text-align: center"> Date </th>

                                <th style = "text-align: center"> Corporate name </th>
                                <th style = "text-align: center"> Must </th>

                                <th style = "text-align: center"> credit </th>

                                </tr>

                            <t t-foreach = "i.detalle_documento_ids" t-as = "or">

                                <tr>

                                    <td>

                                        <span t-esc = "o.date" />

                                    </td>

                                    <td>

                                        <span t-esc = "o.corporate_name_id.name" />

                                    </td>

                                    <td>

                                        <span t-esc = "o.total_must" />
                                    </td>
                                    <td>
                                        <span t-esc = "o.total_credit" />
                                    </td>
                                </tr>
                            </t>

Awatar
Odrzuć
Najlepsza odpowiedź

Hello,

<filter /> tag is useful for search view filter.

If you want to filter the report data then you need to filter your data in python side not in view side.

For the report view you can not use the filter tag for filter the records.

Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
wrz 23
7004
0
wrz 23
29
0
wrz 24
1427
3
lut 25
3550
0
maj 24
46