Odoo Help


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.


[ Very serious bug ] Getting Error while deleting any attachment in Compose Mail Pop Up.

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');
        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.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.

on 12/22/15, 3:25 AM

Ludo - Neobis

--Ludo - Neobis--
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--


Ludo - Neobis
On 10/13/14, 11:32 AM

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.

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

1 follower(s)


Asked: 10/13/14, 9:33 AM
Seen: 788 times
Last updated: 3/16/15, 8:10 AM