summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorLaurent Smet <las@odoo.com>2019-09-25 09:56:29 +0000
committerLaurent Smet <las@odoo.com>2019-09-25 11:03:09 +0000
commitfc5765e860614eb8e9656e86ebf2e14b3e678a50 (patch)
treeb3802e9cfb791a8effcb496e4cc41fe24ff913da /addons
parentcf27ff8fd3476fd2b3b4b8736d7476dfbe75cfff (diff)
[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 <oco-odoo@users.noreply.github.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/static/src/xml/bills_tree_upload_views.xml4
1 files 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 @@
<t t-set="multi_upload" t-value="true"/>
<t t-set="fileupload_id" t-value="widget.fileUploadID"/>
<t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
- <input type="hidden" name="model" t-att-value="'account.move'"/>
- <input type="hidden" name="id" t-att-value="0"/>
+ <input type="hidden" name="model" value=""/>
+ <input type="hidden" name="id" value="0"/>
</t>
</div>
</t>