contex_today() tdk bisa jalan di openerp 6.0

saya punya code action seperti in

    <record model="ir.actions.act_window" id="action_sale_graph">
            <field name="name">Sale Order Graph</field>
            <field name="res_model">sale.order</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph,tree</field>
            <field name="domain">[('state', '=', 'In-Process'),('sale_date','&lt;=',time.strftime('%d/%m/%Y')),('sale_date','&gt;=', ((datetime.date.today() -  relativedelta(months=2)).strftime('%d/%m/%Y')))]</field>
            <field name="context">{'group_by':['sale_date']}</field>
             <field name="view_id" ref="sale_graph_view"/>
    </record>

 

code diatas klo di jalan kan di openerp 7 jalan tapi klo di openerp 6.0 kenapa context_today() tdk dikenali ya trs coba tak ganti dengan datetime.date.today() jalan di openerp 6.0 tapi group by nya yang ditampilkan per tanggalnya ya bukan bulannya padahal di openerp 7.0 dengan code diatas biasa jalan group berdasarkan bulan mohon jawabannya terima kasih...

ifoel
ifoel
4
| 0 1 1
Asked on 12/11/15, 2:37 AM
0
vote
312 Views

context_today() memang tidak ada pada OpenERP 7.0, jadi tidak bisa digunakan. Pengelompokan field date mengalami perubahan di ver 7.0. Itu memang perbedaan antara ver 6.0 dan 7.0.

Andhitia Rama
Andhitia Rama
777
| 2 1 1
Answered on 12/18/15, 2:20 AM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Buat Pertanyaan

Ikuti Berita

Tujuan Forum

Forum ini bertujuan untuk membahas masalah teknikal Odoo

Baca Panduan

Question tools

6 follower(s)

Stats

Asked: 12/11/15, 2:37 AM
Seen: 312 times
Last updated: 12/18/15, 2:20 AM