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.
 
 
 
 
 

76 lines
4.2 KiB

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!--This template creates a confirm button with a cancel modal for a sale order portal content.-->
<template id="sale_order_portal_content_inherited_website_cancel_order"
inherit_id="sale.sale_order_portal_content">
<xpath expr="//section[@id='details']" position="inside">
<div id="test_confirm" t-if="sale_order.state != 'cancel'">
<div class="col-12" style="text-align:right;align:right">
<span class="btn-group flex-grow-4 mb-2 float-right" id="portal_cancel">
<a type="button"
class="btn btn-secondary flex-grow-4 mb-2"
data-bs-toggle="modal"
data-bs-target="#staticBackdrop"
data-toggle="tooltip"
data-placement="bottom"
title="click this button to cancel the order">
<i class="fa fa-times-circle"
style="font-size:23px;color:red"/>
Cancel
</a>
</span>
</div>
<div class="modal fade" id="staticBackdrop"
data-bs-backdrop="static" data-bs-keyboard="false"
tabindex="-1" aria-labelledby="staticBackdropLabel"
aria-hidden="true">
<div class="modal-dialog">
<form id="editReasonForm" class="editReasonForm">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5"
id="staticBackdropLabel">Provide Reason
for Cancel:
<t t-out="sale_order.name"/>
</h1>
<button type="button" class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"/>
</div>
<div class="modal-body m-3">
<input type="hidden" t-att-value="sale_order.id" id="sale_order_id"/>
<div class="form-group row mb-3">
<label for="reason"
class="col-sm-2 col-form-label">
Reason:
</label>
<div class="col-sm-9">
<input type="text"
class="form-control"
id="reason"
placeholder="Reason for Cancel "/>
</div>
</div>
<div class="form-group row row mb-3">
<div class="modal-footer">
<button type="button"
class="btn btn-secondary"
data-bs-dismiss="modal">
Close
</button>
<button type="submit"
class="btn btn-primary"
id="submit_button">
Submit
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</xpath>
</template>
</odoo>