콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5369 화면

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. 

아바타
취소
베스트 답변

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.

아바타
취소