forked from OCA/l10n-brazil
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] Overwrite the original template for OrderReceipt
- Loading branch information
Showing
7 changed files
with
83 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
14 changes: 14 additions & 0 deletions
14
l10n_br_pos_cfe/static/src/js/ReceiptScreen/SatOrderReceipt.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
odoo.define("l10n_br_pos_cfe.SatOrderReceipt", function (require) { | ||
"use strict"; | ||
|
||
const OrderReceipt = require("point_of_sale.OrderReceipt"); | ||
|
||
/* | ||
* Overwrite the original component template, as it is giving OWL | ||
* error when we try to inherit and change the information from | ||
* the entire original template. | ||
*/ | ||
OrderReceipt.template = "SatOrderReceipt"; | ||
|
||
return OrderReceipt; | ||
}); |
58 changes: 0 additions & 58 deletions
58
l10n_br_pos_cfe/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
l10n_br_pos_cfe/static/src/xml/Screens/ReceiptScreen/SatOrderReceipt.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates id="template" xml:space="preserve"> | ||
|
||
<t t-name="SatOrderReceipt" owl="1"> | ||
<div class="pos-receipt"> | ||
<OrderHeaderReceipt company="receipt.company" /> | ||
<p | ||
class="receipt__divider" | ||
>------------------------------------------------</p> | ||
<OrderSubtitleReceipt order="receipt" /> | ||
<p | ||
class="receipt__divider" | ||
>------------------------------------------------</p> | ||
<div class="body"> | ||
<div class="body__header"> | ||
# | COD | DESC | QTD | UN | VLUN R$ | VLTR R$ | VL ITEM R$ | ||
</div> | ||
<p | ||
class="receipt__divider" | ||
>------------------------------------------------</p> | ||
<t t-foreach="receipt.orderlines" t-as="line" t-key="line.id"> | ||
<OrderRowReceipt line="line" /> | ||
</t> | ||
<OrderTotalsReceipt order="receipt" rounding="receipt.rounding" /> | ||
<t | ||
t-foreach="receipt.paymentlines" | ||
t-as="paymentline" | ||
t-key="paymentline.id" | ||
> | ||
<OrderPaymentReceipt | ||
paymentline="paymentline" | ||
rounding="receipt.rounding" | ||
/> | ||
</t> | ||
<div class="receipt__change"> | ||
<div> | ||
<span>Troco R$</span> | ||
</div> | ||
<div> | ||
<span><t t-esc="receipt.change" /></span> | ||
</div> | ||
</div> | ||
<p | ||
class="receipt__divider" | ||
>------------------------------------------------</p> | ||
</div> | ||
<OrderFooterReceipt /> | ||
</div> | ||
</t> | ||
|
||
</templates> |
This file contains 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