Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8024 มุมมอง

How do I auto_refresh an XML tree view? I have a cron job working in the background that will change the state once a task is complete. I want the tree to update every 20 seconds so that the user will see the state change without refreshing the view.

How can I do this? Here is my code.

<record model="ir.ui.view" id="view_faxing_fax_tree">
    <field name="name">my.mod.tree</field>
    <field name="model">my.mod</field>
    <field name="type">tree</field>
    <field name="auto_refresh">20</field>
    <field name="arch" type="xml">
        <tree string="Faxes" colors="red:state=='send_except'; orange:state=='pending';">
            <field name="name"/>
            <field name="partner_id"/>
            <field name="create_date"/>
            <field name="state"/>
        </tree>
    </field>
</record>
อวตาร
ละทิ้ง

Hi Patently, did you find an initiative to solve this problem?

ผู้เขียน

no i never found a solution, any tips would be appreciated.

คำตอบที่ดีที่สุด

you can try my new module https://github.com/szufisher/web/tree/8.0/web_auto_refresh

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ธ.ค. 23
2768
Can you set order_by in a xml tree view? แก้ไขแล้ว
2
ธ.ค. 23
17912
1
มี.ค. 15
4898
0
ก.ค. 25
11250
1
ม.ค. 17
4257