我在 account.invoice 中为日期范围添加了两个字段,它工作正常,但我无法在报告中打印日期。这是我的代码:
'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','>=',self)]"/>
<field name="date_to" filter_domain="[('date_invoice','<=',self)]"/>