Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5378 Lượt xem

I've created a graph view

<record model="ir.ui.view" id="view_order_line_graph">

   <field name="name">sale.order.line.graph</field>

   <field name="model">sale.order.line</field>

   <field name="type">graph</field>

   <field name="arch" type="xml">

         <graph string="Sales Order Lines">

              <field name="product_id" group="True"/>

              <field name="price_unit" operator="*"/>

        </graph>

    </field>

</record>


I would like to view the graph but only with today data. 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

1- you can choose manually created date in custom Filters and then apply the today date. This way, you'll get all records created today.

2- You can add your own filter in search View with today's domain and add it by default  so that every time you display the graph view, it will filter on today's so lines.

Ex: 

<filter string="Today SO lines" name="so_lines_today"
 domain="[('create_date', '=', context_today().strftime('%Y-%m-%d'))]"/>

Hope this helps. If it doesn't, please write back for further analysis.

Ảnh đại diện
Huỷ bỏ