6 changed files with 49 additions and 10 deletions
@ -0,0 +1,18 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!--Adding the logo in the pos ReceiptHeader--> |
|||
<templates id="point_of_sale.template" xml:space="preserve"> |
|||
<t t-inherit="point_of_sale.ReceiptHeader" t-inherit-mode="extension" |
|||
owl="1"> |
|||
<xpath expr="//img" position="replace"> |
|||
<t t-if="this.env.services.pos.config.logo_option === 'pos'"> |
|||
<img t-attf-src="/web/image?model=pos.config&field=image&id={{ this.env.services.pos.config.id }}" |
|||
alt="Logo" class="pos-receipt-logo"/> |
|||
</t> |
|||
<t t-else=""> |
|||
<img t-attf-src="/web/image?model=res.company&id={{props.data.company.id}}&field=logo" |
|||
alt="Logo" class="pos-receipt-logo"/> |
|||
</t> |
|||
</xpath> |
|||
</t> |
|||
</templates> |
|||
|
@ -1,14 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!--Adding the logo in the pos receipt--> |
|||
<templates id="point_of_sale.template" xml:space="preserve"> |
|||
<!--Adding the logo in the pos Receipt--> |
|||
<templates id="point_of_sale.receipt_template" xml:space="preserve"> |
|||
<t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" |
|||
owl="1"> |
|||
<xpath expr="//div[hasclass('pos-receipt')]/ReceiptHeader" |
|||
position="before"> |
|||
<t t-log="this.env.services.pos.config.id"/> |
|||
<img t-if="this.env.services.pos.config.image" |
|||
<img t-if="this.env.services.pos.config.logo_option === 'both'" |
|||
t-attf-src="/web/image?model=pos.config&field=image&id={{ this.env.services.pos.config.id }}" |
|||
style="width:10%"/> |
|||
</xpath> |
|||
</t> |
|||
</templates> |
|||
</templates> |
Loading…
Reference in new issue