report_purchaserequisition.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <template id="report_purchaserequisitions">
  5. <t t-call="web.html_container">
  6. <t t-foreach="docs" t-as="o">
  7. <t t-call="web.external_layout">
  8. <t t-set="address">
  9. <div t-field="o.vendor_id"
  10. t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
  11. <p t-if="o.vendor_id.vat"><t t-esc="o.company_id.account_fiscal_country_id.vat_label or 'Tax ID'"/>: <span t-field="o.vendor_id.vat"/></p>
  12. </t>
  13. <div class="page">
  14. <div class="oe_structure"/>
  15. <h2><span t-out="o.type_id.name"/> <span t-field="o.name"/></h2>
  16. <div class="row my-2">
  17. <div class="col-3">
  18. <strong><span t-out="o.type_id.name"/> Reference:</strong><br/>
  19. <span t-field="o.name"/>
  20. </div>
  21. <div class="col-3">
  22. <strong>Scheduled Ordering Date:</strong><br/>
  23. <span t-field="o.ordering_date"/>
  24. </div>
  25. <div class="col-3">
  26. <strong>Agreement Deadline:</strong><br/>
  27. <span t-field="o.date_end"/>
  28. </div>
  29. <div class="col-3">
  30. <strong>Source:</strong><br/>
  31. <span t-field="o.origin"/>
  32. </div>
  33. </div>
  34. <t t-if="o.line_ids">
  35. <h3>Products</h3>
  36. <table class="table table-sm">
  37. <thead>
  38. <tr>
  39. <th><strong>Product</strong></th>
  40. <th><strong>Description</strong></th>
  41. <th class="text-end"><strong>Qty</strong></th>
  42. <th class="text-center" groups="uom.group_uom">
  43. <strong>Product UoM</strong>
  44. </th>
  45. <th t-if="o.type_id == env.ref('purchase_requisition.type_single')">Price Unit</th>
  46. <th class="text-end"><strong>Scheduled Date</strong></th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. <tr t-foreach="o.line_ids" t-as="line_ids">
  51. <td>
  52. <t t-if="line_ids.product_id.code"><!--internal reference exists-->
  53. [ <span t-field="line_ids.product_id.code"/> ]
  54. </t>
  55. <span t-field="line_ids.product_id.name"/>
  56. </td>
  57. <td>
  58. <span t-field="line_ids.product_description_variants"/>
  59. </td>
  60. <td class="text-end">
  61. <span t-field="line_ids.product_qty"/>
  62. </td>
  63. <t>
  64. <td class="text-center" groups="uom.group_uom">
  65. <span t-field="line_ids.product_uom_id.name"/>
  66. </td>
  67. </t>
  68. <td t-if="o.type_id == env.ref('purchase_requisition.type_single')">
  69. <span t-field="line_ids.price_unit" t-options='{"widget": "monetary", "display_currency": line_ids.requisition_id.currency_id}'/>
  70. </td>
  71. <td class="text-end">
  72. <span t-field="line_ids.schedule_date"/>
  73. </td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. </t>
  78. <t t-if="o.purchase_ids">
  79. <h3>Requests for Quotation Details</h3>
  80. <table class="table table-sm">
  81. <thead>
  82. <tr>
  83. <th><strong>Vendor </strong></th>
  84. <th class="text-end"><strong>Date</strong></th>
  85. <th class="text-end"><strong>Reference </strong></th>
  86. </tr>
  87. </thead>
  88. <tbody>
  89. <tr t-foreach="o.purchase_ids" t-as="purchase_ids">
  90. <td>
  91. <span t-field="purchase_ids.partner_id.name"/>
  92. </td>
  93. <td class="text-end">
  94. <span t-field="purchase_ids.date_order"/>
  95. </td>
  96. <td class="text-end">
  97. <span t-field="purchase_ids.name"/>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. </t>
  103. <div t-if="o.description" t-out="o.description"/>
  104. <div class="oe_structure"/>
  105. </div>
  106. </t>
  107. </t>
  108. </t>
  109. </template>
  110. </data>
  111. </odoo>