Hello, I have a form that opens in edit mode when a menu item is clicked from a sub menu, but what I would like to do is open the form in view mode. I have an xml action defined like so:
<record id="action_view_product_version" model="ir.actions.act_window">
<field name="name">Product Version</field>
<field name="res_model">product.version</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="target">current</field>
</record>
i saw this post here which says that setting the target to current will open the form in view mode, but when I did this it isnt working: https://accounts.openerp.com/forum/Help-1/question/3447
does anyone know how to open the form in view mode? I noticed that when the form view button is clicked on the upper right corner, then it opens the form in the view mode. Thank you
you can define a button as this code <button string="Product Version" type="action" name="%(action_view_product_version)d" icon="gtk-go-forward"/> on your form.