Skip to content

Commit

Permalink
[FIX] Opening a directory using the right click open action
Browse files Browse the repository at this point in the history
The root directory can't be opened using the contextual action menu (`open`)

Impacted versions:

    12.0 and above

Steps to reproduce:

    Go to "DMS directories" in the partner form view
    Create a new root directory
    Right-click and choose `Open`

Current behavior:

    Odoo raises an error `TypeError: record is null`

Expected behavior:

    Open the directory like if we click on the `Open` button in the right section (Document preview)
  • Loading branch information
Zodk2 authored and OCA-git-bot committed Dec 13, 2023
1 parent ab4a875 commit 93451f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dms_field/static/src/js/base/dms_tree_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ odoo.define("dms.DmsTreeController", function(require) {
? "directory_" + directory.parent_id[0]
: "#";
var directoryNode = {
id: "directory_" + directory.id,
id: dt.id,
text: directory.name,
icon: "fa fa-folder-o",
type: "directory",
Expand Down

0 comments on commit 93451f7

Please sign in to comment.