Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <odoo>
- <data>
- <template id="report_invoice_document_edited" inherit_id="account.report_invoice_document">
- <xpath expr="//div[hasclass('page')]" position="replace">
- <xpath expr="." position="inside">
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"/>
- </xpath>
- <div class="page"
- style="margin-left: 17mm; margin-right: 25px; padding-top: 10mm; padding-button: 75px; font-family: 'Open Sans', sans-serif; font-size: 15px;">
- <div class="row" style="padding-bottom: 15px;">
- <div name="invoice_address" class="col-xs-6 col-xs-offset-6"/>
- </div>
- <div class="row">
- <div class="col-xs-6">
- <address t-field="o.partner_id"
- t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
- </div>
- <!--<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'TIN'"/>: <span t-field="o.partner_id.vat"/></div>-->
- <div class="col-xs-6 float-left">
- <div class="row row-bottom-margin" style="margin-left: 11mm;">
- <div class="col-xs-6">
- <h2 style="font-family: 'Open Sans', sans-serif; font-size: 15px;display: inline">
- <span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">
- Invoice Number
- </span>
- <span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
- <span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice
- </span>
- <span t-if="o.type == 'out_refund'">Credit Note</span>
- <span t-if="o.type == 'in_refund'">Vendor Credit Note</span>
- <span t-if="o.type == 'in_invoice'">Vendor Bill</span>
- </h2>
- </div>
- <div class="col-xs-6">
- <b>
- <span t-field="o.number"/>
- </b>
- </div>
- </div>
- <div style="margin-left: 11mm;" t-if="o.date_invoice" class="row row-bottom-margin">
- <br/>
- <div class="col-xs-6">
- Invoice Date
- </div>
- <div class="col-xs-6">
- <span t-field="o.date_invoice"/>
- </div>
- </div>
- <div style="margin-left: 11mm;" t-if="o.origin" class="row">
- <div t-if="o.type == 'out_invoice'" class="col-xs-6">
- Order ID
- </div>
- <div t-if="o.type == 'out_refund'" class="col-xs-6">
- Invoice
- </div>
- <div class="col-xs-6">
- <span t-field="o.origin"/>
- </div>
- </div>
- <div style="margin-left: 11mm;" t-if="o.partner_id.ref" class="row">
- <div class="col-xs-6">
- Customer Code
- </div>
- <div class="col-xs-6">
- <span t-field="o.partner_id.ref"/>
- </div>
- </div>
- <div style="margin-left: 11mm;" t-if="o.partner_id.id" class="row">
- <div class="col-xs-6">
- Customer ID
- </div>
- <div class="col-xs-6">
- <span t-field="o.partner_id.custom_id"/>
- </div>
- </div>
- <div style="margin-left: 11mm;" name="reference" t-if="o.reference" class="row">
- <div class="col-xs-6">
- Reference
- </div>
- <div class="col-xs-6">
- <span t-field="o.reference"/>
- </div>
- </div>
- <div style="margin-left: 11mm;" t-if="o.payment_term_id" class="row">
- <div class="col-xs-6">
- Payment terms
- </div>
- <div class="col-xs-6">
- <span t-field="o.payment_term_id"/>
- </div>
- </div>
- <div style="margin-left: 11mm;" t-if="o.payment_method" class="row">
- <div class="col-xs-6">
- Payment method
- </div>
- <div class="col-xs-6">
- <span t-field="o.payment_method"/>
- </div>
- </div>
- <br/>
- <div style="margin-left: 11mm;" t-if="o.partner_shipping_id" class="row">
- <div class="col-xs-6">
- Shipping address
- </div>
- <div class="col-xs-6">
- <div t-field="o.partner_shipping_id.name"/>
- <div t-field="o.partner_shipping_id.street"/>
- <div t-field="o.partner_shipping_id.street2"/>
- <div t-field="o.partner_shipping_id.zip"/>
- <div t-field="o.partner_shipping_id.city"/>
- <div t-field="o.partner_shipping_id.country_id.name"/>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div t-if="o.type == 'out_invoice'" class="col-xs-4 col-xs-offset-0"
- style="padding-bottom: 30px; font-size: 25px; margin-top: 2cm;">
- <b>Invoice</b>
- </div>
- <div t-if="o.type == 'out_refund'" class="col-xs-4 col-xs-offset-0"
- style="padding-bottom: 30px; font-size: 25px; margin-top: 2cm;">
- <b>Credit Note</b>
- </div>
- </div>
- <t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
- <table class="table table-condensed" name="invoice_line_table">
- <thead>
- <tr>
- <th style="border-bottom: 1px solid #000000 !important;">Product</th>
- <th class="hidden" style="border-bottom: 1px solid #000000 !important;">Source
- Document
- </th>
- <th class="text-right" style="border-bottom: 1px solid #000000 !important;">Quantity
- </th>
- <th class="text-right" style="border-bottom: 1px solid #000000 !important;">Unit Price
- </th>
- <th t-if="display_discount" class="text-right"
- style="border-bottom: 1px solid #000000 !important;">Disc.(%)
- </th>
- <th class="text-right" style="border-bottom: 1px solid #000000 !important;">Amount</th>
- </tr>
- </thead>
- <tbody class="invoice_tbody">
- <tr t-foreach="o.invoice_line_ids" t-as="l" t-if="o.partner_id.is_company">
- <td>
- <span t-field="l.name"/>
- </td>
- <td class="hidden">
- <span t-field="l.origin"/>
- </td>
- <td class="text-right">
- <span t-field="l.quantity"/>
- <span t-field="l.uom_id" groups="product.group_uom"/>
- </td>
- <td class="text-right">
- <span t-field="l.price_unit"/>
- </td>
- <td t-if="display_discount" class="text-right">
- <span t-field="l.discount"/>
- </td>
- <td class="text-right" id="subtotal_company">
- <span t-field="l.price_subtotal"
- t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
- </td>
- </tr>
- <tr t-else="o.partner_id.customer">
- <td>
- <span t-field="l.product_id"/>
- </td>
- <td class="hidden">
- <span t-field="l.origin"/>
- </td>
- <td class="text-right">
- <span t-esc="int(l.quantity)"/>
- <span t-field="l.uom_id" groups="product.group_uom"/>
- </td>
- <td class="text-right">
- <span t-field="l.price_unit"/>
- </td>
- <td t-if="display_discount" class="text-right">
- <span t-field="l.discount"/>
- </td>
- <td class="text-right" id="subtotal_customer">
- <span t-field="l.price_total"
- t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
- </td>
- </tr>
- </tbody>
- </table>
- <div class="clearfix" style="border-top: 1px solid #000000;">
- <div id="total" class="row">
- <div class="col-xs-6 pull-right">
- <table class="table">
- <tr>
- <td>
- <strong>Subtotal</strong>
- </td>
- <td class="text-right">
- <span t-field="o.amount_untaxed"
- t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
- </td>
- </tr>
- <t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
- <tr>
- <t t-if="len(o.tax_line_ids) == 1 and o.amount_untaxed == amount_by_group[2]">
- <td>
- <span t-esc="amount_by_group[0]"/>
- <span>&nbsp;
- <span>on</span>
- <t t-esc="amount_by_group[4]"/>
- </span>
- </td>
- <td class="text-right">
- <span t-esc="amount_by_group[3]"/>
- </td>
- </t>
- <t t-else="">
- <td>
- <span t-esc="amount_by_group[0]"/>
- </td>
- <td class="text-right">
- <span t-esc="amount_by_group[3]"/>
- </td>
- </t>
- </tr>
- </t>
- <tr class="border-black">
- <td>
- <strong>Total</strong>
- </td>
- <td class="text-right">
- <span t-field="o.amount_total"
- t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <div t-if="o.comment">
- <span t-field="o.comment"/>
- </div>
- <div t-if="o.fiscal_position_id.note">
- <span t-field="o.fiscal_position_id.note"/>
- </div>
- </div>
- </xpath>
- </template>
- </data>
- </odoo>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement