<?xml version="1.0"?>
<data name="Purchase Order Portal Template" inherit_id="portal.portal_sidebar" primary="True">
      <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
          <t t-set="o_portal_fullwidth_alert" groups="purchase.group_purchase_manager">
              <t t-call="portal.portal_back_in_edit_mode">
                  <t t-set="backend_url" t-value="'/web#model=%s&amp;id=%s&amp;action=%s&amp;view_type=form' % (order._name, order.id, order.env.ref('purchase.purchase_rfq').id)"/>
              </t>
          </t>

          <div class="row mt16 o_portal_purchase_sidebar">
              <!-- Sidebar -->
              <t t-call="portal.portal_record_sidebar">
                  <t t-set="classes" t-value="'col-lg-auto d-print-none'"/>

                  <t t-set="title">
                      <h2 class="mb-0"><b t-field="order.amount_total" data-id="total_amount"/> </h2>
                  </t>
                  <t t-set="entries">
                      <ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column">
                          <li class="list-group-item flex-grow-1">
                              <div class="o_download_pdf btn-toolbar flex-sm-nowrap">
                                  <div class="btn-group flex-grow-1 me-1 mb-1">
                                      <a class="btn btn-secondary btn-block o_download_btn" t-att-href="order.get_portal_url(report_type='pdf', download=True)" title="Download"><i class="fa fa-download"/> Download</a>
                                  </div>
                                  <div class="btn-group flex-grow-1 mb-1">
                                      <a class="btn btn-secondary btn-block o_print_btn o_portal_invoice_print" t-att-href="order.get_portal_url(report_type='pdf')" id="print_invoice_report" title="Print" target="_blank"><i class="fa fa-print"/> Print</a>
                                  </div>
                              </div>
                          </li>

                          <li class="navspy list-group-item ps-0 flex-grow-1" t-ignore="true" role="complementary">
                              <ul class="nav flex-column bs-sidenav"/>
                          </li>

                          <li t-if="order.user_id" class="list-group-item flex-grow-1">
                              <div class="small mb-1"><strong class="text-muted">Purchase Representative</strong></div>
                              <div class="row flex-nowrap">
                                  <div class="col flex-grow-0 pe-2">
                                      <img class="rounded-circle mr4 float-start o_portal_contact_img" t-att-src="image_data_uri(order.user_id.avatar_128)" alt="Contact"/>
                                  </div>
                                  <div class="col ps-0" style="min-width: 150px">
                                      <span t-field="order.user_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True}"/>
                                      <a href="#discussion" class="small"><i class="fa fa-comment"/> Send message</a>
                                  </div>
                              </div>
                          </li>
                      </ul>
                  </t>
              </t>

              <!-- Page content -->
              <div id="quote_content" class="col-12 col-lg justify-content-end">

                  <!-- status messages -->
                  <div t-if="order.state == 'cancel'" class="alert alert-danger alert-dismissable d-print-none" role="alert">
                      <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="close"/>
                      <strong>This purchase has been canceled.</strong>
                  </div>

                  <!-- main content -->
                  <div t-attf-class="card #{'pb-5' if report_type == 'html' else ''}" id="portal_purchase_content">
                      <div t-call="purchase.purchase_order_portal_content"/>
                  </div>

                  <!-- chatter -->
                  <div id="purchase_order_communication" class="mt-4">
                      <h2>History</h2>
                      <t t-call="portal.message_thread"/>
                  </div>
              </div><!-- // #quote_content -->
          </div>
      </xpath>
  <xpath expr="." position="attributes"><attribute name="t-name">purchase.portal_my_purchase_order</attribute></xpath></data>

  