Purchase

Mail Notification Confirm

Modify Buttons

ID: mint_system.purchase.mail_notification_confirm.modify_buttons

<?xml version="1.0"?>
<data inherit_id="purchase.mail_notification_confirm" priority="50">

    <xpath expr="//t[1]/a/.." position="replace">
        <t t-if="record._name == 'purchase.order' and record.env.context.get('is_reminder')">
            <a t-att-href="record.get_confirm_url(confirm_type='reminder')" style="margin-right: 10px; background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
                    We have no update
            </a>
            <div>&amp;nbsp;</div>
            <br></br>
            <a t-att-href="record.get_update_url()" style="margin-left: 10px; background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
                    We have to set a new delivery date
            </a>
            <div>&amp;nbsp;</div>
            <div style="margin: 0px; padding: 0px; font-size:13px; text-align: left;">
                    If you have any questions, please do not hesitate to contact us.
                <div>&amp;nbsp;</div>
                    Best regards,
            </div>
        </t>
    </xpath>

</data>

Source: snippets/purchase.mail_notification_confirm.modify_buttons.xmlopen in new window

Purchase Order Form

Add X Comment

ID: mint_system.purchase.purchase_order_form.add_x_comment

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//field[@name='user_id']" position="after">
    <field name="x_comment"/>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.add_x_comment.xmlopen in new window

Date Planned Readonly

ID: mint_system.purchase.purchase_order_form.date_planned_readonly

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//div[@name='date_planned_div']/field[@name='date_planned']" position="attributes">
    <attribute name="attrs">{'readonly': True}</attribute>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.date_planned_readonly.xmlopen in new window

Filter Customer Is Company

ID: mint_system.purchase.purchase_order_form.filter_customer_is_company

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//group[1]/group[1]/field[2]" position="replace">
    <field name="partner_id" widget="res_partner_many2one" domain="[('is_company', '=', True)]" context="{'res_partner_search_mode': 'supplier', 'show_vat': True, 'default_is_company': 'True'}" placeholder="Name, TIN, Email, or Reference"/>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.filter_customer_is_company.xmlopen in new window

Format Dates

ID: mint_system.purchase.purchase_order_form.format_dates

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//field[@name='date_order']" position="attributes">
    <attribute name="widget">date</attribute>
  </xpath>
  <xpath expr="//field[@name='date_approve']" position="attributes">
    <attribute name="widget">date</attribute>
  </xpath>
  <xpath expr="//tree/field[@name='date_planned']" position="attributes">
    <attribute name="widget">date</attribute>
  </xpath>
  <xpath expr="//div/field[@name='date_planned']" position="attributes">
    <attribute name="widget">date</attribute>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.format_dates.xmlopen in new window

Modify Readonly Date Approve

ID: mint_system.purchase.purchase_order_form.modify_readonly_date_approve

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//field[@name='date_approve']" position="attributes">
    <attribute name="readonly">0</attribute>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.modify_readonly_date_approve.xmlopen in new window

Modify Visibility Button Confirm Reminder Mail

ID: mint_system.purchase.purchase_order_form.modify_visibility_button_confirm_reminder_mail

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//button[@name='confirm_reminder_mail']" position="attributes">
    <attribute name="groups">base.group_user</attribute>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.modify_visibility_button_confirm_reminder_mail.xmlopen in new window

Relocate Product Qty And Uom

ID: mint_system.purchase.purchase_order_form.relocate_product_qty_and_uom

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//page[@name='products']//tree/field[@name='product_qty']" position="replace">
  </xpath>

  <xpath expr="//page[@name='products']//tree/field[@name='product_uom']" position="replace">
  </xpath>

  <xpath expr="//page[@name='products']//tree/field[@name='name']" position="after">
    <field name="product_qty"/>
    <field name="product_uom" string="UoM" groups="uom.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))],'required': [('display_type', '=', False)]}" force_save="1" optional="show"/>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.relocate_product_qty_and_uom.xmlopen in new window

Show Move Dest

ID: mint_system.purchase.purchase_order_form.show_move_dest

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//field[@name='order_line']/tree//field[@name='price_unit']" position="after">
    <field name="move_ids" widget="many2many" optional="hide"/>
  </xpath>
  
</data>

Source: snippets/purchase.purchase_order_form.show_move_dest.xmlopen in new window

Show Procurement Group

ID: mint_system.purchase.purchase_order_form.show_procurement_group

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//field[@name='origin']" position="after">
    <field name="group_id"/>
  </xpath>

  <xpath expr="//field[@name='order_line']/tree//field[@name='price_unit']" position="after">
    <field name="group_id" optional="hide"/>
  </xpath>
</data>

Source: snippets/purchase.purchase_order_form.show_procurement_group.xmlopen in new window

X Drawing File

ID: mint_system.purchase.purchase_order_form.x_drawing_file

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_form" priority="50">

  <xpath expr="//field[@name='order_line']/tree[1]/field[@name='name']" position="after">
    <field name="x_drawing_file"/>
  </xpath>

  <xpath expr="//field[@name='order_line']/form[1]//field[@name='name']" position="after">
    <br/>
    <label for="x_drawing_file" string="Zeichnung"/>
    <field name="x_drawing_file"/>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_form.x_drawing_file.xmlopen in new window

Purchase Order Kpis Tree

Add Comment

ID: mint_system.purchase.purchase_order_kpis_tree.add_comment

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_kpis_tree" priority="50">
 
 <xpath expr="//field[@name='date_order']" position="after">
    <field name="comment" optional="show"/>
</xpath>

</data>

Source: snippets/purchase.purchase_order_kpis_tree.add_comment.xmlopen in new window

Add Mail Reception Confirmed

ID: mint_system.purchase.purchase_order_kpis_tree.add_mail_reception_confirmed

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_kpis_tree" priority="50">
 
 <xpath expr="//field[@name='invoice_status']" position="after">
    <field name="mail_reception_confirmed" optional="show"/>
</xpath>

</data>

Source: snippets/purchase.purchase_order_kpis_tree.add_mail_reception_confirmed.xmlopen in new window

Purchase Order Line Tree

Reset View

ID: mint_system.purchase.purchase_order_line_tree.reset_view

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_line_tree" priority="50">

    <field name="name" position="replace">
    </field>

    <field name="price_unit" position="replace">
    </field>

    <field name="discount" position="replace">
    </field>

    <field name="order_id" position="after">
        <field name="x_origin" />
    </field>

    <field name="order_id" position="after">
        <field name="x_state" />
    </field>

    <field name="product_id" position="after">
        <field name="x_user_id" />
    </field>

    <field name="partner_id" position="after">
        <field name="x_partner_ref" />
    </field>


    <field name="date_planned" position="after">
        <field name="x_date_approve" />
    </field>

    <field name="product_qty" position="after">
        <field name="qty_invoiced" />
    </field>

    <field name="product_qty" position="after">
        <field name="qty_received" />
    </field>

</data>

Source: snippets/purchase.purchase_order_line_tree.reset_view.xmlopen in new window

Add Invoice Status

ID: mint_system.purchase.purchase_order_view_search.add_invoice_status

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_view_search" priority="50">

  <xpath expr="//filter[@name='order_date']" position="after">
    <filter string="Invoice Status" name="invoice_state" domain="[]" context="{'group_by': 'invoice_status'}"/>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_view_search.add_invoice_status.xmlopen in new window

Modify Product Id

ID: mint_system.purchase.purchase_order_view_search.modify_product_id

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_view_search" priority="50">

  <xpath expr="//field[@name='product_id']" position="replace">
     <field name="product_id" filter_domain="['|','|',('order_line.product_id', 'ilike', self),('order_line.product_id.type_description', 'ilike', self),('order_line.product_id.type_description2', 'ilike', self)]"/>
  </xpath>

</data>

Source: snippets/purchase.purchase_order_view_search.modify_product_id.xmlopen in new window

Purchase Order View Tree

Add Mail Reception Confirmed

ID: mint_system.purchase.purchase_order_view_tree.add_mail_reception_confirmed

<?xml version="1.0"?>
<data inherit_id="purchase.purchase_order_view_tree" priority="50">

 <xpath expr="//field[@name='invoice_status']" position="after">
    <field name="mail_reception_confirmed" optional="show"/>
</xpath>

</data>

Source: snippets/purchase.purchase_order_view_tree.add_mail_reception_confirmed.xmlopen in new window

Report Purchaseorder Document

Add Agreement

ID: mint_system.purchase.report_purchaseorder_document.add_agreement

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t/t/div/div[2]/div[4]" position="after">
    <div t-if="o.requisition_id" class="col-3 bm-2">
      <strong>Purchase Agreement:</strong>
      <p t-field="o.requisition_id.display_name"  class="m-0"/>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.add_agreement.xmlopen in new window

Add Date Approve

ID: mint_system.purchase.report_purchaseorder_document.add_date_approve

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t/t/div/div/div[3]" position="replace">
    <div t-if="o.user_id" class="col-3 bm-2">
                    <strong>Order Date:</strong>
                     <p t-field="o.date_approve" class="m-0" t-options='{ "widget": "date" }'/>
                </div>

  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.add_date_approve.xmlopen in new window

Add Email

ID: mint_system.purchase.report_purchaseorder_document.add_email

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t[1]/t[1]/div[1]/div[2]/div[1]/p[1]" position="after">
    <span t-field="o.user_id.email"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.add_email.xmlopen in new window

ID: mint_system.purchase.report_purchaseorder_document.add_footer

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//div[@class='oe_structure']/.." position="after">
    <style>
      table#footer {
        width: 100%;
        font-size: 8pt;
      }
      table#footer tr, td {
        vertical-align: top;
      }
    </style>
    <table id='footer'>
      <tr>
        <td width="40%" t-if="o.payment_term_id.note">Zahlungsbedingungen 
          <span t-field="o.payment_term_id.note"/>
        </td>
        <td width="60%">
          Lieferung gemäss unseren allgemeinen Einkaufsbedingungen
        </td>
      </tr>
      <tr>
        <td >MWST-Nr: 
          <span t-field="o.company_id.vat"/>
        </td>
      </tr>
    </table>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.add_footer.xmlopen in new window

Add Infotable

ID: mint_system.purchase.report_purchaseorder_document.add_infotable

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//div[@id='informations']" position="before">
    <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 width="17%">Bestelldatum</td>
        <td width="44%">
          <span t-field='o.create_date' t-options='{ "widget": "date" }'/>
        </td>
        <td width="14%"></td>
        <td width="25%"></td>
      </tr>

      <tr>
        <td>Kunden-Nr.</td>
        <td>
          <span t-field='o.partner_id.ref'/>
        </td>
        <td></td>
        <td></td>
      </tr>
      <tr>
        <td></td>
        <td>
          <span t-field='o.partner_ref'/>
        </td>
        <td>U/Referenz</td>
        <td>
          <span t-field='o.user_id'/>
        </td>
      </tr>
      <tr>
        <td>Referenz</td>
        <td>
          <span t-field='o.comment'/>
        </td>
        <td>Lieferkondition</td>
        <td>
          <span t-field='o.incoterm_id'/>
        </td>
      </tr>
    </table>

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

</data>

Source: snippets/purchase.report_purchaseorder_document.add_infotable.xmlopen in new window

Append Payment Terms

ID: mint_system.purchase.report_purchaseorder_document.append_payment_terms

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

<xpath expr="/t/t/div/div[4]" position="after">
    <div class="row">
      <div class="col">
        <t t-if="o.payment_term_id" name="payment_term">
            <strong>Payment Terms: </strong><span t-field="o.payment_term_id.name"/>
        </t>
      </div>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.append_payment_terms.xmlopen in new window

Date Created

ID: mint_system.purchase.report_purchaseorder_document.date_created

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t/t/div/div[2]/div[2]" position="after">
    <div t-if="o.create_date" class="col-3 bm-2">
      <strong>Date Created:</strong>
      <p t-field="o.create_date" t-options='{"widget": "date"}' class="m-0"/>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.date_created.xmlopen in new window

Format Address Blocks

ID: mint_system.purchase.report_purchaseorder_document.format_address_blocks

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_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>
    <attribute name="t-options-fields">['address', 'name']</attribute>
  </xpath>

  <xpath expr="/t/t/t[4]/t/strong" position="replace">
    <div style="font-size:8pt; font-weight:bold">Shipping address:</div>
  </xpath>

  <xpath expr="/t/t/t[4]/t/div/span" position="replace">
  </xpath>

  <xpath expr="/t/t/t[4]/t/div/div" position="attributes">
    <attribute name="style">font-size:10pt; line-height: 1.2;</attribute>
    <attribute name="t-options-fields">['address', 'name']</attribute>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.format_address_blocks.xmlopen in new window

Format As Date

ID: mint_system.purchase.report_purchaseorder_document.format_as_date

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t[1]/t[1]/div[1]/div[2]/div[3]/p[1]" position="attributes">
    <attribute name="t-options-widget">"date"</attribute>
  </xpath>

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

</data>

Source: snippets/purchase.report_purchaseorder_document.format_as_date.xmlopen in new window

Format Qty With Decimal

ID: mint_system.purchase.report_purchaseorder_document.format_qty_with_decimal

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//span[@id='product_qty']" position="replace">
    <t t-if="line.product_uom.id == 1">
      <span id="product_qty" t-field="line.product_qty" t-options="{'widget': 'integer'}"/>
    </t>
    <t t-else="">
      <span id="product_qty" t-field="line.product_qty"/>
    </t>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.format_qty_with_decimal.xmlopen in new window

Format Qty

ID: mint_system.purchase.report_purchaseorder_document.format_qty

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//span[@t-field='order_line.product_qty']" position="replace">
    <t t-if="order_line.product_uom.id == 1">
      <span t-field="order_line.product_qty" t-options="{'widget': 'integer'}"/>
    </t>
  </xpath>
  
</data>

Source: snippets/purchase.report_purchaseorder_document.format_qty.xmlopen in new window

Format Title

ID: mint_system.purchase.report_purchaseorder_document.format_title

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">>

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

</data>

Source: snippets/purchase.report_purchaseorder_document.format_title.xmlopen in new window

Get Position

ID: mint_system.purchase.report_purchaseorder_document.get_position

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//table/thead/tr/th[1]" position="before">
    <th>
      <span>Pos</span>
    </th>
  </xpath>
  <xpath expr="//table/tbody/t/tr/t[1]/td[1]" position="before">
    <td>
      <span t-esc="line.position"/>
    </td>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.get_position.xmlopen in new window

Header Margin

ID: mint_system.purchase.report_purchaseorder_document.header_margin

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t/t/div/table" position="attributes">
    <attribute name="style" separator=";" add="margin-top: 2rem"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.header_margin.xmlopen in new window

Modify Main Table

ID: mint_system.purchase.report_purchaseorder_document.modify_main_table

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <!-- add default_code   -->
  <xpath expr="//table/thead/tr/th[1]" position="after">
    <th>
      <span>Artikel Nr.</span>
    </th>
  </xpath>
  <xpath expr="//table/tbody/t/tr/t[1]/td[1]" position="after">
    <td>
      <span t-field="line.product_id.default_code"/>
    </td>
  </xpath>

  <!-- replace product description -->
  <xpath expr="//table/tbody/t[2]/tr/t[1]/td[3]/span" position="replace">
    <t>
      <span style="font-weight:bold;" t-field="line.product_id.type_description"/>
    </t>
  </xpath>

  <!-- add second row -->
  <xpath expr="//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.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>
      <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>

  <!-- header: position -->
  <xpath expr="//table[@class='table table-borderless table-sm']/thead/tr/th[1]" position="attributes">
    <attribute name="style">width: 5mm</attribute>/>
  </xpath>

  <!-- header: default code -->
  <xpath expr="//table[@class='table table-borderless table-sm']/thead/tr/th[2]" position="attributes">
    <attribute name="style">width: 27mm; text-align: right; padding-right: 10px</attribute>"/>
  </xpath>

  <!-- header: description -->
  <xpath expr="//table[@class='table table-borderless table-sm']/thead/tr/th[3]" position="attributes">
    <attribute name="style">width: 73mm</attribute>/>
  </xpath>

  <!-- header: commitment date -->
  <xpath expr="//table[@class='table table-borderless table-sm']/thead/tr/th[5]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>

  <!-- header: qty -->
  <xpath expr="//table[@class='table table-borderless table-sm']/thead/tr/th[5]" position="attributes">
    <attribute name="style">text-align: right; padding-right: 5px</attribute>"/>
  </xpath>

  <!-- position -->
  <xpath expr="//table[@class='table table-borderless table-sm']/tbody/t[2]/tr/t[1]/td[1]" position="attributes">
    <attribute name="style">text-align: right</attribute>/>
  </xpath>

  <!-- default code -->
  <xpath expr="//table[@class='table table-borderless table-sm']/tbody/t[2]/tr/t[1]/td[2]" position="attributes">
    <attribute name="style">text-align: right; padding-right: 10px;</attribute>/>
  </xpath>

  <!-- remove taxes -->
  <xpath expr="//thead/tr[1]/th[4]" position="replace"/>
  <xpath expr="//tbody/t[2]/tr[1]/t[1]/td[4]" position="replace"/>

  <!-- commitment date -->
  <xpath expr="//table[@class='table table-borderless table-sm']/tbody/t[2]/tr/t[1]/td[4]/span" position="attributes">
    <attribute name="t-options-widget">"date"</attribute>
  </xpath>
  <xpath expr="//table[@class='table table-borderless table-sm']/tbody/t[2]/tr[1]/t[1]/td[4]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>

  <!-- qty-->
  <xpath expr="/t[1]/t[1]/div[1]/table[2]/tbody[1]/t[2]/tr[1]/t[1]/td[5]/span[1]" position="attributes">
    <attribute name="t-options-widget">"integer"</attribute>
  </xpath>
  <xpath expr="/t/t/div/table[2]/tbody/t[2]/tr[1]/t[1]/td[5]/span[1]" position="attributes">
    <attribute name="class" separator=" " add="o_bold"/>
  </xpath>

  <!-- price -->
  <xpath expr="//table[@class='table table-borderless table-sm']/tbody/t[2]/tr/t[1]/td[6]/span" position="replace">
    <span t-esc="'%g' % line.price_unit if str(line.price_unit)[::-1].find('.') >= 3 else '%.2f' % line.price_unit"/>
  </xpath>



  <xpath expr="//table[@class='table table-borderless table-sm']" 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>
    <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">

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

        <t t-if="o.amount_tax > 0">
          <td style="width:12%; text-align:left">MWST</td>
          <td style="width:17%; text-align:left">
            <span t-field="o.amount_tax" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
          </td>
        </t>
        <t t-elif="o.amount_tax == 0">
          <td></td>
          <td></td>
        </t>

        <td style="width:14%; text-align:right">
          <Strong>Bestellbetrag</Strong>
        </td>
        <td style="width:18%; text-align:right" class="text-right">
          <span t-field="o.amount_total" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
        </td>
      </tr>

    </table>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.modify_main_table.xmlopen in new window

Product Description Replace

ID: mint_system.purchase.report_purchaseorder_document.product_description_replace

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//table/thead/tr/th[1]" position="before">
    <th>
      <span>Pos</span>
    </th>
  </xpath>
  <xpath expr="//table/tbody/t/tr/t[1]/td[1]" position="before">
    <td>
      <span t-esc="line.position"/>
    </td>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.product_description_replace.xmlopen in new window

Qty Remaining

ID: mint_system.purchase.report_purchaseorder_document.qty_remaining

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//span[@id='product_uom']" position="after">
    <t t-set="product" t-value="o.requisition_id.line_ids.filtered(lambda r: r.product_id.id == line.product_id.id)"/>
    <t t-if="product"> / <span t-esc="product.product_qty - product.qty_ordered"/> <span t-field="line.product_uom.name"/></t>
  </xpath>
  
  <xpath expr="//table/thead/tr/th[4]/strong" position="replace">
    <strong>Qty / Rem. Agreement Qty<br/></strong>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.qty_remaining.xmlopen in new window

Remove Informations

ID: mint_system.purchase.report_purchaseorder_document.remove_informations

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

<xpath expr="//div[@id='informations']" position="replace">
</xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.remove_informations.xmlopen in new window

Remove Summary Table

ID: mint_system.purchase.report_purchaseorder_document.remove_summary_table

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

<xpath expr="//div[@id='total']" position="replace">
</xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.remove_summary_table.xmlopen in new window

Remove Taxes

ID: mint_system.purchase.report_purchaseorder_document.remove_taxes

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//table[1]/thead[1]/tr[1]/th[2]" position="replace"/>
  <xpath expr="//table[1]/tbody[1]/t[2]/tr[1]/t[1]/td[2]" position="replace"/>

</data>

Source: snippets/purchase.report_purchaseorder_document.remove_taxes.xmlopen in new window

Remove Vat

ID: mint_system.purchase.report_purchaseorder_document.remove_vat

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

<xpath expr="//p[@t-if='o.partner_id.vat']" position="replace">
</xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.remove_vat.xmlopen in new window

Rename Deadline

ID: mint_system.purchase.report_purchaseorder_document.rename_deadline

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t/t/div/div[2]/div[3]/strong" position="replace">
    <strong>Deadline:</strong>
  </xpath>

  <!-- <xpath expr="/t/t/div/div[2]/div[4]" position="after">
    <div t-if="o.date_order" class="col-3 bm-2">
      <strong>Order Deadline:</strong>
      <p t-field="o.date_order" t-options='{ "widget": "date" }' class="m-0"/>
    </div>
  </xpath> -->

</data>

Source: snippets/purchase.report_purchaseorder_document.rename_deadline.xmlopen in new window

Replace Partner Id

ID: mint_system.purchase.report_purchaseorder_document.replace_partner_id

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//t[@t-set='address']/div" position="replace">
    <div style="font-size:10pt; line-height: 1.2; padding-bottom:33mm">
      <t t-if="o.partner_order_id.parent_name">
        <div t-field="o.partner_order_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;: False}" name="purchase_order_id"/>
      </t>
      <t t-if="not o.partner_order_id.parent_name">
        <div t-field="o.partner_order_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;: False}" name="purchase_order_id"/>
      </t>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.replace_partner_id.xmlopen in new window

Replace Representative

ID: mint_system.purchase.report_purchaseorder_document.replace_representative

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t[1]/t[1]/div[1]/div[2]/div[1]/p[1]" position="replace">
    <span t-field="o.user_id.email"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.replace_representative.xmlopen in new window

Round Price

ID: mint_system.purchase.report_purchaseorder_document.round_price

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//table[2]/tbody[1]/t[2]/tr[1]/t[1]/td[6]/span[1]" position="replace">
    <span t-esc="'%g' % line.price_unit if str(line.price_unit)[::-1].find('.') >= 3 else '%.2f' % line.price_unit"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.round_price.xmlopen in new window

Row Date Align Left

ID: mint_system.purchase.report_purchaseorder_document.row_date_align_left

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="49">

  <xpath expr="/t/t/div/table/thead/tr/th[3]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>
  <xpath expr="/t/t/div/table/tbody/t[2]/tr/t[1]/td[3]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>
  <xpath expr="/t[1]/t[1]/div[1]/table[1]/tbody[1]/t[2]/tr[1]/t[1]/td[3]/span[1]" position="attributes">
    <attribute name="t-options-widget">"date"</attribute>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.row_date_align_left.xmlopen in new window

Sequence In Table

ID: mint_system.purchase.report_purchaseorder_document.sequence_in_table

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="//table/thead/tr/th[1]" position="before">
    <th>
      <span>Pos</span>
    </th>
  </xpath>
  <xpath expr="//t[@t-foreach='o.order_line']" position="before">
    <span t-set="index" t-value="1"/>
  </xpath>
  <xpath expr="//table/tbody/t/tr/t[1]/td[1]" position="before">
    <td>
      <!-- <span t-esc="line.sequence - 9"/> -->
      <span t-esc="index"/><t t-set="index" t-value="index+1"/>
    </td>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.sequence_in_table.xmlopen in new window

Set Ids

ID: mint_system.purchase.report_purchaseorder_document.set_ids

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

	<xpath expr="//span[@t-field='line.product_qty']" position="attributes">
		<attribute name="id">product_qty</attribute>
	</xpath>

  <xpath expr="//span[@t-field='line.product_uom.name']" position="attributes">
		<attribute name="id">product_uom</attribute>
	</xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.set_ids.xmlopen in new window

Show Seller Product

ID: mint_system.purchase.report_purchaseorder_document.show_seller_product

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <!-- <t t-foreach="line.product_id.seller_ids" t-as="seller">
      <span t-field="seller.name"/>
  </t> -->

  <xpath expr="//tbody/t[2]/tr/t[1]/td[1]/span" position="after">
    <t t-set="seller" t-value="line.product_id.seller_ids.browse(o.partner_id.id)"/>
    Product Code: <span t-field="seller.product_code"/>
    Product Name: <span t-field="seller.product_name"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.show_seller_product.xmlopen in new window

Terms And Conditions

ID: mint_system.purchase.report_purchaseorder_document.terms_and_conditions

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t/t/div/div[5]" position="after">
    <div class="row">
      <div class="col">
        <b>Terms and Conditions:</b>
        <ul>
          <li>An order confirmation is required within 5 working days</li>
          <li>The delivery date is the day of arrival at <span t-field="res_company.name"/></li>
          <li>Partial deliveries only after prior release</li>
          <li>If the confirmed delivery date is not respected, <span t-field="res_company.name"/> is applying a penalty of 2% of the order value, until max. 10%</li>
        </ul>
      </div>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.terms_and_conditions.xmlopen in new window

Title Margin

ID: mint_system.purchase.report_purchaseorder_document.title_margin

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchaseorder_document" priority="50">

  <xpath expr="/t/t/div/div[1]" position="attributes">
    <attribute name="style" separator=";" add="margin-top: 2rem"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchaseorder_document.title_margin.xmlopen in new window

Report Purchasequotation Document

Add Default Code

ID: mint_system.purchase.report_purchasequotation_document.add_default_code

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

    <xpath expr="//thead/tr/th[1]" position="after">
        <th>
            <span>Artikel Nr.</span>
        </th>
    </xpath>
    <xpath expr="//tbody/t/tr/t[1]/td[1]" position="after">
        <td>
            <span t-field="order_line.product_id.default_code"/>
        </td>
    </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.add_default_code.xmlopen in new window

ID: mint_system.purchase.report_purchasequotation_document.add_footer

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//div[@class='oe_structure']/.." position="after">
    <style>
      table#footer {
        width: 100%;
        font-size: 8pt;
      }
      table#footer tr, td {
        vertical-align: top;
      }
    </style>
    <table id='footer'>
      <tr>
        <td width="40%" t-if="o.payment_term_id.note">Zahlungsbedingungen 
          <span t-field="o.payment_term_id.note"/>
        </td>
        <td width="60%">
          Lieferung gemäss unseren allgemeinen Einkaufsbedingungen
        </td>
      </tr>
      <tr>
        <td >MWST-Nr: 
          <span t-field="o.company_id.vat"/>
        </td>
      </tr>
    </table>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.add_footer.xmlopen in new window

Add Infotable

ID: mint_system.purchase.report_purchasequotation_document.add_infotable

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

    <xpath expr="//h2" position="after">
        <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 width="17%">Anfragedatum</td>
                <td width="44%">
                    <span t-field='o.date_order' t-options='{ "widget": "date" }'/>
                </td>
                <td width="14%"></td>
                <td width="25%"></td>
            </tr>
            <tr>
                <td>Kunden-Nr.</td>
                <td>
                    <span t-field='o.partner_id.ref'/>
                </td>

            </tr>
            <tr>
                <td></td>
                <td>
                    <span t-field='o.partner_ref'/>
                </td>
                <td>U/Referenz</td>
                <td>
                    <span t-field='o.user_id'/>
                </td>
            </tr>
            <tr>
                <td>Referenz</td>
                <td>
                    <span t-field='o.comment'/>
                </td>
                <td>Lieferkondition</td>
                <td>
                    <span t-field='o.incoterm_id.code'/>
                </td>
            </tr>
        </table>

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

</data>  

Source: snippets/purchase.report_purchasequotation_document.add_infotable.xmlopen in new window

Append Payment Terms

ID: mint_system.purchase.report_purchasequotation_document.append_payment_terms

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

<xpath expr="/t/t/div/div[4]" position="after">
    <div class="row">
      <div class="col">
        <t t-if="o.payment_term_id" name="payment_term">
            <strong>Payment Terms: </strong><span t-field="o.payment_term_id.name"/>
        </t>
      </div>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.append_payment_terms.xmlopen in new window

Format Address Blocks

ID: mint_system.purchase.report_purchasequotation_document.format_address_blocks

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_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>
    <attribute name="t-options-fields">['address', 'name']</attribute>
  </xpath>

  <xpath expr="/t/t/t[4]/t/strong" position="replace">
    <div style="font-size:8pt; font-weight:bold">Shipping address:</div>
  </xpath>

  <xpath expr="/t/t/t[4]/t/div/span" position="replace">
  </xpath>

  <xpath expr="/t/t/t[4]/t/div/div" position="attributes">
    <attribute name="style">font-size:10pt; line-height: 1.2;</attribute>
    <attribute name="t-options-fields">['address', 'name']</attribute>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.format_address_blocks.xmlopen in new window

Format As Date

ID: mint_system.purchase.report_purchasequotation_document.format_as_date

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//span[@t-field='order_line.date_planned']" position="attributes">
    <attribute name="t-options-widget">"date"</attribute>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.format_as_date.xmlopen in new window

Format Date

ID: mint_system.purchase.report_purchasequotation_document.format_date

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

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

</data>

Source: snippets/purchase.report_purchasequotation_document.format_date.xmlopen in new window

Format Qty With Decimal

ID: mint_system.purchase.report_purchasequotation_document.format_qty_with_decimal

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//span[@id='product_qty']" position="replace">
    <t t-if="line.product_uom.id == 1">
      <span id="product_qty" t-field="line.product_qty" t-options="{'widget': 'integer'}"/>
    </t>
    <t t-else="">
      <span id="product_qty" t-field="line.product_qty"/>
    </t>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.format_qty_with_decimal.xmlopen in new window

Format Qty

ID: mint_system.purchase.report_purchasequotation_document.format_qty

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//span[@t-field='order_line.product_qty']" position="replace">
    <t t-if="order_line.product_uom.id == 1">
      <span t-field="order_line.product_qty" t-options="{'widget': 'integer'}"/>
    </t>
  </xpath>
  
</data>

Source: snippets/purchase.report_purchasequotation_document.format_qty.xmlopen in new window

Get Position

ID: mint_system.purchase.report_purchasequotation_document.get_position

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//table/thead/tr/th[1]" position="before">
    <th>
      <span>Pos</span>
    </th>
  </xpath>
  <xpath expr="//table/tbody/t/tr/t[1]/td[1]" position="before">
    <td>
      <span t-esc="order_line.position"/>
    </td>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.get_position.xmlopen in new window

Header Margin

ID: mint_system.purchase.report_purchasequotation_document.header_margin

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="/t/t/div/table" position="attributes">
    <attribute name="style" separator=";" add="margin-top: 2rem"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.header_margin.xmlopen in new window

Modify Main Table

ID: mint_system.purchase.report_purchasequotation_document.modify_main_table

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <!-- replace product description -->
  <xpath expr="//table/tbody/t/tr/t[1]/td[3]/span" position="replace">
    <t>
      <span style="font-weight:bold;" t-field="order_line.product_id.type_description"/>
    </t>
  </xpath>

  <!-- add second row -->
  <xpath expr="//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="order_line.name"/>
        <br/>
        <t t-if="order_line.product_id.country_of_origin_id.code">Ursprungsland: <span t-field="order_line.product_id.country_of_origin_id.code"/>
        </t>
        <t t-if="order_line.product_id.hs_code"> / Zollposition: <span t-field="order_line.product_id.hs_code"/>
        </t>
      </td>

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

  <xpath expr="//table[2]" position="attributes">
    <attribute name="style">color: black; font-size:9pt</attribute>
    <attribute name="class">table table-borderless table-sm </attribute>
  </xpath>

  <!-- header -->
  <xpath expr="//table[2]/thead" position="attributes">
    <attribute name="style">color: black; font-size:9pt; border-top-style:solid; border-bottom-style:solid; border-width:1px; border-color:black</attribute>
  </xpath>

  <!-- Header: position -->
  <xpath expr="//table[2]/thead/tr/th[1]" position="attributes">
    <attribute name="style">width: 20px</attribute>/>
  </xpath>

  <!-- header: default code -->
  <xpath expr="//table/thead/tr/th[2]" position="attributes">
    <attribute name="style">width: 100px; text-align: right; padding-right: 10px</attribute>
  </xpath>

  <!-- header: description -->
  <xpath expr="//table/thead/tr/th[3]" position="attributes">
    <attribute name="style">width: 400px;</attribute>
  </xpath>

  <!-- header: date_planned -->
  <xpath expr="//table/thead/tr/th[4]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>

  <!-- position -->
  <xpath expr="//table/tbody/t/tr/t[1]/td[1]" position="attributes">
    <attribute name="style">text-align: right;</attribute>/>
  </xpath>

  <!-- default code -->
  <xpath expr="//table/tbody/t/tr/t[1]/td[2]" position="attributes">
    <attribute name="style">text-align: right; padding-right: 10px</attribute>
  </xpath>

  <!-- date_planned -->
  <xpath expr="//table/tbody/t/tr/t[1]/td[4]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>
  <xpath expr="//table/tbody/t/tr/t[1]/td[4]/span[1]" position="attributes">
    <attribute name="t-options-widget">"date"</attribute>
  </xpath>

  <!-- qty -->
  <xpath expr="//table/tbody/t/tr/t[1]/td[5]/span" position="replace">
    <span style="font-weight: bold" t-esc="'%g' % order_line.product_qty"/>
  </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>
    <table class="table table-borderless table-sm" style="margin-top:20px; color:black; font-family: arial; font-size:9pt; border-top-style:solid; border-bottom-style:solid; border-width:1px; border-color:black">
      
      <tr >
        <td style="width:15.5%; text-align:left">
          <Strong>Warenwert</Strong>
        </td>
        <td style="width:23%; text-align:left">
          <span t-field="o.currency_id"/>
        </td>
        <td style="width:12%; text-align:left"></td>
        <td style="width:17%; text-align:left">         
        </td>
        <td style="width:14%; text-align:right">
          <Strong>Bestellbetrag</Strong>
        </td>
        <td style="width:18%; text-align:right" class="text-right">
          <span t-field="o.currency_id"/>
        </td>
      </tr>

    </table>    
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.modify_main_table.xmlopen in new window

Remove Date Planned

ID: mint_system.purchase.report_purchasequotation_document.remove_date_planned

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//th[@name='th_expected_date']" position="replace">
  </xpath>

  <xpath expr="//span[@t-field='order_line.date_planned']/.." position="replace">
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.remove_date_planned.xmlopen in new window

Remove Incoterms

ID: mint_system.purchase.report_purchasequotation_document.remove_incoterms

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="/t[1]/t[1]/div[1]/div[2]/div[1]/strong[1]" position="replace"/>
  <xpath expr="/t[1]/t[1]/div[1]/div[2]/div[1]/p[1]" position="replace"/>
</data>

Source: snippets/purchase.report_purchasequotation_document.remove_incoterms.xmlopen in new window

Remove Vat

ID: mint_system.purchase.report_purchasequotation_document.remove_vat

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">>

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

</data>

Source: snippets/purchase.report_purchasequotation_document.remove_vat.xmlopen in new window

Replace Partner Id

ID: mint_system.purchase.report_purchasequotation_document.replace_partner_id

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//t[@t-set='address']/div" position="replace">
    <div style="font-size:10pt; line-height: 1.2; padding-bottom:33mm">
      <t t-if="o.partner_order_id.parent_name">
        <div t-field="o.partner_order_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;: False}" name="purchase_order_id"/>
      </t>
      <t t-if="not o.partner_order_id.parent_name">
        <div t-field="o.partner_order_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;: False}" name="purchase_order_id"/>
      </t>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.replace_partner_id.xmlopen in new window

Row Date Align Left

ID: mint_system.purchase.report_purchasequotation_document.row_date_align_left

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="//table/thead/tr/th[2]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>
  <xpath expr="//table/tbody/t/tr/t[1]/td[2]" position="attributes">
    <attribute name="class" separator=" " add="text-left" remove="text-center"/>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.row_date_align_left.xmlopen in new window

Sequence In Table

ID: mint_system.purchase.report_purchasequotation_document.sequence_in_table

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

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

  <xpath expr="//tr[@t-foreach='lines']" position="before">
    <t t-set="index" t-value="1"/>
  </xpath>

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

</data>

Source: snippets/purchase.report_purchasequotation_document.sequence_in_table.xmlopen in new window

Set Ids

ID: mint_system.purchase.report_purchasequotation_document.set_ids

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

	<xpath expr="//span[@t-field='line.product_qty']" position="attributes">
		<attribute name="id">product_qty</attribute>
	</xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.set_ids.xmlopen in new window

Style Trimada

ID: mint_system.purchase.report_purchasequotation_document.style_trimada

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_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;
			}
			.subtitel {
				font-size: 11pt;
				font-family: arial;
				margin-top: 10mm;
			}
			.note {
				font-size: 9pt;
				font-family: arial;
			}
		</style>
	</xpath>

	<xpath expr="//table[2]" position="attributes">
		<attribute name="class" separator=" " add="trimada table-borderless"/>
	</xpath>

  	<xpath expr="//div[@name='information_block']" position="attributes">
		<attribute name="class" separator=" " add="trimada table-borderless"/>
	</xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.style_trimada.xmlopen in new window

Terms And Conditions

ID: mint_system.purchase.report_purchasequotation_document.terms_and_conditions

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

  <xpath expr="/t/t/div/div[3]" position="after">
    <div class="row">
      <div class="col">
        <b>Terms and Conditions:</b>
        <ul>
          <li>An order confirmation is required within 5 working days</li>
          <li>The delivery date is the day of arrival at <span t-field="res_company.name"/></li>
          <li>Partial deliveries only after prior release</li>
          <li>If the confirmed delivery date is not respected, <span t-field="res_company.name"/> is applying a penalty of 2% of the order value, until max. 10%</li>
        </ul>
      </div>
    </div>
  </xpath>

</data>

Source: snippets/purchase.report_purchasequotation_document.terms_and_conditions.xmlopen in new window

Title Margin

ID: mint_system.purchase.report_purchasequotation_document.title_margin

<?xml version="1.0"?>
<data inherit_id="purchase.report_purchasequotation_document" priority="50">

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

</data>

Source: snippets/purchase.report_purchasequotation_document.title_margin.xmlopen in new window

View Purchase Order Filter

Add State

ID: mint_system.purchase.view_purchase_order_filter.add_state

<?xml version="1.0"?>
<data inherit_id="purchase.view_purchase_order_filter" priority="50">

  <xpath expr="//filter[@name='order_date']" position="after">
     <filter string="Status" name="order_state" domain="[]" context="{'group_by': 'state'}"/>
  </xpath> 

</data>

Source: snippets/purchase.view_purchase_order_filter.add_state.xmlopen in new window

Modify Product Id

ID: mint_system.purchase.view_purchase_order_filter.modify_product_id

<?xml version="1.0"?>
<data inherit_id="purchase.view_purchase_order_filter" priority="50">

  <xpath expr="//field[@name='product_id']" position="replace">
     <field name="product_id" filter_domain="['|','|',('order_line.product_id', 'ilike', self),('order_line.product_id.type_description', 'ilike', self),('order_line.product_id.type_description2', 'ilike', self)]"/>
  </xpath>

</data>

Source: snippets/purchase.view_purchase_order_filter.modify_product_id.xmlopen in new window