콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
3513 화면

Hello All,

1) Go to Sale order Quotation

2) Click on 'Send By Email' button.

3) Pop will Open and Attachment will visible, ( If template have any kind of report attached )

4) Try to delete it.

you will get following error,

Uncaught TypeError: Cannot read property 'no_unlink' of undefined

Anyone Knows, how to solve it ?

This is very serious bug and it must need to solve. 

If anyone have already solved it then paste the solution over here, or if not, then I will do myself and will put the solution over here.

Waiting for answer of Expert !

 

 

아바타
취소
작성자 베스트 답변

I have got something,

On file web/static/src/js/view_form.js, inside the class instance.web.form.FieldMany2ManyBinaryMultiFiles,

There is one method on_file_delete,

There is following code written,

    on_file_delete: function (event) {
        alert('testing deleting');
        event.stopPropagation();
        var file_id=$(event.target).data("id");
        if (file_id) {
            var files = _.filter(this.get('value'), function (id) {return id != file_id;});
            if(!this.data[file_id].no_unlink) {
                this.ds_file.unlink([file_id]);
            }
            this.set({'value': files});
        }
    },

If we remove this condition "if(!this.data[file_id].no_unlink)" then this error will solved.  

I am not sure why they have set no_unlink property.

What is usage of this ?

Anyone knows this ?

아바타
취소

Your solution will not pop-up error, but also it will not unlink the file.

베스트 답변

Any serious bug should be reported on GitHub, not on this board. Although it is very nice of you to share code on how to solve the bug.

아바타
취소