Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <data>
- <data>
- <xpath position="replace" expr="/t[@t-name='studio_report_document']//t[@t-call='web.internal_layout']/div/div" meta-class="oe_structure"/>
- <xpath position="inside" expr="/t[@t-name='studio_report_document']//t[@t-call='web.internal_layout']/div" meta-class="page">
- <h1 class="oe_structure">Self Billing
- <span t-field="doc.name"/>
- </h1>
- <div class="row">
- <div class="col-6"/>
- <div class="col-6">
- <address class="mb-0" t-field="doc.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
- <div t-if="doc.partner_id.vat" id="partner_vat_address_same_as_shipping">
- <t t-if="doc.company_id.account_fiscal_country_id.vat_label" t-out="doc.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
- <t t-else="">Tax ID</t>:
- <span t-field="doc.partner_id.vat"/>
- </div>
- </div>
- </div>
- <br/>
- <div id="informations" class="row mb-4">
- <div class="col" t-if="doc.invoice_date" name="invoice_date">
- <strong> Invoice Date:</strong>
- <div t-field="doc.invoice_date">2023-09-12</div>
- </div>
- <div class="col" t-if="doc.invoice_date_due and doc.state == 'posted'" name="due_date">
- <strong>Due Date:</strong>
- <div t-field="doc.invoice_date_due">2023-10-31</div>
- </div>
- <div class="col" t-if="doc.invoice_origin" name="origin">
- <strong>GHG Ref:</strong>
- <div t-field="doc.invoice_origin">SO123</div>
- </div>
- </div>
- <p>
- <br/>
- </p>
- <table class="o_has_total_table table o_main_table table-borderless mb-0" name="invoice_line_table">
- <thead>
- <tr style="color: rgb(17, 24, 39); background-color: rgb(156, 198, 239);">
- <th name="th_description" class="text-start">
- <strong>Description</strong>
- </th>
- <th name="th_quantity" class="text-end">
- <strong>Quantity</strong>
- </th>
- <th name="th_priceunit" t-attf-class="text-end text-nowrap {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
- <strong>Unit Price</strong>
- </th>
- <th name="th_discount" t-if="display_discount" t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
- <strong>Disc.%</strong>
- </th>
- <th name="th_taxes" t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
- <strong>Taxes</strong>
- </th>
- <th name="th_subtotal" class="text-end">
- <strong>Amount</strong>
- </th>
- </tr>
- </thead>
- <tbody class="invoice_tbody">
- <t t-set="current_subtotal" t-value="0"/>
- <t t-set="current_total" t-value="0"/>
- <t t-set="lines" t-value="doc.invoice_line_ids.sorted(key=lambda l: (-l.sequence, l.date, l.move_name, -l.id), reverse=True)"/>
- <t t-foreach="lines" t-as="line">
- <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>
- <t t-set="current_total" t-value="current_total + line.price_total"/>
- <tr t-att-class="'fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">
- <t t-if="line.display_type == 'product'" name="account_invoice_line_accountable">
- <td name="account_invoice_line_name">
- <span t-if="line.name" t-field="line.name" t-options="{'widget': 'text'}">Bacon Burger</span>
- </td>
- <td name="td_quantity" class="o_td_quantity text-end">
- <span t-field="line.quantity" class="text-nowrap">3.00</span>
- <span t-field="line.product_uom_id" groups="uom.group_uom">units</span>
- </td>
- <td name="td_price_unit" t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
- <span class="text-nowrap" t-field="line.price_unit">9.00</span>
- </td>
- <td name="td_discount" t-if="display_discount" t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
- <span class="text-nowrap" t-field="line.discount">0</span>
- </td>
- <t t-set="taxes" t-value="', '.join([(tax.invoice_label or tax.name) for tax in line.tax_ids])"/>
- <td name="td_taxes" t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }} {{ 'text-nowrap' if len(taxes) < 10 else '' }}">
- <span t-out="taxes" id="line_tax_ids">Tax 15%</span>
- </td>
- <td name="td_subtotal" class="text-end o_price_total">
- <span class="text-nowrap" t-field="line.price_subtotal">27.00</span>
- </td>
- </t>
- <t t-elif="line.display_type == 'line_section'">
- <td colspan="99">
- <span t-if="line.name" t-field="line.name" t-options="{'widget': 'text'}">A section title</span>
- </td>
- <t t-set="current_section" t-value="line"/>
- <t t-set="current_subtotal" t-value="0"/></t>
- <t t-elif="line.display_type == 'line_note'">
- <td colspan="99">
- <span t-if="line.name" t-field="line.name" t-options="{'widget': 'text'}">A note, whose content usually applies to the section or product above.</span>
- </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-end">
- <td colspan="99">
- <strong class="mr16">Subtotal</strong>
- <span t-out="current_subtotal" t-options="{"widget": "monetary", "display_currency": o.currency_id}">31.05</span>
- </td>
- </tr>
- </t>
- </t>
- </tbody>
- </table>
- <div class="overflow-hidden">
- <div id="right-elements" t-attf-class="#{'col-5 mt-5' if report_type == 'pdf' else 'col-12 col-md-5'} ms-5 d-inline-block float-end">
- <div id="total" class="clearfix row">
- <div class="ms-auto">
- <table class="o_total_table table table-borderless avoid-page-break-inside">
- <t t-if="doc.tax_totals" t-call="account.document_tax_totals" ws-call-key="2" ws-view-id="2494">
- <t t-set="tax_totals" t-value="doc.tax_totals"/>
- <t t-set="currency" t-value="doc.currency_id"/></t>
- <t t-if="print_with_payments">
- <t t-if="doc.payment_state != 'invoicing_legacy'">
- <t t-set="payments_vals" t-value="doc.sudo().invoice_payments_widget and doc.sudo().invoice_payments_widget['content'] or []"/>
- <t t-foreach="payments_vals" t-as="payment_vals">
- <tr t-if="payment_vals['is_exchange'] == 0">
- <td>
- <i class="oe_form_field text-end oe_payment_label">
- <t t-if="payment_vals['is_refund']">Reversed on </t>
- <t t-else="">Paid on </t>
- <t t-out="payment_vals['date']" t-options="{"widget": "date"}">2021-09-19</t>
- </i>
- </td>
- <td class="text-end">
- <span t-out="payment_vals['amount']" t-options="{"widget": "monetary", "display_currency": o.currency_id}">20.00</span>
- </td>
- </tr>
- </t>
- <t t-if="len(payments_vals) > 0">
- <tr class="fw-bold">
- <td>Amount Due</td>
- <td class="text-end">
- <span t-field="doc.amount_residual">11.05</span>
- </td>
- </tr>
- </t>
- </t>
- </t>
- </table>
- </div>
- </div>
- <div class="mb-2">
- <p class="text-end lh-sm" t-if="doc.company_id.display_invoice_amount_total_words">
- Total amount in words:
- <br/>
- <small class="text-muted lh-sm">
- <span t-field="doc.amount_total_words">Thirty one dollar and Five cents</span>
- </small>
- </p>
- <p class="text-end lh-sm" t-if="doc.invoice_payment_term_id">
- Payment will be done under
- <span t-field="doc.invoice_payment_term_id"/>
- <br/>
- Paid on
- <span t-field="doc.partner_bank_id.acc_number"/>
- </p>
- </div>
- <t t-if="doc.tax_totals.get('display_in_company_currency')">
- <t t-set="tax_totals" t-value="o.tax_totals"/>
- <t t-call="account.document_tax_totals_company_currency_template" ws-call-key="3" ws-view-id="2494"/></t>
- <t t-else="">
- <div class="oe_structure">
- <br/>
- </div>
- </t>
- </div>
- </div>
- </xpath>
- </data>
- </data>
Advertisement
Add Comment
Please, Sign In to add comment