Advertisement
Guest User

Untitled

a guest
Dec 4th, 2022
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <t t-name="pl_custom_invoice_report.report_invoice_document_carbon">
  3. <div class="article" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')">
  4. <t t-raw="0"/>
  5.  
  6. <t t-call="pl_custom_invoice_report.custom_invoice_header_footer"/>
  7. <div style="padding-top:180px;"></div>
  8. <t t-set="o" t-value="o.with_context(lang=lang)"/>
  9.  
  10. <div class="page" style="position:relative !important;">
  11. <t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
  12.  
  13. <table class="table table-sm table-borderless o_main_table" style="border-bottom:4px solid white;margin-bottom:50px;">
  14.  
  15. <tbody class="invoice_tbody" style="font-size: 14px; padding-bottom: 20px;">
  16.  
  17. <t t-set="current_subtotal" t-value="0"/>
  18. <t t-set="lines" t-value="o.invoice_line_ids.sorted(key=lambda l: (-l.sequence, l.date, l.move_name, -l.id), reverse=True)"/>
  19. <t t-set="sequence" t-value="1"/>
  20.  
  21. <t t-foreach="lines" t-as="line" style="border: 0 solid">
  22. <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
  23. <t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
  24.  
  25. <t t-if="page_break == row_index">
  26. &lt;/tbody&gt;
  27. &lt;/table&gt;
  28.  
  29. <div style="dislay: block;page-break-after: always;"/>
  30.  
  31. &lt;table class="table"&gt;
  32. &lt;tbody&gt;
  33. </t>
  34.  
  35. <tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''" style="padding: 0; margin:0; font-size:14px">
  36. <t t-if="not line.display_type" name="account_invoice_line_accountable" style="padding: 0; margin:0; font-size:14px;">
  37.  
  38. <td name="account_invoice_line_sequence" style="padding: 0; margin:0;text-align:center;font-size:14px;">
  39. <span t-esc="sequence"/>
  40. </td>
  41.  
  42. <td name="account_invoice_line_name" style="padding: 0; margin:0 0 0 0 !important;">
  43. <span style="margin-left:30px;" t-field="line.name" t-options="{'widget': 'text'}"/>
  44. </td>
  45.  
  46. <td class="text-right" style="padding: 0 0 0 0; margin:0 0 0 80 !important; font-size:14px;">
  47. <t t-if="line.product_uom_id.name == 'Units'">
  48. <t t-esc=" '%.0f' % line.quantity"/></t>
  49. <t t-if="line.product_uom_id.name == 'kg'">
  50. <t t-esc=" '%.3f' % line.quantity"/></t>
  51. <span style="margin-right:50px; text-transform:lowercase;" t-field="line.product_uom_id" groups="uom.group_uom"/>
  52. </td>
  53.  
  54. <td t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}" style="padding: 0; float:right; margin:0;">
  55. <span style="margin-right:50px; float:left;" class="text-nowrap" t-field="line.price_unit"/>
  56. </td>
  57.  
  58. <td t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}" style="padding: 0; margin:0;">
  59. <span class="text-nowrap" t-field="line.discount"/>
  60. </td>
  61.  
  62. <td t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}" style="padding: 0; margin:0;">
  63. <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))" id="line_tax_ids"/>
  64. </td>
  65.  
  66. <td class="text-right o_price_total" style="padding: 0; margin: 0 20 0 0;">
  67. <span class="text-nowrap" t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
  68. <span class="text-nowrap" t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
  69. </td>
  70.  
  71. </t>
  72. <t t-if="line.display_type == 'line_section'">
  73. <td colspan="99">
  74. <span t-field="line.name" t-options="{'widget': 'text'}"/>
  75. </td>
  76. <t t-set="current_section" t-value="line"/>
  77. <t t-set="current_subtotal" t-value="0"/></t>
  78. <t t-if="line.display_type == 'line_note'">
  79. <td colspan="99">
  80. <span t-field="line.name" t-options="{'widget': 'text'}"/>
  81. </td>
  82. </t>
  83. </tr>
  84.  
  85. <t t-if="current_section and (line_last or lines[line_index+1].display_type == 'line_section')">
  86. <tr class="is-subtotal text-right">
  87. <td colspan="99">
  88. <strong class="mr16">Subtotal</strong>
  89. <span t-esc="current_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
  90. </td>
  91. </tr>
  92. </t>
  93. <t t-set="sequence" t-value="sequence + 1"/>
  94. </t>
  95. <tr>
  96. <td colspan="99">
  97. <div class="clearfix" style="position:absolute !important; top: 710px; right: 250px;line-height:0">
  98. <!--<p t-if="o.narration" name="comment"><span t-field="o.narration"/></p>-->
  99. <p t-if="o.invoice_payment_term_id" name="payment_term" style="font-size:12px;margin-left:-120px;text-transform:uppercase;line-height:0">
  100. Payment
  101. <b>
  102. <span t-field="o.invoice_payment_term_id"/>
  103. </b> after statement of accounts
  104.  
  105. <!--<span t-field="o.invoice_payment_term_id.note"/>-->
  106. </p>
  107. <p t-if="o.amount_total" style="font-size:12px;margin-left:-120px;text-transform:uppercase;line-height:normal">
  108. <span t-esc="o.compute_amount_in_word(o.amount_total)"/>
  109. </p>
  110. <div id="total" class="row" style="margin-top:-30px !important;">
  111. <div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto">
  112. <table class="table table-sm table-borderless" style="page-break-inside: avoid; width:222px; margin-left:235px !important;border-bottom: 4px solid white">
  113. <tr>
  114. <td class="text-right">
  115. <strong>TOTAL</strong>
  116. </td>
  117. <td style="" class="text-right">
  118. <span class="text-nowrap text-right" style="" t-field="o.amount_total"/>
  119. </td>
  120. </tr>
  121. </table>
  122. </div>
  123. </div>
  124. </div>
  125. </td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. </div>
  130. </div>
  131. </t>
  132.  
  133.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement