I need to auto refresh the page when I'm on my custom view. But I don't seem to find a solution for that.
First I tried to use auto_refresh attribute in action, but it seems it only works on GTK client (old GUI used in OpenERP version 6 and older) and does not on web. Like this:
<record id="action_123" model="ir.actions.act_window">
<field name="name">My action</field>
<field name="res_model">model.name</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','open')]</field>
<field name="view_id" eval="False"/>
<field name="context">{
'search_default_not_printed': 1,
}
</field>
</record>
As I said, this one does not do anything.
Then I tried to add javascript inside tree view, but I just get error, that you can't use script. Script I tried:
<script type="text/javascript">
setTimeout("location.reload(true);", 5000);
</script>
Does anyone know how can I add such or similar script on tree view, so it would refresh the page after x seconds? Or if there is better way to do that, I'm open to suggestions of course.
No comments:
Post a Comment