【问题标题】:How to add date range in invoice search view and print the selected range in the report?如何在发票搜索视图中添加日期范围并在报告中打印所选范围?
【发布时间】:2013-10-16 16:35:52
【问题描述】:

我在 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','&gt;=',self)]"/>
<field name="date_to" filter_domain="[('date_invoice','&lt;=',self)]"/>

【问题讨论】:

    标签: search report openerp date-range invoice


    【解决方案1】:

    在你的 rml 报告中试试这个 对于 date_from [[日期格式(object.date_from)]] 对于 date_to [[date_format(object.date_to)]]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-15
      • 2016-11-29
      • 2018-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-26
      • 1970-01-01
      相关资源
      最近更新 更多