| 1 |
<?xml version='1.0' encoding='utf-8' ?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<template id="ticket_validation_screen" inherit_id="point_of_sale.ticket_validation_screen"> |
| 5 |
<!-- We do not let the user create the invoice by themselves. That is why we hide the |
| 6 |
"Get my Invoice" button --> |
| 7 |
<xpath expr="//div[@id='get_my_invoice']" position="attributes"> |
| 8 |
<attribute name="t-if" add="(pos_order.company_id.country_code != 'PE')" separator="and" /> |
| 9 |
</xpath> |
| 10 |
<xpath expr="//div[@id='get_my_invoice']/.." position="after"> |
| 11 |
<h4 class="text-danger" t-if="pos_order.company_id.country_code == 'PE' and not pos_order.is_invoiced"> |
| 12 |
Invoice not available. You can contact us for more info. |
| 13 |
</h4> |
| 14 |
</xpath> |
| 15 |
|
| 16 |
<!-- If the user is NOT logged in we should hide the partner form, this one lost functionality |
| 17 |
because the get my invoice button is not shown and then the partner info is never saved. In they |
| 18 |
want they can sign up and fill data from there --> |
| 19 |
<xpath expr="//div[hasclass('portal_details')]" position="attributes"> |
| 20 |
<attribute name="t-if" add="(pos_order.company_id.country_code != 'PE')" separator="and" /> |
| 21 |
</xpath> |
| 22 |
<xpath expr="//div[@id='get_info_div']" position="attributes"> |
| 23 |
<attribute name="t-if" add="(pos_order.company_id.country_code != 'PE')" separator="and" /> |
| 24 |
</xpath> |
| 25 |
<xpath expr="//div[@id='get_info_div']" position="after"> |
| 26 |
<h4 t-elif="pos_order.company_id.country_code == 'PE'"> |
| 27 |
Please |
| 28 |
<a |
| 29 |
role="button" |
| 30 |
t-att-href="'/web/login?redirect=/pos/ticket/validate?access_token=%s' % access_token" |
| 31 |
style="margin-top: -11px" |
| 32 |
> |
| 33 |
Sign in |
| 34 |
</a> |
| 35 |
in order to save your contact info |
| 36 |
</h4> |
| 37 |
</xpath> |
| 38 |
|
| 39 |
<!-- Show PE fields preview info, and show warning is a required field need to be completed --> |
| 40 |
<xpath expr="//t[@id='partner_vat']" position="before"> |
| 41 |
<t t-if="pos_order.company_id.country_code == 'PE'"> |
| 42 |
<t t-if="partner.l10n_latam_identification_type_id"> |
| 43 |
<t t-out="partner.l10n_latam_identification_type_id.name" /> - |
| 44 |
</t> |
| 45 |
<t t-else=""> |
| 46 |
<span class="text-danger">* Please configure your Identification Type</span><br /> |
| 47 |
</t> |
| 48 |
</t> |
| 49 |
</xpath> |
| 50 |
<xpath expr="//t[@id='partner_vat']" position="after"> |
| 51 |
<t t-else=""> |
| 52 |
<span class="text-danger">* Please configure your Identification Number</span><br /> |
| 53 |
</t> |
| 54 |
</xpath> |
| 55 |
|
| 56 |
</template> |
| 57 |
|
| 58 |
</odoo> |