pos_ticket_view.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- This is the "validation" screen. Recap the ticket info, warn the user to check/set his address and eventually set localization fields if needed. -->
  4. <template id="ticket_validation_screen">
  5. <t t-call="portal.portal_layout">
  6. <t t-set="no_breadcrumbs" t-value="True"/>
  7. <div class="row justify-content-md-center">
  8. <form method="post" target="_self" t-att-action="'/pos/ticket/validate'">
  9. <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
  10. <input type="hidden" name="access_token" t-att-value="access_token"/>
  11. <div class="col-12 col-md-6 mt-4 offset-md-3">
  12. <div class="row">
  13. <h2>Invoicing confirmation</h2>
  14. <hr class="mt-1 mb-0"/>
  15. </div>
  16. <div class="row">
  17. <h4 class="mt-2"><t t-out="pos_order.pos_reference"/></h4>
  18. </div>
  19. <div class="row">
  20. <div class="col-12 fw-bold">
  21. Products:
  22. </div>
  23. </div>
  24. <div class="row">
  25. <div class="col-12">
  26. <ul>
  27. <t t-foreach="pos_order.lines" t-as="order_line">
  28. <li><t t-out="int(order_line.qty)"/> <t t-out="order_line.full_product_name"/> for <t t-out="format_amount(env, order_line.price_subtotal_incl, order_line.currency_id)"/></li>
  29. </t>
  30. </ul>
  31. </div>
  32. </div>
  33. <div class="row">
  34. <div class="col-12">
  35. <strong>Amounting to:</strong> <t t-out="format_amount(env, pos_order.amount_total, pos_order.currency_id)"/>
  36. </div>
  37. </div>
  38. <t t-if="user_is_connected">
  39. <div class="row mt-4">
  40. <div class="col-12">
  41. <h4>Billing address:</h4>
  42. </div>
  43. </div>
  44. <div t-if="error_message" class="alert alert-danger" role="alert">
  45. <div class="col-lg-12">
  46. <t t-foreach="error_message" t-as="err"><t t-esc="err"/><br /></t>
  47. </div>
  48. </div>
  49. <t t-if="not partner_address">
  50. Your address is missing or incomplete. <br/>
  51. Please make sure to <a t-att-href="address_url">fill all relevant information</a> before continuing.
  52. </t>
  53. <t t-else="">
  54. <div class="row">
  55. <div class="col-12">
  56. <t t-out="partner.name"/>
  57. <t t-if="partner.company_name">
  58. , <t t-out="partner.company_name"/>
  59. </t><br />
  60. <t t-if="partner.vat">
  61. <t t-out="partner.vat" /><br />
  62. </t>
  63. <t t-out="partner_address"/> <a role="button" t-att-href="address_url" class="btn btn-sm btn-link"><i class="fa fa-pencil"/> Edit</a>
  64. </div>
  65. </div>
  66. </t>
  67. <t t-if="partner_required_fields">
  68. <div class="row mt-4">
  69. <div class="col-12">
  70. <h4>Additional required user information:</h4>
  71. <t t-set="required_fields" t-value="partner_required_fields"/>
  72. <t t-set="field_prefix" t-value="'partner_'"/>
  73. <t t-call="account.portal_invoice_required_fields_form"/>
  74. </div>
  75. </div>
  76. </t>
  77. <t t-if="invoice_required_fields">
  78. <div class="row mt-4">
  79. <div class="col-12">
  80. <h4>Additional required invoicing information:</h4>
  81. <t t-set="required_fields" t-value="invoice_required_fields"/>
  82. <t t-set="field_prefix" t-value="'invoice_'"/>
  83. <t t-call="account.portal_invoice_required_fields_form"/>
  84. </div>
  85. </div>
  86. </t>
  87. </t>
  88. <t t-else="">
  89. <div class="row mt-4">
  90. <div class="col-12">
  91. <h4>Please enter your billing information <small class="text-muted">or</small> <a role="button" t-att-href="'/web/login?redirect=/pos/ticket/validate?access_token=%s' % access_token" style="margin-top: -11px"> Sign in</a>:</h4>
  92. </div>
  93. </div>
  94. <div class="row o_portal_details">
  95. <div class="col-lg-12">
  96. <div class="row">
  97. <t t-call="portal.portal_my_details_fields" />
  98. <t t-if="partner_required_fields">
  99. <t t-set="required_fields" t-value="partner_required_fields"/>
  100. <t t-set="field_prefix" t-value="'partner_'"/>
  101. <t t-call="account.portal_invoice_required_fields_form"/>
  102. </t>
  103. </div>
  104. </div>
  105. </div>
  106. <t t-if="invoice_required_fields">
  107. <div class="row mt-4">
  108. <div class="col-12">
  109. <div class="row">
  110. <h4>Additional required information:</h4>
  111. <t t-set="required_fields" t-value="invoice_required_fields"/>
  112. <t t-set="field_prefix" t-value="'invoice_'"/>
  113. <t t-call="account.portal_invoice_required_fields_form"/>
  114. </div>
  115. </div>
  116. </div>
  117. </t>
  118. </t>
  119. <div class="row mt-4">
  120. <div class="col-12 col-md-4">
  121. <t t-if="user_is_connected and not partner_address">
  122. <button class="btn btn-primary w-100" disabled="True">Get my invoice</button>
  123. </t>
  124. <t t-else="">
  125. <button class="btn btn-primary w-100">Get my invoice</button>
  126. </t>
  127. </div>
  128. </div>
  129. </div>
  130. </form>
  131. </div>
  132. </t>
  133. </template>
  134. </odoo>