purchase_quotation_templates.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="report_purchasequotation_document">
  4. <t t-call="web.external_layout">
  5. <t t-set="o" t-value="o.with_context(lang=o.partner_id.lang)"/>
  6. <t t-set="forced_vat" t-value="o.fiscal_position_id.foreign_vat"/> <!-- So that it appears in the footer of the report instead of the company VAT if it's set -->
  7. <t t-set="address">
  8. <div t-field="o.partner_id"
  9. t-options='{"widget": "contact", "fields": ["address", "name", "phone", "vat"], "no_marker": True, "phone_icons": True}'/>
  10. </t>
  11. <t t-if="o.dest_address_id">
  12. <t t-set="information_block">
  13. <strong>Shipping address:</strong>
  14. <div t-field="o.dest_address_id"
  15. t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}' name="purchase_shipping_address"/>
  16. </t>
  17. </t>
  18. <div class="page">
  19. <div class="oe_structure"/>
  20. <h2 class="mt-4">Request for Quotation <span t-field="o.name"/></h2>
  21. <table class="table table-sm mt-4">
  22. <thead style="display: table-row-group">
  23. <tr>
  24. <th name="th_description"><strong>Description</strong></th>
  25. <th name="th_expected_date" class="text-center"><strong>Expected Date</strong></th>
  26. <th name="th_quantity" class="text-end"><strong>Qty</strong></th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <t t-foreach="o.order_line" t-as="order_line">
  31. <tr t-att-class="'bg-200 fw-bold o_line_section' if order_line.display_type == 'line_section' else 'fst-italic o_line_note' if order_line.display_type == 'line_note' else ''">
  32. <t t-if="not order_line.display_type">
  33. <td id="product">
  34. <span t-field="order_line.name"/>
  35. </td>
  36. <td class="text-center">
  37. <span t-field="order_line.date_planned"/>
  38. </td>
  39. <td class="text-end">
  40. <span t-field="order_line.product_qty"/>
  41. <span t-field="order_line.product_uom" groups="uom.group_uom"/>
  42. </td>
  43. </t>
  44. <t t-else="">
  45. <td colspan="99" id="section">
  46. <span t-field="order_line.name"/>
  47. </td>
  48. </t>
  49. </tr>
  50. </t>
  51. </tbody>
  52. </table>
  53. <p t-field="o.notes" class="mt-4"/>
  54. <div class="oe_structure"/>
  55. </div>
  56. </t>
  57. </template>
  58. <template id="report_purchasequotation">
  59. <t t-call="web.html_container">
  60. <t t-foreach="docs" t-as="o">
  61. <t t-call="purchase.report_purchasequotation_document" t-lang="o.partner_id.lang"/>
  62. </t>
  63. </t>
  64. </template>
  65. </odoo>