Odoo Help

5
12 Answers
7

"Edit KanbanView" (if the link does not appear, click on the Kanban icon)

Set <kanban edit="false" quick_create="false"

edit="false" disable drag&drop

quick_create="false" disable the + icons

1 Comment
Emipro
7/18/15, 6:28 AM

Enjoy +1 Like !

2
Carlos Vasquez
6/20/13, 5:05 PM

I managed to do this with a constraint in the code. We haven't found any other way to do this yet.

The constraint basically checks if the user is in an allowed group to do the change that the drag and drop makes to the record.

4 Comments
Juan José Scarafía
7/8/13, 5:17 PM

Please, can you give me an example how can I block it by constratints? For example for project.task

vivek
7/23/13, 6:50 AM

Thanks for your reply Carlos. Could you tell me how you've specified the constraint and where? Again Thanks for your time.

Alby Antony
4/16/15, 11:26 PM

carlos, can you explain me how you restricted via the constraints?? i need that

dirtyHandsPHP
5/17/16, 3:16 PM

@Carlos: I have the same requirements. Can you please help me to achieve it.

0
Avatar

Shameem Babu @ iWesabe

--Shameem Babu @ iWesabe--
GLOBAL CREATIVE CONCEPTS TECH CO LTD
http://www.iwesabe.com
1410
| 6 3 7
KHOBAR, Saudi Arabia
--Shameem Babu @ iWesabe--

  

 iWesabe - ODOO ERP IMPLEMENTATION & CUSTOMIZATION SAUDI ARABIA.



For Queries : pks.shameem@gmail.com ,shameem@iwesabe.com

Activities     :    Youtube

                           Stackoverflow 

Experience

           iWesabe                                ◉

           Axon Communications        ❍

           Cybrosys Technologies        ❍


Shameem Babu @ iWesabe
8/2/17, 9:58 AM


File:  /web_kanban/static/src/js/kanban_view.js

Search the following content

var record_options = _.extend(this.record_options, {
     draggable: draggable,
 });

 Then add following code above that.

var models = ['project.task', 'project.project']; // add more models to be disabled
if(models.includes(this.dataset.model)){
     draggable = false
}
This is working in odoo 10th version.
1 Comment
Camille Apollo
11/29/17, 4:09 AM

Hi Shameem, how do you disable drag and drop for a certain group?

0
Raaj Mishra
9/8/16, 3:06 PM

To Disable Drag and Drop of Kanban View  records we need to modify at web_kanban module.

Path : web_kanban/static/src/js

File : kanban_view.js

Modification : Search for the below code

var record_options = _.extend(this.record_options, {
            draggable: draggable,

        });

Then add draggable = false above given block of code like,

draggable = false   [Note : This is the newly added line]
var record_options = _.extend(this.record_options, {
            draggable: draggable,
        });
0
Raphael
5/5/16, 6:45 AM

Did anyone find a solution for only allowing users in an allowed group to do the change that the drag and drop makes to the record. We would like to put restrictions on users shifting tasks into the task stage "done". Only certain users should be allowed to do that.

0
Dorin Hongu
9/13/15, 4:02 AM

For disable drag&drop on entire kanban use:

<kanban edit="false"  ...


For enable drag&drop on specific card use:

<t t-name="kanban-box"> 
    <t t-if="record.state.raw_value=='draft'">
        <t t-set="dragdrop" t-value="'oe_kanban_draghandle'"/>
    </t>
    <t t-if="record.state.raw_value!='draft'">
        <t t-set="dragdrop" t-value="''"/>
    </t>
    <div t-attf-class="oe_kanban_card oe_kanban_global_click #{dragdrop}">

...


Ask a Question
Writer
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