From fc5765e860614eb8e9656e86ebf2e14b3e678a50 Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Wed, 25 Sep 2019 09:56:29 +0000 Subject: [PATCH] [FIX] account: Fix uploading attachment from dashboard Suppose uploading an attachment with res_id = 0, res_model = 'existing.model'. Suppose also there a one2many having 'ir.attachment' as co_model and res_id as co_field in 'existing.model'. This setup leads to an error since the record with id=0 doesn't exists. This commit ensures the res_model is not set when uploading the attachment. closes odoo/odoo#37414 Signed-off-by: oco-odoo --- addons/account/static/src/xml/bills_tree_upload_views.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/static/src/xml/bills_tree_upload_views.xml b/addons/account/static/src/xml/bills_tree_upload_views.xml index 93502ee9136..adb6fdab487 100644 --- a/addons/account/static/src/xml/bills_tree_upload_views.xml +++ b/addons/account/static/src/xml/bills_tree_upload_views.xml @@ -7,8 +7,8 @@ /web/binary/upload_attachment - - + +