Account

Portal Invoice Page

Convert Html Note

ID: mint_system.account.portal_invoice_page.convert_html_note

<?xml version="1.0"?>
<data inherit_id="account.portal_invoice_page" priority="50">

    <t t-if="line.display_type == 'line_note'" position="replace">
        <t t-if="line.display_type == 'line_note' and '&lt;!DOCTYPE html&gt;' in line.name">
            <td colspan="99">
                <t t-raw="line.name.replace('&lt;!DOCTYPE html&gt;', '')" />
            </td>
        </t>
        <t t-elif="line.display_type == 'line_note' and '&lt;!DOCTYPE html&gt;' not in line.name">
            <td colspan="99">
                <span t-field="line.name"/>
            </td>
        </t>
    </t>

</data>

Source: snippets/account.portal_invoice_page.convert_html_note.xmlopen in new window

Report Invoice Document

Add Address Space

ID: mint_system.account.report_invoice_document.add_address_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <t t-set="address" position="before">
        <style>
            div.address {
                padding-top: 3rem
            }
        </style>
    </t>

</data>

Source: snippets/account.report_invoice_document.add_address_space.xmlopen in new window

Add Comment Space

ID: mint_system.account.report_invoice_document.add_comment_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <div name="comment" position="before">
        <style>
            div[name="comment"] {
                padding-top: 50px;
                padding-left: 75px;
                padding-right: 75px;
            }
        </style>
    </div>

</data>

Source: snippets/account.report_invoice_document.add_comment_space.xmlopen in new window

Add Current Subtotal Space

ID: mint_system.account.report_invoice_document.add_current_subtotal_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//span[@t-esc='current_subtotal']/../.." position="after">
        <tr>
            <td name="td_current_subtotal_space" colspan="99" height="25px" />
        </tr>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_current_subtotal_space.xmlopen in new window

ID: mint_system.account.report_invoice_document.add_header_and_footer_note

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table[@id='info']" position="after">
    <t t-if="o.note_header != '&lt;p&gt;&lt;br&gt;&lt;/p&gt;'">
      <span class="note" t-field="o.note_header"/>
    </t>
  </xpath>

  <xpath expr="//table[2]" position="after">
    <t t-if="o.note_footer != '&lt;p&gt;&lt;br&gt;&lt;/p&gt;'">
      <span class="note" t-field="o.note_footer"/>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.add_header_and_footer_note.xmlopen in new window

Add Header Padding

ID: mint_system.account.report_invoice_document.add_header_padding

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="attributes">
    <attribute name="style">padding-top: 2rem</attribute>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_header_padding.xmlopen in new window

Add Header Space

ID: mint_system.account.report_invoice_document.add_header_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//h2" position="attributes">
         <attribute name="style">padding-top: 5rem</attribute>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_header_space.xmlopen in new window

Add Iban

ID: mint_system.account.report_invoice_document.add_iban

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <!-- Odoo 14.0 -->
    <xpath expr="/t/t/div/p[2]" position="before">
        <t t-if="not o.partner_bank_id._eligible_for_qr_code('ch_qr', o.partner_id, o.currency_id)">
            <p>
                <span>IBAN: </span>
                <b>
                    <span t-field="o.partner_bank_id.acc_number" />
                </b>
                <br />
                <span>Bank/BIC: </span>
                <b>
                    <span t-field="o.partner_bank_id.bank_id.display_name" />
                </b>
            </p>
        </t>
    </xpath>

    <!-- Odoo 13.0 -->
    <!-- <xpath expr="/t/t/div/p[2]" position="after">
      <div class="row">
      <div class="col">
          <span>IBAN: </span>
          <span t-field="o.invoice_partner_bank_id.acc_number"/>
      </div>
      </div>
  </xpath>
  <xpath expr="/t/t/div/div[3]" position="after">
      <div class="row">
      <div class="col">
          <span>Bank/BIC: </span>
          <span t-field="o.invoice_partner_bank_id.bank_id.display_name"/>
          <br/>
          <br/>
      </div>
      </div>
  </xpath> -->

</data>

Source: snippets/account.report_invoice_document.add_iban.xmlopen in new window

Add Information Space

ID: mint_system.account.report_invoice_document.add_information_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//div[@id='informations']" position="before">
        <style>
            div#informations {
                padding-top: 1rem;
                padding-bottom: 1rem
            }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_information_space.xmlopen in new window

Add Percentage Sign

ID: mint_system.account.report_invoice_document.add_percentage_sign

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

<xpath expr="//span[@t-field='line.discount']" position="replace">
    <span t-field="line.discount"/>%
  </xpath>

</data>

Source: snippets/account.report_invoice_document.add_percentage_sign.xmlopen in new window

Add Sale Order Contact Name

ID: mint_system.account.report_invoice_document.add_sale_order_contact_name

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="/t/t/div/div[1]/div[5]" position="replace">
        <div class="col-auto col-3 mw-100 mb-2">
            <strong>Your contact</strong>
            <p class="m-0" t-field="o.sale_order_id.partner_contact_id.name"/>
        </div>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_sale_order_contact_name.xmlopen in new window

Add Sale Person

ID: mint_system.account.report_invoice_document.add_sale_person

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <!-- Remove reference -->
    <xpath expr="/t/t/div/div[1]/div[5]" position="replace">
    </xpath>

    <!-- Add sales person -->
    <xpath expr="/t/t/div/div[1]/div[1]" position="after">
        <div class="col-auto mw-100 mb-2" t-if="o.invoice_user_id" name="invoice_user_id">
            <strong>Salesperson:</strong>
            <p class="m-0" t-field="o.invoice_user_id.name" />
        </div>
    </xpath>

    <!-- Add referencce to new line -->
    <xpath expr="//div[@id='informations']" position="after">
        <div id="informations2" class="row mt32 mb32" t-if="o.ref">
            <div class="col-auto mw-100 mb-2" name="reference">
                <strong>Reference:</strong>
                <p class="m-0" t-field="o.ref" />
            </div>
        </div>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_sale_person.xmlopen in new window

Add Salesperson

ID: mint_system.account.report_invoice_document.add_salesperson

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="/t/t/div/div[1]/div[1]" position="after">
    <div class="col-3 bm-2" t-if="o.invoice_user_id" name="invoice_user_id">
      <strong>Contact:</strong>
      <p class="m-0" t-field="o.invoice_user_id.email"/>
      <p class="m-0" t-field="o.invoice_user_id.phone"/>
    </div>
  </xpath>

  <!-- <xpath expr="/t/t/div/div[1]/div[1]" position="after">
    <div class="col-auto mw-100 mb-2" t-if="o.invoice_user_id" name="invoice_user_id">
      <strong>Contact:</strong>
      <p class="m-0" t-field="o.invoice_user_id.email"/>
      <p class="m-0" t-field="o.invoice_user_id.phone"/>
    </div>
  </xpath> -->

  <!-- <xpath expr="/t/t/div/div[1]/div[1]" position="after">
    <div class="col-auto mw-100 mb-2" t-if="o.invoice_user_id" name="invoice_user_id">
      <strong>Salesperson:</strong>
      <p class="m-0" t-field="o.invoice_user_id.name"/>
    </div>
  </xpath> -->

</data>

Source: snippets/account.report_invoice_document.add_salesperson.xmlopen in new window

Add Taxes

ID: mint_system.account.report_invoice_document.add_taxes

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

    <xpath expr="//div[hasclass('page')]" position="before">
        <style>
        .o_company_1_layout {
            font-family: Dobra-Book;
            font-size: 80%;
            }
    .mb-4 {
          margin-bottom: 0rem !important;
          }
    #total {
          margin-bottom: 2rem;
          }
    h2 {
               font-size: 1.5rem;
              }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_taxes.xmlopen in new window

Align Taxes

ID: mint_system.account.report_invoice_document.align_taxes

<?xml version="1.0"?>
<!-- Align invoice tax row right -->
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//th[@name='th_taxes']" position="attributes">
    <attribute name="t-attf-class" separator=" " remove="text-right" add="text-right" />
  </xpath>

  <xpath expr="//span[@id='line_tax_ids']/.." position="attributes">
    <attribute name="t-attf-class" separator=" " remove="text-right" add="text-right" />
  </xpath>

</data>

Source: snippets/account.report_invoice_document.align_taxes.xmlopen in new window

Bank Account

ID: mint_system.account.report_invoice_document.bank_account

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="/t/t/div/p[2]" position="after">
    <t t-if="o.currency_id.name=='CHF'">
        <t t-set="account" t-value="o.company_id.bank_ids.browse(13)"/>
    </t>
    <t t-if="o.currency_id.name=='EUR'">
        <t t-set="account" t-value="o.company_id.bank_ids.browse(14)"/>
    </t>
    <t t-if="o.currency_id.name=='USD'">
        <t t-set="account" t-value="o.company_id.bank_ids.browse(15)"/>
    </t>
    <div class="row">
      <div class="col">
        <span>IBAN: </span>
        <span t-field="account.acc_number"/>
        <br/>
        <span>Bank/BIC: </span>
        <span t-field="account.bank_id.display_name"/>
        <br/>
        <br/>
      </div>
    </div>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.bank_account.xmlopen in new window

Convert Html Note

ID: mint_system.account.report_invoice_document.convert_html_note

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <t t-if="line.display_type == 'line_note'" position="replace">
        <t t-if="line.display_type == 'line_note' and '&lt;!DOCTYPE html&gt;' in line.name">
            <td colspan="99">
                <t t-raw="line.name.replace('&lt;!DOCTYPE html&gt;', '')" />
            </td>
        </t>
        <t t-elif="line.display_type == 'line_note' and '&lt;!DOCTYPE html&gt;' not in line.name">
            <td colspan="99">
                <span t-field="line.name"/>
            </td>
        </t>
    </t>
</data>

Source: snippets/account.report_invoice_document.convert_html_note.xmlopen in new window

Custom Address

ID: mint_system.account.report_invoice_document.custom_address

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']/address" position="replace">
    <address>
      <t t-if="o.partner_id.invoice_name">
        <div><span t-esc="o.partner_id.invoice_name" /></div>
      </t>
      <t t-if="o.partner_id.address_addition">
        <div><span t-esc="o.partner_id.address_addition" /></div>
      </t>
      <t t-if="o.partner_id.street">
        <div><span t-esc="o.partner_id.street" /></div>
      </t>
      <t t-if="o.partner_id.street2">
        <div><span t-esc="o.partner_id.street2" /></div>
      </t>
      <t t-if="o.partner_id.city and o.partner_id.city">
        <div><span t-esc="o.partner_id.zip" /> <span t-esc="o.partner_id.city" /></div>
      </t>
      <t t-if="o.partner_id.country_id">
        <div><span t-esc="o.partner_id.country_id.name" /></div>
      </t>
    </address>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.custom_address.xmlopen in new window

Custom Pament Term

ID: mint_system.account.report_invoice_document.custom_pament_term

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//p[@name='payment_term']" position="replace">
    <p t-if="o.invoice_payment_term_id" name="payment_term">
      Payment terms: <strong t-field="o.invoice_payment_term_id.name"/>
    </p>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.custom_pament_term.xmlopen in new window

Custom Taxes

ID: mint_system.account.report_invoice_document.custom_taxes

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//th[@name='th_taxes']" position="replace">
      <th name="th_taxes" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Steuern</span></th>
  </xpath>
  <xpath expr="//t[@name='account_invoice_line_accountable']/td[5]" position="replace">
      <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
          <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))" id="line_tax_ids"/>
      </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.custom_taxes.xmlopen in new window

Display Shipping Address

ID: mint_system.account.report_invoice_document.display_shipping_address

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="/t/t/t" position="after">
    <t t-if="o.partner_shipping_id">
      <t t-set="information_block">
        <strong>Shipping address:</strong>
        <div t-if="o.partner_shipping_id" style="margin-bottom: 1rem;">
          <div t-field="o.partner_shipping_id" t-options="{'widget': 'contact', 'fields': ['address', 'name'], 'no_marker': True, 'phone_icons': True}" name="invoice_shipping_address"/>
        </div>
      </t>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.display_shipping_address.xmlopen in new window

Force Company Vat

ID: mint_system.account.report_invoice_document.force_company_vat

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <t t-set="forced_vat" position="replace">
    <t t-set="forced_vat" t-value="o.company_id.vat"/>
  </t>

</data>

Source: snippets/account.report_invoice_document.force_company_vat.xmlopen in new window

Format Address Blocks

ID: mint_system.account.report_invoice_document.format_address_blocks

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']/div" position="attributes">
    <attribute name="style">font-size:10pt; line-height: 1.2; padding-bottom:33mm</attribute>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.format_address_blocks.xmlopen in new window

Format Discount

ID: mint_system.account.report_invoice_document.format_discount

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <span t-field="line.discount" position="replace">
      <span class="text-nowrap" t-esc="'{0:.2f}'.format(line.discount)" />
    </span>
  
  </data>

Source: snippets/account.report_invoice_document.format_discount.xmlopen in new window

Format Line Total

ID: mint_system.account.report_invoice_document.format_line_total

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//span[@t-field='line.price_subtotal']" position="replace">
        <span class="text-nowrap" t-esc="('{:,.2f}'.format(line.price_subtotal)).replace(',','\'')"
            groups="account.group_show_line_subtotals_tax_excluded" />
    </xpath>

    <xpath expr="//span[@t-field='line.price_total']" position="replace">
        <span class="text-nowrap" t-esc="'{:,.2f}'.format(line.price_total).replace(',','\'')"
            groups="account.group_show_line_subtotals_tax_included" />
    </xpath>

</data>

Source: snippets/account.report_invoice_document.format_line_total.xmlopen in new window

Format Pos

ID: mint_system.account.report_invoice_document.format_pos

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-if='o.sale_order_id']/td" position="attributes">
    <attribute name="style">text-align: right; width: 5mm</attribute>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.format_pos.xmlopen in new window

Format Qty With Decimal

ID: mint_system.account.report_invoice_document.format_qty_with_decimal

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//span[@id='qty']" position="replace">
        <t t-if="line.quantity.is_integer()">
            <span id="qty" t-field="line.quantity" t-options="{'widget': 'integer'}"/>
        </t>
        <t t-else="">
            <span id="qty" t-field="line.quantity"/>
        </t>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.format_qty_with_decimal.xmlopen in new window

Format Table Border

ID: mint_system.account.report_invoice_document.format_table_border

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
 
    <xpath expr="//table[@name='invoice_line_table']" position="before">
      <style>
        .border-solid-black td {
          border-top: 1px solid black !important;
          border-bottom: none !important;
        }
        thead th {
          color: #5c516e;
        }
      </style>
    </xpath>
  
    <xpath expr="//span[@t-esc='current_subtotal']/../.." position="attributes">
      <attribute name="class" separator=" " add="border-solid-black"/>
    </xpath>
  
  </data>

Source: snippets/account.report_invoice_document.format_table_border.xmlopen in new window

Format Title

ID: mint_system.account.report_invoice_document.format_title

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="attributes">
    <attribute name="style">color: black; font-size:13pt; font-weight:bold; margin-top:10mm; margin-bottom:3mm</attribute>
  </xpath>
  
</data>

Source: snippets/account.report_invoice_document.format_title.xmlopen in new window

Get Position

ID: mint_system.account.report_invoice_document.get_position

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table/thead/tr/th[1]" position="before">
    <!-- <t t-if="o.invoice_line_ids.sale_line_ids or o.invoice_line_ids.purchase_line_id">
      <th id="position">
        <span>Pos</span>
      </th>
    </t> -->
    <th id="position">
      <span>Pos</span>
    </th>
  </xpath>

  <xpath expr="//span[@t-field='line.name']/.." position="before">
    <!-- <t t-if="line.sale_line_ids or line.purchase_order_id">
      <td id="position">
        <span t-esc="line.position" />
      </td>
    </t> -->
    <td id="position">
      <span t-esc="line.position" />
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.get_position.xmlopen in new window

Group By Pickings

ID: mint_system.account.report_invoice_document.group_by_pickings

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="before">
    <!-- Get all pickings without duplicates -->
    <t t-set="pickings" t-value="list(set(o.invoice_line_ids.picking_ids.filtered(lambda p: p.state != 'cancel')))"/>
    <!--<t t-set="pickings" t-value="list(set(o.invoice_line_ids.picking_ids))"/>-->
    <t t-set="pickings" t-value="sorted(pickings, key=lambda p: p.scheduled_date)"/>
    <!-- Store if has pickings -->
    <t t-set="has_pickings" t-value="len(pickings) > 0"/>
    <!-- Store if has multiple pickings -->
    <t t-set="has_multiple_pickings" t-value="len(pickings) > 1"/>
    <!-- Store if has lines without pickings -->
    <t t-set="has_lines_without_pickings" t-value="len(o.invoice_line_ids.filtered(lambda l: not l.picking_ids)) > 0"/>
  </xpath>
  
  <xpath expr="//h2/span[1]" position="replace">
    <span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and not has_multiple_pickings">Rechnung</span>
    <span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and has_multiple_pickings">Sammelrechnung</span>
  </xpath>

  <xpath expr="//t[@t-foreach='lines']" position="replace">

    <!-- Add empty picking if there are lines without pickings -->
    <t t-if="not has_pickings or has_lines_without_pickings">
      <t t-set="null" t-value="pickings.append(False)"/>
    </t>

     <!--<p t-esc="pickings"/>-->
    <!-- <p t-esc="has_pickings"/> -->
    <!-- <p t-esc="has_multiple_pickings"/> -->
    <!-- <p t-esc="has_lines_without_pickings"/> -->

    <t t-foreach="pickings" t-as="picking">
      <tr t-if="has_pickings and picking" class="o_line_note">
        <td colspan="99" style="padding-top: 1rem;" >
          <strong><span>Lieferung </span><span t-esc="picking.name.replace('WH/OUT/','')"/></strong>
          <!--<strong><span>Lieferung </span><span t-esc="picking.name.replace('WH/OUT/','')"/><span> / Bestellung </span><span t-esc="picking.group_id.name"/></strong>-->
          <span> vom </span>
          <span t-esc="picking.scheduled_date" t-options="{'widget': 'date'}"/><span>:</span>
        </td>
      </tr>
      <tr t-if="not picking" class="o_line_note">
        <td colspan="99" style="padding-top: 1rem;">
          <strong>
            <span>Weitere Positionen: </span>
          </strong>
        </td>
      </tr>
      <t t-foreach="lines" t-as="line">

        <!-- Show line if picking is set and linked or not picking is set and line is unlinked  -->
        <t t-if="(picking and picking in line.picking_ids) or (not line.picking_ids and not picking)">

          <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"/>

          <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 ''">
            <t t-if="not line.display_type" name="account_invoice_line_accountable">
              <td name="account_invoice_line_name">
                <span t-field="line.name" t-options="{'widget': 'text'}"/>
              </td>
              <td class="text-right">
                <span t-field="line.quantity"/>
                <span t-field="line.product_uom_id" groups="uom.group_uom"/>
              </td>
              <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
                <span 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 '' }}">
                <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 '' }}">
                <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">
                <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="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
              </td>
            </tr>
          </t>

        </t>
      </t>
      <tr t-if="picking and picking.sale_id.note" class="o_line_note">
        <td colspan="99" style="padding-bottom: 1rem;" >
          <span t-esc="picking.sale_id.note"/>
        </td>
      </tr>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.group_by_pickings.xmlopen in new window

Group By Sale Order

ID: mint_system.account.report_invoice_document.group_by_sale_order

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="before">
    <!-- Get all sale orders without duplicates -->
    <t t-set="sale_orders" t-value="list(set([line.order_id for line in o.invoice_line_ids.sale_line_ids]))"/>
    <!-- Store if has sale orders -->
    <t t-set="has_sale_orders" t-value="len(sale_orders) > 0"/>
    <!-- Store if has multiple sale orders -->
    <t t-set="has_multiple_sale_orders" t-value="len(sale_orders) > 1"/>
    <!-- Store if has lines without sale orders -->
    <t t-set="has_lines_without_sale_orders" t-value="len(o.invoice_line_ids.filtered(lambda l: not l.sale_line_ids)) > 0"/>
  </xpath>

  <xpath expr="//h2/span[1]" position="replace">
    <span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and not has_multiple_sale_orders">Rechnung</span>
    <span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and has_multiple_sale_orders">Sammelrechnung</span>
  </xpath>

  <xpath expr="//t[@t-foreach='lines']" position="replace">

    <!-- Add empty sale order if there are lines without sale orders -->
    <t t-if="not has_sale_orders or has_lines_without_sale_orders">
      <t t-set="null" t-value="sale_orders.append(False)"/>
    </t>

    <!-- <p t-esc="sale_orders"/> -->
    <!-- <p t-esc="has_sale_orders"/> -->
    <!-- <p t-esc="has_multiple_sale_orders"/> -->
    <!-- <p t-esc="has_lines_without_sale_orders"/> -->
    
    <t t-foreach="sale_orders" t-as="sale_order">
      <tr t-if="has_sale_orders and sale_order" class="o_line_note">
        <td colspan="99" style="padding-top: 1rem;">
          <strong>
            <span>Verkaufsauftrag </span>
            <span t-esc="sale_order.name"/>
            <span t-if="sale_order.client_order_ref">/</span>
            <span t-if="sale_order.client_order_ref" t-esc="sale_order.client_order_ref"/>
            <span> vom </span>
            <span t-esc="sale_order.date_order" t-options="{'widget': 'date'}"/><span>:</span>
          </strong>
        </td>
      </tr>
      <tr t-if="not sale_order" class="o_line_note">
        <td colspan="99" style="padding-top: 1rem;">
          <strong>
            <span>Weitere Positionen: </span>
          </strong>
        </td>
      </tr>
      <t t-foreach="lines" t-as="line">

        <!-- Show line if sale order is set and linked or not sale order is set and line is unlinked  -->
        <t t-if="(sale_order and sale_order in line.sale_line_ids.order_id) or (not line.sale_line_ids and not sale_order)">

          <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"/>

          <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 ''">
            <t t-if="not line.display_type" name="account_invoice_line_accountable">
              <td name="account_invoice_line_name">
                <span t-field="line.name" t-options="{'widget': 'text'}"/>
              </td>
              <td class="text-right">
                <span t-field="line.quantity"/>
                <span t-field="line.product_uom_id" groups="uom.group_uom"/>
              </td>
              <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
                <span 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 '' }}">
                <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 '' }}">
                <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">
                <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="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
              </td>
            </tr>
          </t>

        </t>
      </t>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.group_by_sale_order.xmlopen in new window

Hide Incoterm

ID: mint_system.account.report_invoice_document.hide_incoterm

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//p[@name='incoterm']" position="replace"/>
  
</data>

Source: snippets/account.report_invoice_document.hide_incoterm.xmlopen in new window

Hide Payment Term

ID: mint_system.account.report_invoice_document.hide_payment_term

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//p[@name='payment_term']" position="replace"/>
  
</data>

Source: snippets/account.report_invoice_document.hide_payment_term.xmlopen in new window

Margin After Title

ID: mint_system.account.report_invoice_document.margin_after_title

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="attributes">
    <attribute name="style" separator=";" add="margin-bottom: 1rem"/>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.margin_after_title.xmlopen in new window

Margin Before Invoice Table

ID: mint_system.account.report_invoice_document.margin_before_invoice_table

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <table name="invoice_line_table" position="attributes">
    <attribute name="style" separator=";" add="margin-top: 1rem"/>
  </table>

</data>

Source: snippets/account.report_invoice_document.margin_before_invoice_table.xmlopen in new window

Margin Before Title

ID: mint_system.account.report_invoice_document.margin_before_title

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="attributes">
    <attribute name="style" separator=";" add="margin-top: 1rem"/>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.margin_before_title.xmlopen in new window

Modify Main Table

ID: mint_system.account.report_invoice_document.modify_main_table

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <!-- add default_code   -->
  <xpath expr="//table[@class='table table-sm o_main_table']/thead/tr/th[1]" position="before">
    <th style="text-align: right; width: 27mm; padding-right: 10px">
      <span>Part No.</span>
    </th>
  </xpath>
  <xpath expr="//table[@class='table table-sm o_main_table']/tbody/t/tr/t[1]/td[1]" position="before">
    <td style="text-align: right; padding-right: 10px">
      <span t-field="line.product_id.default_code" />
    </td>
  </xpath>

  <!-- Header desriptin -->
  <xpath expr="//table[@class='table table-sm o_main_table']/thead/tr/th[2]" position="attributes">
    <attribute name="style">width: 70mm</attribute>
  </xpath>

  <!-- add delivery date -->
  <xpath expr="//table[@class='table table-sm o_main_table']/thead/tr/th[3]" position="before">
    <th style="text-align: right; width: 27mm; padding-right: 10px">
      <span></span>
    </th>
  </xpath>
  <xpath expr="//table[@class='table table-sm o_main_table']/tbody/t/tr/t[1]/td[3]" position="before">
    <td style="text-align: right; padding-right: 10px"></td>
  </xpath>

  <xpath expr="//td[@name='account_invoice_line_name']" position="replace">
    <td>
      <span style="font-weight: bold" t-field="line.product_id.type_description" />
    </td>
  </xpath>

  <!-- add second row -->
  <xpath expr="//table[@class='table table-sm o_main_table']/tbody//tr[1]" position="after">
    <tr>
      <td style="padding-bottom :10px; padding-left:3px; line-height: 1.2"></td>
      <td style="padding:0; padding-left:3px; line-height: 1.2"></td>
      <td style="padding:0; padding-left:3px; line-height: 1.2" colspan="4">
        <span t-field="line.sale_line_ids.name" />
        <br />
        <t t-if="line.product_id.country_of_origin_id.code and line.product_id.hs_code">
          Country of origin:
          <span t-esc="line.product_id.country_of_origin_id.code" />
          / HS Code:
          <span t-esc="line.product_id.hs_code" />
          <br />
        </t>

        <t t-if="line.product_id.hs_code and not line.product_id.country_of_origin_id.code">
          HS Code:
          <span t-esc="line.product_id.hs_code" />
        </t>

        <t t-if="line.product_id.country_of_origin_id.code and not line.product_id.hs_code">
          Country of origin:
          <span t-esc="line.product_id.country_of_origin_id.code" />
        </t>
      </td>

      <td></td>
    </tr>
    <tr style="border-bottom: 1px solid rgb(220,220,220)">
      <td colspan="8"></td>
    </tr>
  </xpath>

  <!-- format main_table -->
  <xpath expr="//table[@class='table table-sm o_main_table']" position="attributes">
    <attribute name="style">width: 100%; font-size:9pt</attribute>
    <attribute name="class">table table-borderless table-sm</attribute>
  </xpath>

  <!-- header-->
  <xpath expr="//table[@class='table table-borderless table-sm']/thead/tr" position="attributes">
    <attribute name="style">border-top:solid 1px; border-bottom: solid 1px; color: black;</attribute>
  </xpath>

  <xpath expr="//table[@name='invoice_line_table']" position="after">

    <table class="table table-borderless table-sm" style="margin-top:20px; width:100%; color:black; font-family: arial; font-size:9pt; border-top-style:solid; border-bottom-style:solid; border-width:1px; border-color:black">
      <t t-if="o.note_footer != '&lt;p&gt;&lt;br&gt;&lt;/p&gt;'">
        <span class="note" t-field="o.note_footer" />
      </t>
      <t t-foreach="o.amount_by_group" t-as="amount_by_group">
        <tr>
          <td style="width:15.5%; text-align:left">
            <Strong>Warenwert</Strong>
          </td>
          <td style="width:23%; text-align:left">
            <span t-field="o.amount_untaxed" />
          </td>
          <td style="width:12%; text-align:left">
            <span t-esc="amount_by_group[0]" />
          </td>
          <td style="width:17%; text-align:left">
            <span t-esc="amount_by_group[3]" />
          </td>
          <td style="width:14%; text-align:right">
            <Strong>Rechnungsbetrag</Strong>
          </td>
          <td style="width:18%; text-align:right">
            <span t-field="o.amount_total" />
          </td>
        </tr>
      </t>
    </table>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.modify_main_table.xmlopen in new window

Move Incoterm

ID: mint_system.account.report_invoice_document.move_incoterm

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//p[@name='incoterm']" position="replace"/>
  <xpath expr="//p[2]" position="after">
    <p t-if="o.invoice_incoterm_id" name="incoterm">Incoterm: 
      <strong t-field="o.invoice_incoterm_id.display_name"/>
    </p>
  </xpath>
  
</data>

Source: snippets/account.report_invoice_document.move_incoterm.xmlopen in new window

Net Value Summary

ID: mint_system.account.report_invoice_document.net_value_summary

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//div[@id='total']//table/tr[1]" position="before">

    <t t-set="net_value_of_goods" t-value="sum(o.invoice_line_ids.filtered(lambda l: l.product_id.type == 'product').mapped('price_subtotal'))" />
    <t t-set="additional_expenses" t-value="sum(o.invoice_line_ids.filtered(lambda l: l.product_id.type != 'product').mapped('price_subtotal'))" />

    <tr>
      <!-- de_CH: Nettowarenwert -->
      <td>Net Value of Goods</td>
      <td class="text-right">
        <span t-esc="net_value_of_goods" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}" />
      </td>
    </tr>
    <tr>
      <!-- de_CH: Zusatzaufwendungen -->
      <td>Additional Expenses</td>
      <td class="text-right">
        <span t-esc="additional_expenses" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}" />
      </td>
    </tr>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.net_value_summary.xmlopen in new window

Product Hs Code And Origin

ID: mint_system.account.report_invoice_document.product_hs_code_and_origin

<?xml version="1.0"?>
<!-- Show custom field country of origin and hs code -->
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//span[@t-field='line.name']" position="after">
    <t t-if="line.product_id.country_of_origin_id.code">
      <br/>
      Country of Origin: <span t-field="line.product_id.country_of_origin_id.code"/>
    </t>
    <t t-if="line.product_id.hs_code">
      <br/>
      HS Code: <span t-field="line.product_id.hs_code"/>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.product_hs_code_and_origin.xmlopen in new window

Product Weight

ID: mint_system.account.report_invoice_document.product_weight

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table/tbody/t[3]/tr/t[1]/td[1]/span" position="after">
  <t t-if="line.product_id.weight">
    <br/>
        Weight: <span t-field="line.product_id.weight"/>
        <span t-field="line.product_id.weight_uom_id.display_name"/>
  </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.product_weight.xmlopen in new window

Remove Incoterm

ID: mint_system.account.report_invoice_document.remove_incoterm

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//p[@name='incoterm']" position="replace">
  </xpath>

</data>

Source: snippets/account.report_invoice_document.remove_incoterm.xmlopen in new window

Remove Payment Communication

ID: mint_system.account.report_invoice_document.remove_payment_communication

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//p[@name='payment_communication']" position="replace" />

</data>

Source: snippets/account.report_invoice_document.remove_payment_communication.xmlopen in new window

Remove Payment Term

ID: mint_system.account.report_invoice_document.remove_payment_term

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <p name="payment_term" position="replace" />

</data>

Source: snippets/account.report_invoice_document.remove_payment_term.xmlopen in new window

Remove Summary Table

ID: mint_system.account.report_invoice_document.remove_summary_table

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

<xpath expr="//div[@class='clearfix']" position="replace">
</xpath>

</data>

Source: snippets/account.report_invoice_document.remove_summary_table.xmlopen in new window

Remove Taxes

ID: mint_system.account.report_invoice_document.remove_taxes

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//th[@name='th_taxes']" position="replace"/>
  <xpath expr="//span[@id='line_tax_ids']/.." position="replace"/>

</data>

Source: snippets/account.report_invoice_document.remove_taxes.xmlopen in new window

Remove Vat Id

ID: mint_system.account.report_invoice_document.remove_vat_id

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <div id="partner_vat_address_same_as_shipping" position="replace"/>
  <div id="partner_vat_address_not_same_as_shipping" position="replace"/>
  
</data>

Source: snippets/account.report_invoice_document.remove_vat_id.xmlopen in new window

Replace Address And Information Block

ID: mint_system.account.report_invoice_document.replace_address_and_information_block

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']" position="replace">

    <div class="row text-900 o_bold">
      <div class="col-7">Customer</div>
      <div class="col-5">Invoice Address</div>
    </div>

    <div class="row">
      <div class="col-7">
        <span t-field="o.partner_id" t-options-widget="&quot;contact&quot;" t-options-fields="['name', 'address']" t-options-no_marker="True"/>
      </div>
      <div class="col-5">
        <span t-field="o.partner_id" t-options-widget="&quot;contact&quot;" t-options-fields="['name', 'address']" t-options-no_marker="True"/>
      </div>
    </div>

    <div class="row">
      <div class="col-5 text-900 o_bold offset-7" style="margin-top:25px">Delivery Address</div>
    </div>

    <div class="row">
      <div class="col-5 offset-7">
        <span t-field="o.partner_shipping_id" t-options-widget="&quot;contact&quot;" t-options-fields="['name', 'address']" t-options-no_marker="True"/>
      </div>
    </div>

    <div class="row o_bold text-900" style="margin-top:25px">
      <div class="col-7">Your Contact</div>
      <div class="col-5">Our Contact</div>
    </div>

    <div class="row">
      <div class="col-7">
        <span t-field="o.partner_id.name"/>
      </div>
      <div class="col-5">
        <span t-field="o.user_id.name"/>
      </div>
    </div>

    <div class="row">
      <div class="col-7" style="margin-bottom:25px">
        <span t-field="o.partner_id" t-options-widget="&quot;contact&quot;" t-options-fields="['phone', 'email']" t-options-no_marker="True"/>
      </div>
      <div class="col-5">
        <span t-field="o.user_id" t-options-widget="&quot;contact&quot;" t-options-fields="['phone', 'email']" t-options-no_marker="True"/>
      </div>
    </div>

  </xpath>

</data>

Source: snippets/account.report_invoice_document.replace_address_and_information_block.xmlopen in new window

Replace Address

ID: mint_system.account.report_invoice_document.replace_address

<?xml version="1.0"?>
<!-- Align invoice tax row right -->
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//div[@t-field='o.partner_id']" position="replace">
    <t t-if="o.partner_invoice_id.is_company == true">
      <div t-esc="o.partner_invoice_id.name"/>
      <div t-esc="o.partner_invoice_id.street"/>
      <div t-esc="o.partner_invoice_id.street2"/>
      <span t-esc="o.partner_invoice_id.zip"/>
      <span t-esc="o.partner_invoice_id.city"/>
      <t t-if="o.partner_invoice_id.country_id.code != 'CH'">
        <div t-esc="oo.partner_invoice_id.country_id.name"/>
      </t>
    </t>
    <t t-else="">
      <div t-field="o.partner_invoice_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: True}"/>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.replace_address.xmlopen in new window

ID: mint_system.account.report_invoice_document.replace_footer

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//p[@name='payment_communication']" position="replace">
  </xpath>
  
  <p t-if="o.invoice_payment_term_id" name="payment_term">
                        <span t-field="o.invoice_payment_term_id.note"/>
                    </p>

  <xpath expr="//p[@t-if='o.invoice_incoterm_id']" position="replace">
    <style>
      table#footer {
        width: 100%;
        font-size: 8pt;
      }
      table#footer tr, td {
        vertical-align: top;
      }
    </style>
    <table id='footer'>
      <tr>
        <td t-if="o.invoice_payment_term_id" name="payment_term">
          Zahlungsbedingungen: <span t-field="o.invoice_payment_term_id.note"/>
        </td>
        <td width="50%">
          Lieferung gemäss unseren allgemeinen Lieferbedingungen
        </td>
      </tr>
      <tr>
        <td >MWST-Nr: 
          <span t-field="o.company_id.vat"/>
        </td>
        <td>
          <table width="100%">
            <tr>
              <td width="35%">
               Bankverbindungen:
              </td>
              <td width="65%">
              UBS AG, 6301 Zug, BLZ 273, SWIFT UBSWCHZH80A
              </td>
            </tr>
            <tr>
              <td>
              </td>
              <td>
            (CHF) IBAN CH63 0027 3273 Q978 6962 0
              </td>
            </tr>

            <tr>
              <td>
              </td>
              <td>
            (EUR) IBAN CH59 0027 3273 HN10 3698 0
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    
  </xpath>

  <xpath expr="//p[@name='payment_term']" position="replace">
  </xpath>


</data>

Source: snippets/account.report_invoice_document.replace_footer.xmlopen in new window

Replace Informations

ID: mint_system.account.report_invoice_document.replace_informations

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
  <div id="informations" position="replace">

    <style>
      div#informations p {
        margin-bottom: 0rem;
      }
      div#informations div {
        display: inline-block;
        vertical-align: top;
      }
    </style>
    <div id="informations">
      <table class="table table-borderless table-sm">
        <tr>
          <td>
            <t t-if="o.move_type == 'out_invoice'"><strong class="mr-2">Rechnungsdatum:</strong></t>
            <t t-elif="o.move_type == 'out_refund'"><strong class="mr-2">Gutschriftdatum:</strong></t>
            <t t-elif="o.move_type == 'out_receipt'"><strong class="mr-2">Quittungsdatum:</strong></t>
            <t t-else=""><strong>Datum:</strong></t>
            <span t-field="o.invoice_date" t-options='{"widget": "date"}' />
          </td>
          <td>
            <strong class="mr-2">Zahlungsbedingungen:</strong>
            <span t-field="o.invoice_payment_term_id" />
          </td>
          <!--<t t-set="partner_contact_id" t-value="o.invoice_line_ids.sale_line_ids.order_id.mapped('partner_contact_id')[:1]" />-->
          <td  t-if="o.partner_sale_id">
            <strong class="mr-2">&#160;&#160;&#160;&#160;&#160;Ihr Kontakt:</strong>
            <span t-field="o.partner_sale_id.name" />
          </td>
        </tr>

        <tr>
          <td t-if="o.invoice_date_due and o.move_type == 'out_invoice' and o.state == 'posted'">
            <strong class="mr-2">&#160;Fälligkeitsdatum:</strong>
            <span t-field="o.invoice_date_due" t-options='{"widget": "date"}' />
          </td><td t-else=""></td>
          <td>
            <strong class="mr-2">Unser Kontakt:</strong>
            <span t-field="o.invoice_user_id.name" />
          </td>
          <td t-if="o.ref" rowspan="2">
            <div><strong class="mr-2">Ihre Referenz:</strong></div>
            <div t-field="o.ref" />
          </td>
        </tr>

        <tr>
          <t t-set="order_id" t-value="o.invoice_line_ids.sale_line_ids.mapped('order_id')[:1]" />
          <td t-if="order_id" colspan="2">
            <strong class="mr-2">&#160;Unsere Referenz:</strong>
            <span t-if="order_id.project_id.code" t-esc="'[' + order_id.project_id.code + '] ' + order_id.name" />
            <span t-else="" t-field="order_id.name" />
          </td>
        </tr>
      </table>

    </div>
  </div>

</data>

Source: snippets/account.report_invoice_document.replace_informations.xmlopen in new window

Replace Information Table2

ID: mint_system.account.report_invoice_document.replace_information_table2

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
  <xpath expr="//*[@id='informations']" position="replace">
    <style>
      table#informations {
        white-space: nowrap;
      }
      table#informations td:nth-child(odd) {
        text-align: left;
      }
      table#informations td:nth-child(even) {
        text-align: left;
        padding-right: 3rem;
      }
    </style>
    <table id='informations' class="table table-borderless table-sm">
      <tr>
        <td>
          <strong>Rechnungsdatum: </strong>
        </td>
        <td>
          <span t-field="o.invoice_date"/>
        </td>
        <td>
          <strong>Kontakt Rechnung: </strong>
        </td>
        <td>
          <t t-foreach="res_company.partner_id.child_ids.filtered(lambda c: c.type == 'invoice' and c.name)" t-as="delivery_partner">
            <span t-esc="delivery_partner.name" />
          </t>
        </td>
        <td>
          <strong>Zahlbar innert: </strong>
        </td>
        <td>
          <span t-field="o.invoice_payment_term_id"/>
        </td>
      </tr>
      <tr>
        <td>
          <strong>Kontakt Verkauf: </strong>
        </td>
        <td>
          <span t-field="o.invoice_user_id" />
        </td>
        <td>
          <strong>Tel. Direkt: </strong>
        </td>
        <td>
          <t t-foreach="res_company.partner_id.child_ids.filtered(lambda c: c.type == 'invoice' and c.phone)" t-as="delivery_partner">
            <span t-esc="delivery_partner.phone" />
          </t>
        </td>
        <td>
        </td>
      </tr>
      <tr>
        <td>
          <strong>Kunden-Nr.: </strong>
        </td>
        <td>
          <span t-field="o.partner_id.ref" />
        </td>
        <td>
          <strong>E-Mail:</strong>
        </td>
        <td>
          <t t-foreach="res_company.partner_id.child_ids.filtered(lambda c: c.type == 'invoice' and c.email)" t-as="delivery_partner">
            <span t-esc="delivery_partner.email" />
          </t>
        </td>
        <td>
          <!-- <strong>MWST: </strong> -->
        </td>
        <td>
          <!-- <span t-field="res_company.vat" /> -->
        </td>
      </tr>
    </table>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.replace_information_table2.xmlopen in new window

Replace Information Table

ID: mint_system.account.report_invoice_document.replace_information_table

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
  <xpath expr="//*[@id='informations']" position="replace">
    <style>
      table#informations{
        white-space: nowrap;
      }
    </style>
    <table id='informations' class="table table-borderless table-sm">
      <tr>
        <td>
          <strong>Rechnungsdatum: </strong>
          <span t-field="o.invoice_date"/>
        </td>
        <td>
          <strong>Kontakt Rechnung: </strong>
          <t t-foreach="res_company.partner_id.child_ids.filtered(lambda c: c.type == 'invoice' and c.name)" t-as="delivery_partner">
            <span t-esc="delivery_partner.name" />
          </t>
        </td>
        <td>
          <strong>Zahlbar innert: </strong>
          <span t-field="o.invoice_payment_term_id"/>
        </td>
      </tr>
      <tr>
        <td>
          <strong>Kontakt Verkauf: </strong>
          <span t-field="o.invoice_user_id" />
        </td>
        <td>
          <strong>Tel. Direkt: </strong>
          <t t-foreach="res_company.partner_id.child_ids.filtered(lambda c: c.type == 'invoice' and c.phone)" t-as="delivery_partner">
            <span t-esc="delivery_partner.phone" />
          </t>
        </td>
        <td>
        </td>
      </tr>
      <tr>
        <td>
          <strong>Kunden-Nr.: </strong>
          <span t-field="o.partner_id.ref" />
        </td>
        <td>
          <strong>E-Mail:</strong>
          <t t-foreach="res_company.partner_id.child_ids.filtered(lambda c: c.type == 'invoice' and c.email)" t-as="delivery_partner">
            <span t-esc="delivery_partner.email" />
          </t>
        </td>
        <td>
          <!-- <strong>MWST: </strong>
          <span t-field="res_company.vat" /> -->
        </td>
      </tr>
    </table>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.replace_information_table.xmlopen in new window

Replace Infotable

ID: mint_system.account.report_invoice_document.replace_infotable

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//div[@id='informations']" position="replace">
    <style>
    table#info {
      width: 100%;
      margin-bottom: 25px;
      font-size: 9pt;
    }
    table#info tr {
      line-height: 1.2;
      text-align: left;
    }
    .note {
      font-size: 9pt;
    }
    </style>
    <table id='info'>
      <tr>
        <td></td>
        <td></td>
        <td>Order No.</td>
        <td>
          <span t-field='o.invoice_origin'/>
        </td>
      </tr>
      <tr>
        <td width="17%">Invoice date</td>
        <td width="44%">
          <span t-field='o.invoice_date' t-options='{ "widget": "date" }'/>
        </td>
        <td width="14%">Our Reference</td>
        <td width="25%">
          <span t-field='o.user_id'/>
        </td>
      </tr>
      <tr>
        <td>Customer No.</td>
        <td>
          <span t-field='o.partner_id.ref'/>
        </td>
        <td>Delivery Method</td>
        <td>
          <span t-field='o.carrier_id'/>
        </td>
      </tr>
      <tr>
        <td>Order</td>
        <td>
          <span t-field='o.ref'/>
        </td>
        <td>Incoterm</td>
        <td>
          <span t-field='o.invoice_incoterm_id'/>
        </td>
      </tr>
      <tr>
        <td>Reference</td>
        <td>
           <span t-field='o.comment'/>
        </td>
        
        <td>Delivery Date</td>
        <td>
          <span t-field='o.x_date_done' t-options='{ "widget": "date" }'/>
        </td>
    
      </tr>
    </table>
  </xpath>
</data>



Source: snippets/account.report_invoice_document.replace_infotable.xmlopen in new window

Replace Product Description

ID: mint_system.account.report_invoice_document.replace_product_description

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//td[@name='account_invoice_line_name']" position="replace">
    <t t-if="line.product_id.type_description">
      <td>
        <span style="font-weight: bold" t-field="line.product_id.type_description"/>
      </td>
    </t>
    <t t-if="not line.product_id.type_description">
      <td>
        <span t-field="line.external_name"/>
      </td>
    </t>

    <!---
    <xpath expr="//td[@name='account_invoice_line_name']" position="replace">
      <td name="td_name">
        <span class="o_bold" t-field="line.product_id.name"/><br/>
        <span t-field="line.name"/>  
      </td>
    </xpath>
    -->

  </xpath>

</data>

Source: snippets/account.report_invoice_document.replace_product_description.xmlopen in new window

Replace Summary

ID: mint_system.account.report_invoice_document.replace_summary

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table[@name='invoice_line_table']" position="after">

    <style>
            table.trimada_summary tr {
                border-top: solid 1px !important;
                border-bottom: solid 1px;
                page-break-inside: avoid;
            }
            table.trimada_details tr {
              border-top: 0px !important;
              border-bottom: 0px;
              line-height: 0.7;
            }
            table.trimada_summary #amount_untaxed_label {
                width: 11.5%;
                text-align: left;
            }
            table.trimada_details td#amount_by_group0 {
                width: 8%;
                text-align: left;
            }
            table.trimada_details td#amount_by_group3 {
                width: 21%;
                text-align: right;
                padding-right: 10%;
            }
            table.trimada_details td#amount_by_group4 {
                width: 27%;
                text-align: right;
                padding-right: 15%;
            }
            table.trimada_summary td#amount_by_group_label {
                width: 12%;
                text-align: left;
            }
            table.trimada_summary td#amount_by_group {
                width: 17%;
                text-align: left;
            }
            table.trimada_summary #amount_total_label {
                width: 14%;
                text-align: right;
            }
            table.trimada_summary #amount_total {
                width: 18%;
                text-align: right;
            }
    </style>

    <table class="table table-borderless table-sm trimada trimada_summary">
      <td id="amount_untaxed_label">
        <Strong>Warenwert</Strong>
      </td>

      <td>
        <table class="trimada_details">
          <t t-foreach="o.amount_by_group" t-as="amount_by_group">
            <tr style="">

              <td id="amount_by_group4">
                <span>
                  <t t-esc="amount_by_group[4]"/>
                </span>
              </td>

              <t t-if="len(o.line_ids.filtered(lambda line: line.tax_line_id)) in [0, 1] and o.amount_untaxed == amount_by_group[2]">
                <td id="amount_by_group0">
                  <span class="text-nowrap" t-esc="amount_by_group[0]"/>
                </td>
                <td id="amount_by_group3" class="text-right o_price_total">
                  <span class="text-nowrap" t-esc="amount_by_group[3]"/>
                </td>
              </t>
              <t t-else="">
                <td id="amount_by_group0">
                  <span t-esc="amount_by_group[0]"/>
                </td>
                <td id="amount_by_group3" class="text-right o_price_total">
                  <span class="text-nowrap" t-esc="amount_by_group[3]"/>
                </td>
              </t>
            </tr>
          </t>

          <t t-if="print_with_payments">
            <t t-if="o.payment_state != 'invoicing_legacy'">
              <t t-set="payments_vals" t-value="o.sudo()._get_reconciled_info_JSON_values()"/>
              <t t-foreach="payments_vals" t-as="payment_vals">
                <tr>
                  <td>
                    <i class="oe_form_field text-right oe_payment_label">Paid on <t t-esc="payment_vals['date']" t-options="{&quot;widget&quot;: &quot;date&quot;}"/>
                    </i>
                  </td>
                  <td class="text-right">
                    <span t-esc="payment_vals['amount']" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
                  </td>
                </tr>
              </t>
              <t t-if="len(payments_vals) &gt; 0">
                <tr class="border-black">
                  <td>
                    <strong>Amount Due</strong>
                  </td>
                  <td class="text-right">
                    <span t-field="o.amount_residual"/>
                  </td>
                </tr>
              </t>
            </t>
          </t>
        </table>
      </td>

      <td id="amount_total_label">
        <strong>Total</strong>
      </td>
      <td id="amount_total">
        <span class="text-nowrap" t-field="o.amount_total"/>
      </td>

    </table>

  </xpath>

</data>

Source: snippets/account.report_invoice_document.replace_summary.xmlopen in new window

Reset Address

ID: mint_system.account.report_invoice_document.reset_address

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']" position="replace">
    <t t-set="address">
      <div>
        <address t-field="o.partner_invoice_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: True}" />
      </div>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.reset_address.xmlopen in new window

Round Price Unit

ID: mint_system.account.report_invoice_document.round_price_unit

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//span[@t-field='line.price_unit']" position="replace">
    <span class="text-nowrap" t-esc="'{0:,.2f}'.format(float(line.price_unit)).replace(',','\'')"/>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.round_price_unit.xmlopen in new window

Round Price

ID: mint_system.account.report_invoice_document.round_price

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//span[@t-field='line.price_unit']" position="replace">
         <span t-esc="'%g' % line.price_unit if str(line.price_unit)[::-1].find('.') >= 3 else '{0:,.2f}'.format(float(line.price_unit)).replace(',','\'')"/>
  </xpath>
   
</data>

Source: snippets/account.report_invoice_document.round_price.xmlopen in new window

Round Quantity

ID: mint_system.account.report_invoice_document.round_quantity

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//span[@t-field='line.quantity']" position="replace">
    <span t-esc="'%.2f' % line.quantity"/>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.round_quantity.xmlopen in new window

Round Total Price

ID: mint_system.account.report_invoice_document.round_total_price

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//span[@t-field='line.price_subtotal']" position="replace">
    <span t-esc="'{0:,.2f}'.format(float(line.price_subtotal)).replace(',','\'')"/>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.round_total_price.xmlopen in new window

Second Row

ID: mint_system.account.report_invoice_document.second_row

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
  
  <xpath expr="//tbody[hasclass('invoice_tbody')]//tr" position="attributes">
    <attribute name="class" separator=" " add="first"/>
  </xpath>

  <xpath expr="//tbody[hasclass('invoice_tbody')]//tr" position="after">
    <t t-if="line.product_id.type_description">
    <tr class="second">
      <td></td>
      <td></td>
      <td colspan="5">
        <span t-field="line.external_name"/><br/>
        <t t-if="line.product_id.country_of_origin_id.code">
          Ursprungsland:
          <span t-field="line.product_id.country_of_origin_id.code" />
        </t>
        <t t-if="line.product_id.hs_code">
          / Zollposition:
          <span t-field="line.product_id.hs_code" />
        </t>
      </td>
    </tr>
    </t>
    <t t-if="not line.product_id.type_description">
    <tr class="second">
      <td></td>
      <td></td>
      <td colspan="5">
        <t t-if="line.product_id.country_of_origin_id.code">
          Ursprungsland:
          <span t-field="line.product_id.country_of_origin_id.code" />
        </t>
        <t t-if="line.product_id.hs_code">
          / Zollposition:
          <span t-field="line.product_id.hs_code" />
        </t>
      </td>
    </tr>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.second_row.xmlopen in new window

Sequence In Table

ID: mint_system.account.report_invoice_document.sequence_in_table

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//table/thead/tr/th[1]" position="before">
    <th>
      <span>Pos</span>
    </th>
  </xpath>

  <xpath expr="//t[@t-foreach='lines']" position="before">
    <t t-set="index" t-value="1"/>
  </xpath>
  
  <xpath expr="//table/tbody//tr/t[1]/td[1]" position="before">
    <td>
      <span t-esc="index"/><t t-set="index" t-value="index+1"/>
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.sequence_in_table.xmlopen in new window

Set Ids

ID: mint_system.account.report_invoice_document.set_ids

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
  
    <xpath expr="//th[@name='th_quantity']" position="attributes">
        <attribute name="id">th_quantity</attribute>
    </xpath>

    <xpath expr="//th[@name='th_description']" position="attributes">
        <attribute name="id">description</attribute>
    </xpath>
    <xpath expr="//table[@name='invoice_line_table']//td[2]" position="attributes">
        <attribute name="id">quantity</attribute>
    </xpath>
    <xpath expr="//table[@name='invoice_line_table']//td[2]/span[1]" position="attributes">
        <attribute name="id">qty</attribute>
    </xpath>
    
    <xpath expr="//table[@name='invoice_line_table']//td[3]/span[1]" position="attributes">
        <attribute name="id">price</attribute>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.set_ids.xmlopen in new window

Set Page Font Size

ID: mint_system.account.report_invoice_document.set_page_font_size

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//div[hasclass('page')]" position="inside">
        <style>
            body {
                font-size: 0.9rem;
            }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.set_page_font_size.xmlopen in new window

Set Table Font Size

ID: mint_system.account.report_invoice_document.set_table_font_size

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//table[hasclass('o_main_table')]" position="before">
        <style>
            table.o_main_table th,
            table.o_main_table td {
                font-size: 0.8rem;
            }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.set_table_font_size.xmlopen in new window

Set Title Font Size

ID: mint_system.account.report_invoice_document.set_title_font_size

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//div[hasclass('page')]" position="inside">
        <style>
            h2 {
                font-size: 1.5rem;
            }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.set_title_font_size.xmlopen in new window

Show Categ Id

ID: mint_system.account.report_invoice_document.show_categ_id

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
  
  <xpath expr="//span[@t-field='line.name']" position="after">
    <div>
      <span t-field="line.product_id.categ_id"/>
    </div>
 </xpath>

</data>

Source: snippets/account.report_invoice_document.show_categ_id.xmlopen in new window

Show Customer Info Product Code

ID: mint_system.account.report_invoice_document.show_customer_info_product_code

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <span t-field="line.name" position="before">
    <t t-if="line.product_id" t-set="customer_info" t-value="line.product_id._select_customerinfo(partner=o.commercial_partner_id)" />
    <t t-if="customer_info">
      <span t-esc="'[%s] ' % customer_info[0].product_code" />
    </t>
  </span>

</data>

Source: snippets/account.report_invoice_document.show_customer_info_product_code.xmlopen in new window

Show Default Code

ID: mint_system.account.report_invoice_document.show_default_code

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table[@name='invoice_line_table']" position="before">
    <style>
      th#default_code,
      td#default_code {
        white-space: nowrap;
      }
    </style>
  </xpath>
  
  <xpath expr="//table[@name='invoice_line_table']//th[@name='th_description']" position="before">
    <th id="default_code">
      <span>Referenz</span>
    </th>
  </xpath>

  <xpath expr="//table[@name='invoice_line_table']//td[@name='account_invoice_line_name']" position="before">
    <td id="default_code">
      <span t-field="line.product_id.default_code"/>
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_default_code.xmlopen in new window

Show Hs Code

ID: mint_system.account.report_invoice_document.show_hs_code

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//table[@name='invoice_line_table']//th[@name='th_quantity']" position="after">
    <th name="th_hs_code" class="text-right">
      <span>H.S. Code</span>
    </th>
  </xpath>

  <xpath expr="//table[@name='invoice_line_table']//span[@t-field='line.quantity']/.." position="after">
    <td name="td_hs_code" class="text-right">
       <span t-esc="line.product_id.intrastat_id.code"/>
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_hs_code.xmlopen in new window

Show Lot Ids

ID: mint_system.account.report_invoice_document.show_lot_ids

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table[@name='invoice_line_table']//td[@name='account_invoice_line_name']/span[1]" position="after">
    <t t-set="lot_ids" t-value="o.picking_ids.move_line_ids.lot_id.filtered(lambda l: l.product_id == line.product_id)" />
    <t t-if="lot_ids">
      <br />
      <span>Seriennummern:</span>
      <t t-esc="', '.join(lot_ids.mapped('name'))" />
      <!-- <ul class="list-unstyled">
        <t t-foreach="lot_ids" t-as="lot">
          <li t-esc="lot.name" />
        </t>
      </ul> -->
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_lot_ids.xmlopen in new window

Show Order Id

ID: mint_system.account.report_invoice_document.show_order_id

<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//td[@name='account_invoice_line_name']" position="replace">

    <td name="account_invoice_line_name">
      <t t-if="not line.sale_line_ids.task_id.sale_line_id.order_id">
        <span class="o_bold" t-field="line.product_id.name"/><br/>
        <span t-field="line.name"/>
      </t>
      <t t-if="line.sale_line_ids.task_id.sale_line_id.order_id">
        Dienstleistung gemäss Rapport # <span t-field="line.sale_line_ids.task_id.sale_line_id.order_id"/>
      </t>
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_order_id.xmlopen in new window

Show Product Name

ID: mint_system.account.report_invoice_document.show_product_name

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//td[@name='account_invoice_line_name']" position="replace">
    <td name="account_invoice_line_name">
      <t t-if="line.product_id">
        <span t-field="line.product_id.name"/>
        <br/>
      </t>
      <span class="o_italic" t-field="line.name" t-options="{'widget': 'text'}"/>
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_product_name.xmlopen in new window

Show Sale Line Ids

ID: mint_system.account.report_invoice_document.show_sale_line_ids

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//table[@name='invoice_line_table']//th[@name='th_quantity']" position="after">
    <th name="th_hs_code" class="text-right">
      <span>H.S. Code</span>
    </th>
  </xpath>

  <xpath expr="//table[@name='invoice_line_table']//span[@t-field='line.quantity']/.." position="after">
    <td name="td_hs_code" class="text-right">
       <span t-esc="line.product_id.intrastat_id.code"/>
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_sale_line_ids.xmlopen in new window

Show Shipping Address

ID: mint_system.account.report_invoice_document.show_shipping_address

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']" position="after">
    <t t-set="information_block">
      <!-- <t t-if="o.partner_shipping_id != o.partner_id"> -->
        <strong>Lieferadresse:</strong>
        <div t-field="o.partner_shipping_id"
        t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}" />
      <!-- </t> -->
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_shipping_address.xmlopen in new window

Show Weight

ID: mint_system.account.report_invoice_document.show_weight

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <xpath expr="//table[@name='invoice_line_table']//th[@name='th_quantity']" position="inside">
    <br/>
    <i>Weight</i>
  </xpath>

  <xpath expr="//table[@name='invoice_line_table']//th[@name='th_subtotal']" position="inside">
    <br/>
    <i>Total Weight</i>
  </xpath>

  <xpath expr="//table[@name='invoice_line_table']//span[@t-field='line.quantity']/.." position="inside">
    <br/>
    <i>
      <span t-field="line.product_id.weight"/>
      <span t-field="line.product_id.weight_uom_name"/>
    </i>
  </xpath>

 <xpath expr="//table[@name='invoice_line_table']//span[@t-field='line.price_subtotal']/.." position="inside">
    <br/>
    <i>
      <span t-esc="line.product_id.weight * line.quantity" t-options="{&quot;widget&quot;: &quot;float&quot;, &quot;decimal_precision&quot;: &quot;Stock Weight&quot;}"/>
      <span t-field="line.product_id.weight_uom_name"/>
    </i>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.show_weight.xmlopen in new window

ID: mint_system.account.report_invoice_document.style_carbo_link

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

    <xpath expr="//div[hasclass('page')]" position="before">
        <style>
        .o_company_1_layout {
            font-family: Dobra-Book;
            font-size: 80%;
            }
    .mb-4 {
          margin-bottom: 0rem !important;
          }
    #total {
          margin-bottom: 2rem;
          }
    h2 {
               font-size: 1.5rem;
              }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.style_carbo_link.xmlopen in new window

Style Moser

ID: mint_system.account.report_invoice_document.style_moser

<data inherit_id="account.report_invoice_document" priority="60">

    <xpath expr="//div[hasclass('page')]" position="before">
        <style>
        .o_company_1_layout {
            font-family: arial;
         }
        .o_company_1_layout.o_report_layout_standard h2 {
            color: black;
               font-size: 1.4rem;
                font-weight: bold;
         }
         .o_company_1_layout.o_report_layout_standard #total strong {
            color: black;
         }
         div#informations {
              margin-top: 30px;
              margin-bottom: 60px;
         }
         h2.mt-4 {
              margin-top: 70px !important;
         }
         th#tax_amount {
              text-align: right;
         }
         td#tax_amount {
              text-align: right;
         }
        </style>
    </xpath>
    
    <xpath expr="//table[@name='invoice_line_table']" position="attributes">
        <attribute name="class">table table-sm o_main_table mt-4</attribute>
    </xpath>
    
</data>

Source: snippets/account.report_invoice_document.style_moser.xmlopen in new window

Style Tissa

ID: mint_system.account.report_invoice_document.style_tissa

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

    <xpath expr="//div[hasclass('page')]" position="before">
        <style>
            table#info {
                font-size: 9pt;
                font-family: arial;
            }
            h2 {
            font-size: 1.2rem;
            font-weight: bold;
            margin: 50px 0 30px 0
            }
            body {
                font-size: 11pt;
                font-family: arial;
            }
        </style>
    </xpath>

    <xpath expr="//table[@name='invoice_line_table']/thead/tr/th[5]" position="attributes">
        <attribute name="t-attf-class">text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}</attribute>
    </xpath>

    <xpath expr="//table[@name='invoice_line_table']/tbody/t/tr/t/td[5]" position="attributes">
        <attribute name="t-attf-class">text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}</attribute>
    </xpath>

    <xpath expr="//p[@name='payment_communication']" position="attributes">
        <attribute name="style">margin-bottom: 0px</attribute>
    </xpath>

    <xpath expr="//p[@name='payment_term']" position="attributes">
        <attribute name="style">margin-bottom: 0px</attribute>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.style_tissa.xmlopen in new window

Style Trimada

ID: mint_system.account.report_invoice_document.style_trimada

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

    <xpath expr="//div[hasclass('page')]" position="before">
        <style>
            table.trimada {
                font-size: 9pt;
                font-family: arial;
                color: black;
            }
            table.trimada tr.first td {
                padding-bottom: 0;
            }
            table.trimada tr.second td {
                padding-top: 0;
            }
            table.trimada tr.second {
                border-bottom: 1px solid rgb(220,220,220);
            }
            table.trimada thead tr {
                border-top:solid 1px;
                border-bottom: solid 1px;
            }
            table.trimada thead th#position {
                width: 5mm;
            }
            table.trimada thead th#default_code {
              width: 27mm;
              text-align: right;
            }
            table.trimada thead th#open_quantity {
              width: 30mm;
              text-align: right;
            }
            table.trimada thead th#quantity {
              width: 25mm;
              text-align: right !important;
            }
            table.trimada tbody td#position {
              text-align: right;
            }
            table.trimada tbody td#default_code {
              text-align: right;
            }
            table.trimada tbody td#open_quantity {
              text-align: right !important;
            }
            table.trimada tbody td#quantity {
              text-align: right;
            }            
            table.trimada tbody span#qty {
              font-weight: bold;
            }
            table.trimada tbody span#open_qty {
              font-weight: bold;
            }
            .address {
              font-size: 10pt;
              line-height: 1.2;
              padding-bottom:33mm;
            }
            .subtitel {
                font-size: 11pt;
                font-family: arial;
                margin-top: 10mm;
            }
            .note {
                font-size: 9pt;
                font-family: arial;
            }
        </style>
    </xpath>

    <table name="invoice_line_table" position="attributes">
        <attribute name="class" separator=" " add="trimada table-borderless"/>
    </table>

    <table name="invoice_line_table" position="attributes">
        <attribute name="class" separator=" " add="trimada table-borderless"/>
    </table>

  <span id="qty" position="attributes">
        <attribute name="t-options-widget">"integer"</attribute>
    </span>
    
</data>

Source: snippets/account.report_invoice_document.style_trimada.xmlopen in new window

Switch Address Block

ID: mint_system.account.report_invoice_document.switch_address_block

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']" position="after">
    <t t-set="information_block">
      <address t-field="o.partner_id" t-options="{'widget': 'contact', 'fields': ['address', 'name'], 'no_marker': True}"/>
      <div t-if="o.partner_id.vat" class="mt16">
          <t t-if="o.company_id.country_id.vat_label" t-esc="o.company_id.country_id.vat_label" id="inv_tax_id_label"/>
          <t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/></div>
    </t>
  </xpath>

  <xpath expr="//t[@t-set='address']" position="replace">
    <t t-set="address">
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.switch_address_block.xmlopen in new window

Tissa Rechnungstext

ID: mint_system.account.report_invoice_document.tissa_rechnungstext

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
  
  <xpath expr="//p[@name='payment_term']" position="after">
     
     <t t-foreach="o.partner_id.x_studio_field_5jUpb" t-as="text">
       <span t-raw="text.x_studio_rechnungstext" />
     </t>
     
  </xpath>

</data>

Source: snippets/account.report_invoice_document.tissa_rechnungstext.xmlopen in new window

Tissa Replace Infotable

ID: mint_system.account.report_invoice_document.tissa_replace_infotable

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//div[@id='informations']" position="replace">
    <style>
    table#info {
      width: 100%;
      margin-bottom: 45px;
      font-size: 11pt;
    }
    table#info tr {
      line-height: 1.2;
      text-align: left;
    }
    .note {
      font-size: 9pt;
    }
    </style>
    <table id='info'>

      <tr>
        <td>
          Kundennummer:
        </td>
        <td>
          <span t-field='o.partner_id.ref'/>
        </td>
        <td>
          Datum:
        </td>
        <td>
          <span t-field='o.invoice_date'/>
        </td>
      </tr>

      <tr>
        <td>
          USt-IdNr:
        </td>
        <td>
          <span t-field='o.partner_id.vat'/>
        </td>

        <td>Unser Auftrag:</td>
        <td>
          <t t-if='o.sale_order_id.origin'>
            <span t-field='o.sale_order_id.origin'/>
 / 
          </t>
          <span t-field='o.invoice_origin'/>
        </td>
      </tr>

      <tr>
        <td width="16%">EORI-Nummer:</td>
        <td width="44%">
          <span t-field="o.partner_id.x_studio_eori_nummer"/>
        </td>
        <td>Abruf:</td>
        <td>
          <span t-field='o.sale_order_id.comment'/>
          <t t-if='o.sale_order_id.x_studio_kommission'>
             /            <span t-field='o.sale_order_id.x_studio_kommission'/>
          </t>
        </td>
      </tr>

      <tr>
        <td>Ihre Bestellung:</td>
        <td>
          <span t-field='o.sale_order_id.blanket_order_id.client_order_ref'/>          
        </td>
        <td>Kundenbetreuer/in:</td>
        <td>
          <span t-field='o.partner_id.user_id'/>
        </td>
      </tr>

      <tr>
        <td></td>
        <td>         
          <span t-field='o.sale_order_id.blanket_order_id.date_confirmed'/>         
        </td>
        <td width="19%">Sachbearbeiter/in:</td>
        <td width="21%">
          <span t-field='o.user_id'/>
        </td>
      </tr>

      <tr>
        <td></td>
        <td></td>
        <td>
          MwSt-Nr:
        </td>
        <td>
          CHE-103.327.797 MWST
        </td>
      </tr>

    </table>
  </xpath>
</data>

Source: snippets/account.report_invoice_document.tissa_replace_infotable.xmlopen in new window

Unit Precision

ID: mint_system.account.report_invoice_document.unit_precision

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//tbody[1]/t[3]/tr[1]/t[1]/td[2]/span[1]" position="attributes">
        <attribute name="t-options-widget">"integer"</attribute>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.unit_precision.xmlopen in new window

X Hide On Invoice

ID: mint_system.account.report_invoice_document.x_hide_on_invoice

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//t[@t-set='lines']" position="after">
        <t t-set="lines" t-value="lines.filtered(lambda l: not l.product_id.x_hide_on_invoice)" />
    </xpath>

</data>

Source: snippets/account.report_invoice_document.x_hide_on_invoice.xmlopen in new window

X Picking List

ID: mint_system.account.report_invoice_document.x_picking_list

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//p[@t-field='o.invoice_origin']" position="attributes">
    <attribute name="t-field">o.x_picking_list</attribute>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.x_picking_list.xmlopen in new window

Report Invoice Document With Payments

Add Iban And Bank

ID: mint_system.account.report_invoice_document_with_payments.add_iban_and_bank

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document_with_payments" priority="50">

  <xpath expr="/t/t/div/p[2]" position="after">
    <div class="row">
      <div class="col">
        <span>IBAN: </span>
        <span t-field="o.invoice_partner_bank_id.acc_number"/>
      </div>
    </div>
  </xpath>

  <xpath expr="/t/t/div/div[3]" position="after">
    <div class="row">
      <div class="col">
        <span>Bank/BIC: </span>
        <span t-field="o.invoice_partner_bank_id.bank_id.display_name"/>
        <br/>
        <br/>
      </div>
    </div>
  </xpath>

</data>

Source: snippets/account.report_invoice_document_with_payments.add_iban_and_bank.xmlopen in new window

Report Invoice Document

Add Address Space

ID: mint_system.account.report_invoice_document.add_address_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <t t-set="address" position="before">
        <style>
            div.address {
                padding-top: 3rem
            }
        </style>
    </t>

</data>

Source: snippets/account.report_invoice_document.add_address_space.xmlopen in new window

Add Comment Space

ID: mint_system.account.report_invoice_document.add_comment_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <div name="comment" position="before">
        <style>
            div[name="comment"] {
                padding-top: 50px;
                padding-left: 75px;
                padding-right: 75px;
            }
        </style>
    </div>

</data>

Source: snippets/account.report_invoice_document.add_comment_space.xmlopen in new window

Add Current Subtotal Space

ID: mint_system.account.report_invoice_document.add_current_subtotal_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//span[@t-esc='current_subtotal']/../.." position="after">
        <tr>
            <td name="td_current_subtotal_space" colspan="99" height="25px" />
        </tr>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_current_subtotal_space.xmlopen in new window

ID: mint_system.account.report_invoice_document.add_header_and_footer_note

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table[@id='info']" position="after">
    <t t-if="o.note_header != '&lt;p&gt;&lt;br&gt;&lt;/p&gt;'">
      <span class="note" t-field="o.note_header"/>
    </t>
  </xpath>

  <xpath expr="//table[2]" position="after">
    <t t-if="o.note_footer != '&lt;p&gt;&lt;br&gt;&lt;/p&gt;'">
      <span class="note" t-field="o.note_footer"/>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.add_header_and_footer_note.xmlopen in new window

Add Header Padding

ID: mint_system.account.report_invoice_document.add_header_padding

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="attributes">
    <attribute name="style">padding-top: 2rem</attribute>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_header_padding.xmlopen in new window

Add Header Space

ID: mint_system.account.report_invoice_document.add_header_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//h2" position="attributes">
         <attribute name="style">padding-top: 5rem</attribute>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_header_space.xmlopen in new window

Add Iban

ID: mint_system.account.report_invoice_document.add_iban

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <!-- Odoo 14.0 -->
    <xpath expr="/t/t/div/p[2]" position="before">
        <t t-if="not o.partner_bank_id._eligible_for_qr_code('ch_qr', o.partner_id, o.currency_id)">
            <p>
                <span>IBAN: </span>
                <b>
                    <span t-field="o.partner_bank_id.acc_number" />
                </b>
                <br />
                <span>Bank/BIC: </span>
                <b>
                    <span t-field="o.partner_bank_id.bank_id.display_name" />
                </b>
            </p>
        </t>
    </xpath>

    <!-- Odoo 13.0 -->
    <!-- <xpath expr="/t/t/div/p[2]" position="after">
      <div class="row">
      <div class="col">
          <span>IBAN: </span>
          <span t-field="o.invoice_partner_bank_id.acc_number"/>
      </div>
      </div>
  </xpath>
  <xpath expr="/t/t/div/div[3]" position="after">
      <div class="row">
      <div class="col">
          <span>Bank/BIC: </span>
          <span t-field="o.invoice_partner_bank_id.bank_id.display_name"/>
          <br/>
          <br/>
      </div>
      </div>
  </xpath> -->

</data>

Source: snippets/account.report_invoice_document.add_iban.xmlopen in new window

Add Information Space

ID: mint_system.account.report_invoice_document.add_information_space

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//div[@id='informations']" position="before">
        <style>
            div#informations {
                padding-top: 1rem;
                padding-bottom: 1rem
            }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_information_space.xmlopen in new window

Add Percentage Sign

ID: mint_system.account.report_invoice_document.add_percentage_sign

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

<xpath expr="//span[@t-field='line.discount']" position="replace">
    <span t-field="line.discount"/>%
  </xpath>

</data>

Source: snippets/account.report_invoice_document.add_percentage_sign.xmlopen in new window

Add Sale Order Contact Name

ID: mint_system.account.report_invoice_document.add_sale_order_contact_name

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="/t/t/div/div[1]/div[5]" position="replace">
        <div class="col-auto col-3 mw-100 mb-2">
            <strong>Your contact</strong>
            <p class="m-0" t-field="o.sale_order_id.partner_contact_id.name"/>
        </div>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_sale_order_contact_name.xmlopen in new window

Add Sale Person

ID: mint_system.account.report_invoice_document.add_sale_person

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <!-- Remove reference -->
    <xpath expr="/t/t/div/div[1]/div[5]" position="replace">
    </xpath>

    <!-- Add sales person -->
    <xpath expr="/t/t/div/div[1]/div[1]" position="after">
        <div class="col-auto mw-100 mb-2" t-if="o.invoice_user_id" name="invoice_user_id">
            <strong>Salesperson:</strong>
            <p class="m-0" t-field="o.invoice_user_id.name" />
        </div>
    </xpath>

    <!-- Add referencce to new line -->
    <xpath expr="//div[@id='informations']" position="after">
        <div id="informations2" class="row mt32 mb32" t-if="o.ref">
            <div class="col-auto mw-100 mb-2" name="reference">
                <strong>Reference:</strong>
                <p class="m-0" t-field="o.ref" />
            </div>
        </div>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_sale_person.xmlopen in new window

Add Salesperson

ID: mint_system.account.report_invoice_document.add_salesperson

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="/t/t/div/div[1]/div[1]" position="after">
    <div class="col-3 bm-2" t-if="o.invoice_user_id" name="invoice_user_id">
      <strong>Contact:</strong>
      <p class="m-0" t-field="o.invoice_user_id.email"/>
      <p class="m-0" t-field="o.invoice_user_id.phone"/>
    </div>
  </xpath>

  <!-- <xpath expr="/t/t/div/div[1]/div[1]" position="after">
    <div class="col-auto mw-100 mb-2" t-if="o.invoice_user_id" name="invoice_user_id">
      <strong>Contact:</strong>
      <p class="m-0" t-field="o.invoice_user_id.email"/>
      <p class="m-0" t-field="o.invoice_user_id.phone"/>
    </div>
  </xpath> -->

  <!-- <xpath expr="/t/t/div/div[1]/div[1]" position="after">
    <div class="col-auto mw-100 mb-2" t-if="o.invoice_user_id" name="invoice_user_id">
      <strong>Salesperson:</strong>
      <p class="m-0" t-field="o.invoice_user_id.name"/>
    </div>
  </xpath> -->

</data>

Source: snippets/account.report_invoice_document.add_salesperson.xmlopen in new window

Add Taxes

ID: mint_system.account.report_invoice_document.add_taxes

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

    <xpath expr="//div[hasclass('page')]" position="before">
        <style>
        .o_company_1_layout {
            font-family: Dobra-Book;
            font-size: 80%;
            }
    .mb-4 {
          margin-bottom: 0rem !important;
          }
    #total {
          margin-bottom: 2rem;
          }
    h2 {
               font-size: 1.5rem;
              }
        </style>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.add_taxes.xmlopen in new window

Align Taxes

ID: mint_system.account.report_invoice_document.align_taxes

<?xml version="1.0"?>
<!-- Align invoice tax row right -->
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//th[@name='th_taxes']" position="attributes">
    <attribute name="t-attf-class" separator=" " remove="text-right" add="text-right" />
  </xpath>

  <xpath expr="//span[@id='line_tax_ids']/.." position="attributes">
    <attribute name="t-attf-class" separator=" " remove="text-right" add="text-right" />
  </xpath>

</data>

Source: snippets/account.report_invoice_document.align_taxes.xmlopen in new window

Bank Account

ID: mint_system.account.report_invoice_document.bank_account

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="/t/t/div/p[2]" position="after">
    <t t-if="o.currency_id.name=='CHF'">
        <t t-set="account" t-value="o.company_id.bank_ids.browse(13)"/>
    </t>
    <t t-if="o.currency_id.name=='EUR'">
        <t t-set="account" t-value="o.company_id.bank_ids.browse(14)"/>
    </t>
    <t t-if="o.currency_id.name=='USD'">
        <t t-set="account" t-value="o.company_id.bank_ids.browse(15)"/>
    </t>
    <div class="row">
      <div class="col">
        <span>IBAN: </span>
        <span t-field="account.acc_number"/>
        <br/>
        <span>Bank/BIC: </span>
        <span t-field="account.bank_id.display_name"/>
        <br/>
        <br/>
      </div>
    </div>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.bank_account.xmlopen in new window

Convert Html Note

ID: mint_system.account.report_invoice_document.convert_html_note

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <t t-if="line.display_type == 'line_note'" position="replace">
        <t t-if="line.display_type == 'line_note' and '&lt;!DOCTYPE html&gt;' in line.name">
            <td colspan="99">
                <t t-raw="line.name.replace('&lt;!DOCTYPE html&gt;', '')" />
            </td>
        </t>
        <t t-elif="line.display_type == 'line_note' and '&lt;!DOCTYPE html&gt;' not in line.name">
            <td colspan="99">
                <span t-field="line.name"/>
            </td>
        </t>
    </t>
</data>

Source: snippets/account.report_invoice_document.convert_html_note.xmlopen in new window

Custom Address

ID: mint_system.account.report_invoice_document.custom_address

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']/address" position="replace">
    <address>
      <t t-if="o.partner_id.invoice_name">
        <div><span t-esc="o.partner_id.invoice_name" /></div>
      </t>
      <t t-if="o.partner_id.address_addition">
        <div><span t-esc="o.partner_id.address_addition" /></div>
      </t>
      <t t-if="o.partner_id.street">
        <div><span t-esc="o.partner_id.street" /></div>
      </t>
      <t t-if="o.partner_id.street2">
        <div><span t-esc="o.partner_id.street2" /></div>
      </t>
      <t t-if="o.partner_id.city and o.partner_id.city">
        <div><span t-esc="o.partner_id.zip" /> <span t-esc="o.partner_id.city" /></div>
      </t>
      <t t-if="o.partner_id.country_id">
        <div><span t-esc="o.partner_id.country_id.name" /></div>
      </t>
    </address>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.custom_address.xmlopen in new window

Custom Pament Term

ID: mint_system.account.report_invoice_document.custom_pament_term

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//p[@name='payment_term']" position="replace">
    <p t-if="o.invoice_payment_term_id" name="payment_term">
      Payment terms: <strong t-field="o.invoice_payment_term_id.name"/>
    </p>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.custom_pament_term.xmlopen in new window

Custom Taxes

ID: mint_system.account.report_invoice_document.custom_taxes

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//th[@name='th_taxes']" position="replace">
      <th name="th_taxes" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Steuern</span></th>
  </xpath>
  <xpath expr="//t[@name='account_invoice_line_accountable']/td[5]" position="replace">
      <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
          <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))" id="line_tax_ids"/>
      </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.custom_taxes.xmlopen in new window

Display Shipping Address

ID: mint_system.account.report_invoice_document.display_shipping_address

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="/t/t/t" position="after">
    <t t-if="o.partner_shipping_id">
      <t t-set="information_block">
        <strong>Shipping address:</strong>
        <div t-if="o.partner_shipping_id" style="margin-bottom: 1rem;">
          <div t-field="o.partner_shipping_id" t-options="{'widget': 'contact', 'fields': ['address', 'name'], 'no_marker': True, 'phone_icons': True}" name="invoice_shipping_address"/>
        </div>
      </t>
    </t>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.display_shipping_address.xmlopen in new window

Force Company Vat

ID: mint_system.account.report_invoice_document.force_company_vat

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">

  <t t-set="forced_vat" position="replace">
    <t t-set="forced_vat" t-value="o.company_id.vat"/>
  </t>

</data>

Source: snippets/account.report_invoice_document.force_company_vat.xmlopen in new window

Format Address Blocks

ID: mint_system.account.report_invoice_document.format_address_blocks

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-set='address']/div" position="attributes">
    <attribute name="style">font-size:10pt; line-height: 1.2; padding-bottom:33mm</attribute>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.format_address_blocks.xmlopen in new window

Format Discount

ID: mint_system.account.report_invoice_document.format_discount

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <span t-field="line.discount" position="replace">
      <span class="text-nowrap" t-esc="'{0:.2f}'.format(line.discount)" />
    </span>
  
  </data>

Source: snippets/account.report_invoice_document.format_discount.xmlopen in new window

Format Line Total

ID: mint_system.account.report_invoice_document.format_line_total

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//span[@t-field='line.price_subtotal']" position="replace">
        <span class="text-nowrap" t-esc="('{:,.2f}'.format(line.price_subtotal)).replace(',','\'')"
            groups="account.group_show_line_subtotals_tax_excluded" />
    </xpath>

    <xpath expr="//span[@t-field='line.price_total']" position="replace">
        <span class="text-nowrap" t-esc="'{:,.2f}'.format(line.price_total).replace(',','\'')"
            groups="account.group_show_line_subtotals_tax_included" />
    </xpath>

</data>

Source: snippets/account.report_invoice_document.format_line_total.xmlopen in new window

Format Pos

ID: mint_system.account.report_invoice_document.format_pos

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//t[@t-if='o.sale_order_id']/td" position="attributes">
    <attribute name="style">text-align: right; width: 5mm</attribute>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.format_pos.xmlopen in new window

Format Qty With Decimal

ID: mint_system.account.report_invoice_document.format_qty_with_decimal

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

    <xpath expr="//span[@id='qty']" position="replace">
        <t t-if="line.quantity.is_integer()">
            <span id="qty" t-field="line.quantity" t-options="{'widget': 'integer'}"/>
        </t>
        <t t-else="">
            <span id="qty" t-field="line.quantity"/>
        </t>
    </xpath>

</data>

Source: snippets/account.report_invoice_document.format_qty_with_decimal.xmlopen in new window

Format Table Border

ID: mint_system.account.report_invoice_document.format_table_border

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
 
    <xpath expr="//table[@name='invoice_line_table']" position="before">
      <style>
        .border-solid-black td {
          border-top: 1px solid black !important;
          border-bottom: none !important;
        }
        thead th {
          color: #5c516e;
        }
      </style>
    </xpath>
  
    <xpath expr="//span[@t-esc='current_subtotal']/../.." position="attributes">
      <attribute name="class" separator=" " add="border-solid-black"/>
    </xpath>
  
  </data>

Source: snippets/account.report_invoice_document.format_table_border.xmlopen in new window

Format Title

ID: mint_system.account.report_invoice_document.format_title

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="attributes">
    <attribute name="style">color: black; font-size:13pt; font-weight:bold; margin-top:10mm; margin-bottom:3mm</attribute>
  </xpath>
  
</data>

Source: snippets/account.report_invoice_document.format_title.xmlopen in new window

Get Position

ID: mint_system.account.report_invoice_document.get_position

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//table/thead/tr/th[1]" position="before">
    <!-- <t t-if="o.invoice_line_ids.sale_line_ids or o.invoice_line_ids.purchase_line_id">
      <th id="position">
        <span>Pos</span>
      </th>
    </t> -->
    <th id="position">
      <span>Pos</span>
    </th>
  </xpath>

  <xpath expr="//span[@t-field='line.name']/.." position="before">
    <!-- <t t-if="line.sale_line_ids or line.purchase_order_id">
      <td id="position">
        <span t-esc="line.position" />
      </td>
    </t> -->
    <td id="position">
      <span t-esc="line.position" />
    </td>
  </xpath>

</data>

Source: snippets/account.report_invoice_document.get_position.xmlopen in new window

Group By Pickings

ID: mint_system.account.report_invoice_document.group_by_pickings

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">

  <xpath expr="//h2" position="before">
    <!-- Get all pickings without duplicates -->
    <t t-set="pickings" t-value="list(set(o.invoice_line_ids.picking_ids.filtered(lambda p: p.state != 'cancel')))"/>
    <!--<t t-set="pickings" t-value="list(set(o.invoice_line_ids.picking_ids))"/>-->
    <t t-set="pickings" t-value="sorted(pickings, key=lambda p: p.scheduled_date)"/>
    <!-- Store if has pickings -->
    <t t-set="has_pickings" t-value="len(pickings) > 0"/>
    <!-- Store if has multiple pickings -->
    <t t-set="has_multiple_pickings" t-value="len(pickings) > 1"/>
    <!-- Store if has lines without pickings -->
    <t t-set="has_lines_without_pickings" t-value="len(o.invoice_line_ids.filtered(lambda l: not l.picking_ids)) > 0"/>
  </xpath>
  
  <xpath expr="//h2/span[1]" position="replace">
    <span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and not has_multiple_pickings">Rechnung</span>
    <span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and has_multiple_pickings">Sammelrechnung</span>
  </xpath>

  <xpath expr="//t[@t-foreach='lines']" position="replace">

    <!-- Add empty picking if there are lines without pickings -->
    <t t-if="not has_pickings or has_lines_without_pickings">
      <t t-set="null" t-value="pickings.append(False)"/>
    </t>

     <!--<p t-esc="pickings"/>-->
    <!-- <p t-esc="has_pickings"/> -->
    <!-- <p t-esc="has_multiple_pickings"/> -->
    <!-- <p t-esc="has_lines_without_pickings"/> -->

    <t t-foreach="pickings" t-as="picking">
      <tr t-if="has_pickings and picking" class="o_line_note">
        <td colspan="99" style="padding-top: 1rem;" >
          <strong><span>Lieferung </span><span t-esc="picking.name.replace('WH/OUT/','')"/></strong>
          <!--<strong><span>Lieferung </span><span t-esc="picking.name.replace('WH/OUT/','')"/><span> / Bestellung </span><span t-esc="picking.group_id.name"/></strong>-->
          <span> vom </span>
          <span t-esc="picking.scheduled_date" t-options="{'widget': 'date'}"/><span>:</span>
        </td>
      </tr>
      <tr t-if="not picking" class="o_line_note">
        <td colspan="99" style="padding-top: 1rem;">
          <strong>
            <span>Weitere Positionen: </span>
          </strong>
        </td>
      </tr>
      <t t-foreach="lines" t-as="line">

        <!-- Show line if picking is set and linked or not picking is set and line is unlinked  -->
        <t t-if="(picking and picking in line.picking_ids) or (not line.picking_ids and not picking)">

          <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"/>

          <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 ''">
            <t t-if="not line.display_type" name="account_invoice_line_accountable">
              <td name="account_invoice_line_name">
                <span t-field="line.name" t-options="{'widget': 'text'}"/>
              </td>
              <td class="text-right">
                <span t-field="line.quantity"/>
                <span t-field="line.product_uom_id" groups="uom.group_uom"/>
              </td>
              <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
                <span 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 '' }}">
                <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 '' }}">
                <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">
                <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