0

I added two fields for date range in account.invoice, it works fine but i am not able to print the dates in report. Here is my code:

'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"),

<field name="date_from" filter_domain="[('date_invoice','&gt;=',self)]"/>
<field name="date_to" filter_domain="[('date_invoice','&lt;=',self)]"/>
BenMorel
  • 34,448
  • 50
  • 182
  • 322

1 Answers1

0

try this in your rml report For a date_from [[date_format(object.date_from)]] and For a date_to [[date_format(object.date_to)]]

Bhavesh Odedra
  • 10,990
  • 12
  • 33
  • 58