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

Does the field auto_refresh in ir.actions.act_window will automatically refresh the view?

อวตาร
ละทิ้ง
ผู้เขียน

The Dashboard auto refresh is not working in v7..

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

Try, In action(ir.actions.act_window) of your object (XML file)

<field name="auto_refresh" eval="10"/>

Through this code, your view will be automatically refresh in 10 seconds

Try this,

    <record id="board_your_object_auto_refresh_form" model="ir.ui.view">
        <field name="name">your.object.form</field>
        <field name="model">board.board</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Your Object">
                <hpaned>
                    <child1>
                        <action colspan="4"  height="100" name="%(act_your_object_auto_refresh)d" string="Your Object String"/>
                   </child1>                       
               </hpaned>
            </form>
        </field>
    </record>

here act_your_object_auto_refresh is your action id and no need to put auto_refresh in action.

    <record id="your_object_auto_refresh_dashboard" model="ir.actions.act_window">
        <field name="name">Your Object Dashboard</field>
        <field name="res_model">board.board</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
        <field name="auto_refresh">10</field>
        <field name="usage">menu</field>
        <field name="view_id" ref="board_your_object_auto_refresh_form"/>
    </record>

Hope this work for you.

อวตาร
ละทิ้ง
ผู้เขียน

I've set it for the Dashboard in Window actions, but this is not working

Hey Shelton, See my updated answer, Hope it work for you.

ผู้เขียน

Instead of putting it in a new board i tried it in Sales board available in openerp, ie. I changed the auto_refresh value in Settings>>Actions>>Window Actions>>Sales (board) and it is not working..

Agree auto_refresh under action name "Helpdesk Requests", when set to 2 seconds never refreshes. Think I have seen questions before about this, can anyone confirm this works?

I have also not been able to get this to work. Is there a setting somewhere else that needs adjusting?

Doesn't work here either.

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

use this module for 10,11,12 version. Tested and works fine.

Please note auto refresh will  not work when odoo is in debug mode

https://www.odoo.com/apps/modules/12.0/muk_web_client_refresh/

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Another version developed by me for Odoo 8

https://github.com/aek/odoo_public/tree/8.0/addons/solt_autorefresh

อวตาร
ละทิ้ง

No More available this repo.

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

Add this two modules

https://github.com/szufisher/web/tree/8.0/bus_enhanced 
https://github.com/szufisher/web/tree/8.0/web_auto_refresh

Configure your desired views to autoreload and enjoy

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 15
4971
2
พ.ค. 24
9217
1
ก.ย. 19
9350
1
มี.ค. 15
10487
2
มี.ค. 15
8446