You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

55 lines
2.6 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Add a button named as Add Attachment in payment page in website-->
<template id="payment_add_files" name="Upload Files"
inherit_id="website_sale.payment">
<xpath expr="//div[@id='payment_method']" position="after">
<br/>
<div class="div-class-button">
<div t-attf-class="form-group">
<div class="col">
<form id="add_sale_attachment" method="POST"
action="/shop/payment"
class="modal-content"
enctype="multipart/form-data">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<input type="file" name="attachment"
class="file"
data-show-upload="true"
data-show-caption="true"
lass="file"
data-show-preview="true"
/>
<button type="submit" name="Upload"
style="margin-top:20px;"
class="fa fa-upload">
Upload
</button>
</form>
</div>
<t t-if="attachment">
<t t-foreach="attachment" t-as="attach">
<div t-att-id="attach.id" border="0">
<table class="table table-borderless">
<tbody>
<tr>
<td scope="col"
style="width:800px;">
<t t-esc="attach.name"/>
</td>
<td scope="col">
<button class="fa fa-trash-o"
id="button_add_attachment_payment"/>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</div>
</div>
</xpath>
</template>
</odoo>