Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to use data of a date range from search view in my OpenOffice report?

By
evon_dun
on 8/16/13, 3:23 AM 1,598 views

I added two fields in my account_invoice.py for the date range i.e date_from and date_to to select a few number records falling into the range and i want to use the value of these fields in my report also as date_from: value to date_to:value. I tried using these fields in my report but it gives a blank array or [] in place of its value. Please help anyone who knows.

my fields:

'date_from':fields.function(lambda *a,k:{}, method=True, type='date',string="Date from"), 'date_to':fields.function(lambda *a,k:{}, method=True, type='date',string="Date to"),

and in search_view:

<field name="date_from" filter_domain="[('date_invoice','&gt;=',self)]"/>
<field name="date_to" filter_domain="[('date_invoice','&lt;=',self)]"/>

Anyone please! Still struggling for the same.

evon_dun
on 8/22/13, 2:50 AM
0
evon_dun
On 8/22/13, 4:50 AM

I don't know how to attach a file so i did this way! please check the above link before answering as i want the data in date from and date to fields in search view in my report.

evon_dun
on 8/22/13, 4:52 AM

Hi Evon. Based on the above screenshot you got some records based on the dates you've specified in the list view. So when you tick checkbox on the left side of the record, you'll have a report menu on the right side. By clicking on the report you'll have a selected records report. You can find similar functionality in Sale Orders object(Quatation / Order).

Keyur
on 9/18/13, 5:21 AM

my question is that i want to print the date entered in the date from and date to fields in the report. I figured that the fields are functional and use lambda which can never return a value.

evon_dun
on 9/18/13, 5:33 AM

As you can see in the above screenshot, i want to print the dates selected on top of the report for eg: 01/09/2013 to 30/09/2013 and the rest report is just copy of the tree view. Please help if you can.

evon_dun
on 9/30/13, 2:47 AM

Can Anyone help?

evon_dun
on 10/21/13, 8:02 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 8/16/13, 3:23 AM
Seen: 1598 times
Last updated: 3/16/15, 8:10 AM