[REF] point_of_sale: invoice mail POS UI

Invoices can also be sent by email but this was not properly displayed on the POS UI.

task-2536068

closes odoo/odoo#72873

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Jacky (trj)
2021-09-03 14:30:06 +00:00
parent 52575cd0f5
commit b1e730ed6e
3 changed files with 17 additions and 7 deletions
+9 -2
View File
@@ -3557,16 +3557,23 @@ td {
.receipt-screen .notice {
margin-top: 6px;
display: flex;
}
.receipt-screen .notice.failed {
.receipt-screen .notice .failed {
color: rgb(168, 89, 89);
}
.receipt-screen .notice.successful {
.receipt-screen .notice .successful {
color: #6EC89B;
}
.receipt-screen .notice .send-mail-info {
position: absolute;
right: 1.5rem;
font-style: italic;
}
@media screen and (max-width: 768px) {
.receipt-screen .default-view {
flex-direction: column-reverse;
@@ -20,7 +20,7 @@
<OrderReceipt order="currentOrder" t-ref="order-receipt" />
</div>
<div class="actions">
<h1>How would you like to receive your receipt?</h1>
<h1>How would you like to receive your receipt<t t-if="currentOrder.is_to_invoice()"> &amp; invoice</t>?</h1>
<div class="buttons">
<div class="button print" t-on-click="printReceipt">
<i class="fa fa-print"></i> Print Receipt
@@ -33,11 +33,14 @@
<button class="send" t-att-class="{ highlight: is_email(orderUiState.inputEmail) }" type="submit">Send</button>
</div>
</form>
<t t-if="orderUiState.emailSuccessful !== null">
<div class="notice" t-attf-class="{{ orderUiState.emailSuccessful ? 'successful' : 'failed' }}">
<div class="notice">
<div t-if="orderUiState.emailSuccessful !== null" t-attf-class="{{ orderUiState.emailSuccessful ? 'successful' : 'failed' }}">
<t t-esc="orderUiState.emailNotice"></t>
</div>
</t>
<div class="send-mail-info" t-if="currentOrder.is_to_invoice()">
(Both will be sent by email)
</div>
</div>
</div>
</div>
</div>
@@ -69,7 +69,7 @@ odoo.define('point_of_sale.tour.ReceiptScreenTourMethods', function (require) {
emailIsSuccessful() {
return [
{
trigger: `.receipt-screen .notice.successful`,
trigger: `.receipt-screen .notice .successful`,
run: () => {},
},
];