Odoo Help


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

Emipro Technologies Pvt. Ltd.
on 10/13/14, 9:33 AM 1,204 views

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.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


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