This question has been flagged
2 Replies
14667 Views

Hi,

When I create a kanban view, using the below window action. Whenever, I click a kanban board, it goes to Edit mode, which I only want to view only. 

I try to figure out refering to other modules but was in vain. Hope somebody can help me on this. Thanks. 


My window action is as below:

 <record model="ir.actions.act_window" id="registration_list_action">
<field name="name">Registrations</field>
<field name="res_model">warranty.registration</field> 
<field name="view_mode">kanban,tree,form,calendar</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Add a Registration
</p>
</field>
</record>


Avatar
Discard
Author Best Answer


I've found the problem was actually I've been using this piece of code (Kanban view Section) in the tutorials from Odoo

<div 
t-attf-class="oe_kanban_color_{{kanban_getcolor(record.color.raw_value)}}
oe_kanban_global_click_edit oe_semantic_html_override
oe_kanban_card {{record.group_fancy==1 ? 'oe_kanban_card_fancy' : ''}}">


The tag "oe_kanban_global_click_edit" allows, when click, to edit mode instead of viewin. Changing to oe_kanban_global_click  solved my problem.


 


Avatar
Discard
Best Answer

That's depends on the Odoo version and implementation but it's related to the initial_mode option on the form view. You could try to specify this like this:

<form string="Your Form String" options="{'initial_mode': 'view'}">

...

</form>

Avatar
Discard