Created
October 13, 2021 08:07
-
-
Save sehrishnaz/8defd5c315c3ac25a9eb5d3e3c8ecc2d to your computer and use it in GitHub Desktop.
Upload Images and File in Odoo Website Using Web Form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template id="detail" name="Project Detail"> | |
<t t-call="website.layout"> | |
<div class="col-md-offset-5 col-sm-offset-4 col-sm-8 col-md-7" style="margin-top:30px;"> | |
<form action="/project/uploaded" method="post" class="s_website_form form-horizontal container-fluid mt32" enctype="multipart/form-data" id="file_upload_form"> | |
<div t-attf-class="form-group"> | |
<div class="col-md-7 col-sm-8"> | |
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> | |
<input type="hidden" name="project_id" t-att-value="project.id"/> | |
<input type="file" name="attachment" class="file" multiple="true" data-show-upload="true" data-show-caption="true" lass="file" data-show-preview="true" id="project.id"/> | |
<button type="submit" name="Upload" style="margin-top:20px;" class="fa fa-upload">Upload</button> | |
</div> | |
</div> | |
</form> | |
</div> | |
</t> | |
</template> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upload Images and File in Odoo Website Using Web Form