Search 如何在发票搜索视图中添加日期范围并在报告中打印所选范围?
我在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”)Search 如何在发票搜索视图中添加日期范围并在报告中打印所选范围?,search,report,openerp,date-range,invoice,Search,Report,Openerp,Date Range,Invoice,我在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”) 在您的rml报告中尝试这一点 我想和你约会
在您的rml报告中尝试这一点 我想和你约会 [[date\u格式(object.date\u from)]] 和你约会 [[date\u格式(object.date\u to)]]
<field name="date_from" filter_domain="[('date_invoice','>=',self)]"/>
<field name="date_to" filter_domain="[('date_invoice','<=',self)]"/>