I want to disable drag and drop functionality in calendar view specifically in odoo14.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi,
Go to: odoo/addons/web/static/lib/fullcalendar/interaction/main.js
from line 1015, you will see this:
dragging.emitter.on('pointerdown', this.handlePointerDown);
dragging.emitter.on('dragstart', this.handleDragStart);
dragging.emitter.on('dragmove', this.handleDragMove);
dragging.emitter.on('pointerup', this.handlePointerUp);
dragging.emitter.on('dragend', this.handleDragEnd);
put off instead of on for lines related to dragging, you will have this:
dragging.emitter.on('pointerdown', this.handlePointerDown);
dragging.emitter.on('dragstart', this.handleDragStart);
dragging.emitter.off('dragmove', this.handleDragMove);
dragging.emitter.on('pointerup', this.handlePointerUp);
dragging.emitter.on('dragend', this.handleDragEnd);
You will notice that Drag option isn't possible anymore in calendar view.
If you want to disable spreading out the record in calendar view, you will have to disable dragend too.
Hope this helps.
Hello Ibrahim,
Thank you for answer. Let me try this.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Feb 24
|
3659 | ||
|
1
Jan 24
|
316 | ||
|
2
Nov 23
|
1972 | ||
Meetings and Minutes
Solved
|
|
1
May 23
|
3499 | |
|
1
Nov 22
|
5112 |
Did you find any solution?