Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
7467 Weergaven

I have a report that works perfectly for me but they ask me that before I launch the results it will be filtered through a start date and end date set before entering the report, someone knows how I can perform that process of having a view to select the start date and end date to add it to a report that is already working but that filter is required?

I want to show the items that are in a date range that that date is previously selected. For example: Pono start date: 01/01/2019 and end date: 01/30/2019 when you enter those dates will show the elements that are only in that range.

searching online I found this code:

filter name = "today" string = "Today" domain = "[('date', '> =', datetime.datetime.combine (context_today (), datetime.time (0,0,0))), ('date', '<=', datetime.datetime.combine (context_today (), datetime.time (23,59,59)))] "/>

Now my question, I want to enter it in my view of the report but I don't know how to put it, could you help me and change today to make it monthly?

Small excerpt from my report view:

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

. . .


Avatar
Annuleer

I have edited my publication because I found new information, I hope you can help me.

Auteur Beste antwoord

Yes, I have seen using abstract and transmodel but it only throws me the report without the data then I did not know how to solve the problem and I tried to do it in different simpler ways.  

But if you could help me solve the problem I have, I would be grateful, I await your response.


Avatar
Annuleer
Beste antwoord

Probably better to filter records in a custom report:

https://www.odoo.com/documentation/13.0/reference/reports.html#custom-reports

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
aug. 25
2670
3
feb. 25
3915
0
mei 24
46
1
apr. 24
3571
4
sep. 23
5117