Odoo Help

0

Clicking a kanban cards goes to Edit mode in form view. How to make view only? [Closed]

By
Gavin Yap
on 7/11/15, 3:00 PM 2,867 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>


3
Gavin Yap
On 7/12/15, 12:25 AM


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.


 


2
Axel Mendoza
On 7/11/15, 8:59 PM

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>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 7/11/15, 3:00 PM
Seen: 2867 times
Last updated: 8/5/15, 2:23 AM