in our custom-model we have 2 different form-views.
from treeview the user reaches the default form-view.
we also defined a special action associated to a menuitem, so the user can access a special form-view:
<record id="action_go_to_specialview" model="ir.actions.server">
<field name="name">open Specialview</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_x_custompackage_custommodel" />
<field name="state">code</field>
<field name="code">action = model.get_specialview_action()</field>
</record>
the Method get_specialview_action returns an action as follows:
...
...
return {
'type': 'ir.actions.act_window',
'name': 'Message',
'res_model': 'x_custompackage.custommodel',
'view_type': 'form',
'view_mode': 'form',
'view_id' : view_id,
'target': 'current',
'flags': {'form': {'action_buttons': False, 'options': {'mode': 'view'}}},
'res_id': module_id
}
this works fine.
if a user opens this "Specialview" the alternateive special form-view will be shown.
BUT: if the user reloads the Page (Browser reload) instead of the special-form-view the default form-view will be rendered.