Odoo Help

Welcome!

This community 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.

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 1,955 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

--Axel Mendoza--
10238
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

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>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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