Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <t t-name="pl_custom_invoice_report.report_invoice_document_carbon">
- <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')">
- <t t-raw="0"/>
- <t t-call="pl_custom_invoice_report.custom_invoice_header_footer"/>
- <div style="padding-top:180px;"></div>
- <t t-set="o" t-value="o.with_context(lang=lang)"/>
- <div class="page" style="position:relative !important;">
- <t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
- <table class="table table-sm table-borderless o_main_table" style="border-bottom:4px solid white;margin-bottom:50px;">
- <tbody class="invoice_tbody" style="font-size: 14px; padding-bottom: 20px;">
- <t t-set="current_subtotal" t-value="0"/>
- <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)"/>
- <t t-set="sequence" t-value="1"/>
- <t t-foreach="lines" t-as="line" style="border: 0 solid">
- <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
- <t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
- <t t-if="page_break == row_index">
- </tbody>
- </table>
- <div style="dislay: block;page-break-after: always;"/>
- <table class="table">
- <tbody>
- </t>
- <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">
- <t t-if="not line.display_type" name="account_invoice_line_accountable" style="padding: 0; margin:0; font-size:14px;">
- <td name="account_invoice_line_sequence" style="padding: 0; margin:0;text-align:center;font-size:14px;">
- <span t-esc="sequence"/>
- </td>
- <td name="account_invoice_line_name" style="padding: 0; margin:0 0 0 0 !important;">
- <span style="margin-left:30px;" t-field="line.name" t-options="{'widget': 'text'}"/>
- </td>
- <td class="text-right" style="padding: 0 0 0 0; margin:0 0 0 80 !important; font-size:14px;">
- <t t-if="line.product_uom_id.name == 'Units'">
- <t t-esc=" '%.0f' % line.quantity"/></t>
- <t t-if="line.product_uom_id.name == 'kg'">
- <t t-esc=" '%.3f' % line.quantity"/></t>
- <span style="margin-right:50px; text-transform:lowercase;" t-field="line.product_uom_id" groups="uom.group_uom"/>
- </td>
- <td t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}" style="padding: 0; float:right; margin:0;">
- <span style="margin-right:50px; float:left;" class="text-nowrap" t-field="line.price_unit"/>
- </td>
- <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;">
- <span class="text-nowrap" t-field="line.discount"/>
- </td>
- <td t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}" style="padding: 0; margin:0;">
- <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))" id="line_tax_ids"/>
- </td>
- <td class="text-right o_price_total" style="padding: 0; margin: 0 20 0 0;">
- <span class="text-nowrap" t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
- <span class="text-nowrap" t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
- </td>
- </t>
- <t t-if="line.display_type == 'line_section'">
- <td colspan="99">
- <span t-field="line.name" t-options="{'widget': 'text'}"/>
- </td>
- <t t-set="current_section" t-value="line"/>
- <t t-set="current_subtotal" t-value="0"/></t>
- <t t-if="line.display_type == 'line_note'">
- <td colspan="99">
- <span t-field="line.name" t-options="{'widget': 'text'}"/>
- </td>
- </t>
- </tr>
- <t t-if="current_section and (line_last or lines[line_index+1].display_type == 'line_section')">
- <tr class="is-subtotal text-right">
- <td colspan="99">
- <strong class="mr16">Subtotal</strong>
- <span t-esc="current_subtotal" t-options="{"widget": "monetary", "display_currency": o.currency_id}"/>
- </td>
- </tr>
- </t>
- <t t-set="sequence" t-value="sequence + 1"/>
- </t>
- <tr>
- <td colspan="99">
- <div class="clearfix" style="position:absolute !important; top: 710px; right: 250px;line-height:0">
- <!--<p t-if="o.narration" name="comment"><span t-field="o.narration"/></p>-->
- <p t-if="o.invoice_payment_term_id" name="payment_term" style="font-size:12px;margin-left:-120px;text-transform:uppercase;line-height:0">
- Payment
- <b>
- <span t-field="o.invoice_payment_term_id"/>
- </b> after statement of accounts
- <!--<span t-field="o.invoice_payment_term_id.note"/>-->
- </p>
- <p t-if="o.amount_total" style="font-size:12px;margin-left:-120px;text-transform:uppercase;line-height:normal">
- <span t-esc="o.compute_amount_in_word(o.amount_total)"/>
- </p>
- <div id="total" class="row" style="margin-top:-30px !important;">
- <div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto">
- <table class="table table-sm table-borderless" style="page-break-inside: avoid; width:222px; margin-left:235px !important;border-bottom: 4px solid white">
- <tr>
- <td class="text-right">
- <strong>TOTAL</strong>
- </td>
- <td style="" class="text-right">
- <span class="text-nowrap text-right" style="" t-field="o.amount_total"/>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </t>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement