This question has been flagged

When uploading attachement on ir.attachement field with widget many2many_binary. Uploding blocked and showing error.

Odoo V15.

Uncaught Promise > QWeb2 - template['FieldBinaryFileUploader.files']: Runtime Error: Error: 
QWeb2 - template['FieldBinaryFileUploader.attachment_preview']: Runtime Error: TypeError: Cannot read properties of undefined (reading 'replace')

Error: QWeb2 - template['FieldBinaryFileUploader.files']: Runtime Error: Error: QWeb2 - template['FieldBinaryFileUploader.attachment_preview']: Runtime Error: TypeError: Cannot read properties of undefined (reading 'replace')
    at Object.exception (http://fleet.qualif.arkeup.com/web/assets/202-c410e44/web.assets_common.min.js:4453:7)
    at Engine.eval (eval at _render (http://fleet.qualif.arkeup.com/web/assets/202-c410e44/web.assets_common.min.js:4494:73), :30:29)
    at Engine._render (http://fleet.qualif.arkeup.com/web/assets/202-c410e44/web.assets_common.min.js:4493:296)
    at Engine.render (http://fleet.qualif.arkeup.com/web/assets/202-c410e44/web.assets_common.min.js:4493:151)
    at Class._render (http://fleet.qualif.arkeup.com/web/assets/352-35c89c8/web.assets_backend.min.js:4298:782)
    at Class.reset (http://fleet.qualif.arkeup.com/web/assets/352-35c89c8/web.assets_backend.min.js:3948:501)
    at http://fleet.qualif.arkeup.com/web/assets/352-35c89c8/web.assets_backend.min.js:4750:217
    at Function._.each._.forEach (http://fleet.qualif.arkeup.com/web/assets/202-c410e44/web.assets_common.min.js:151:558)
    at Class.confirmChange (http://fleet.qualif.arkeup.com/web/assets/352-35c89c8/web.assets_backend.min.js:4750:58)
    at Class.confirmChange (http://fleet.qualif.arkeup.com/web/assets/352-35c89c8/web.assets_backend.min.js:5019:797)

This is my field:

Python : control_images = fields.Many2many("ir.attachment") 
XML : <field name="control_images" class="oe_edit_only" widget="many2many_binary">



Avatar
Discard