Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <data>
- <xpath expr="/t[@t-name='sale.report_saleorder_document']" position="replace" mode="inner">
- <t t-call="web.external_layout">
- <t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)"/>
- <t t-set="forced_vat" t-value="doc.fiscal_position_id.foreign_vat"/> <!-- So that it appears in the footer of the report instead of the company VAT if it's set -->
- <t t-set="address">
- <div t-field="doc.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
- <p t-if="doc.partner_id.vat">
- <t t-if="doc.company_id.account_fiscal_country_id.vat_label" t-out="doc.company_id.account_fiscal_country_id.vat_label"/>
- <t t-else="">Tax ID</t>: <span t-field="doc.partner_id.vat"/>
- </p>
- </t>
- <t t-if="doc.partner_shipping_id == doc.partner_invoice_id and doc.partner_invoice_id != doc.partner_id or doc.partner_shipping_id != doc.partner_invoice_id">
- <t t-set="information_block">
- <strong>
- <t t-if="doc.partner_shipping_id == doc.partner_invoice_id">
- Invoicing and Shipping Address
- </t>
- <t t-else="">
- Invoicing Address
- </t>
- </strong>
- <div t-field="doc.partner_invoice_id" t-options="{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}"/>
- <t t-if="doc.partner_shipping_id != doc.partner_invoice_id">
- <strong>Shipping Address</strong>
- <div t-field="doc.partner_shipping_id" t-options="{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}"/>
- </t>
- </t>
- </t>
- <div class="page">
- <div id="introduction" class="mb-3">
- <h5 t-out="doc.x_studio_titulo"/>
- </div>
- <div class="oe_structure"/>
- <t t-set="is_proforma" t-value="env.context.get('proforma', False) or is_pro_forma"/>
- <t t-set="layout_document_title">
- <span t-if="is_proforma" style="font-size: 12pt; font-weight: normal;">Factura Pro-Forma # </span>
- <span t-elif="doc.state in ['draft','sent']" style="font-size: 12pt; font-weight: normal;">Presupuesto # </span>
- <span t-else="" style="font-size: 12pt; font-weight: normal;">Pedido # </span>
- <span t-field="doc.name" style="font-size: 12pt; font-weight: normal;">SO0000</span>
- </t>
- <div class="row mb-4" id="informations">
- <div t-if="doc.client_order_ref" class="col" name="informations_reference">
- <strong>Your Reference</strong>
- <div t-field="doc.client_order_ref">SO0000</div>
- </div>
- <t t-if="doc.is_subscription">
- <div class="col" name="plan">
- <strong>Recurring Plan</strong>
- <div t-field="doc.plan_id.name"/>
- </div>
- <div t-if="doc.start_date" class="col" name="subscription_start_date">
- <strong>Start Date</strong>
- <div t-field="doc.start_date"/>
- </div>
- </t>
- <div t-if="doc.date_order" class="col" name="informations_date">
- <strong t-if="is_proforma">Issued Date</strong>
- <strong t-elif="doc.state in ['draft', 'sent']">Fecha presupuesto</strong>
- <strong t-else="">Fecha pedido</strong>
- <div t-field="doc.date_order" t-options="{"widget": "date"}">2023-12-31</div>
- </div>
- <div t-if="doc.validity_date and doc.state in ['draft', 'sent']" class="col" name="expiration_date">
- <strong>Vencimiento de la propuesta</strong>
- <div t-field="doc.validity_date">2023-12-31</div>
- </div>
- <div class="col" t-if="doc.incoterm">
- <strong>Incoterm</strong>
- <div t-if="doc.incoterm_location">
- <span t-field="doc.incoterm.code"/> <br/>
- <span t-field="doc.incoterm_location"/>
- </div>
- <div t-else="" t-field="doc.incoterm.code"/>
- </div>
- <div t-if="doc.user_id.name" class="col">
- <strong>Salesperson</strong>
- <div t-field="doc.user_id">Mitchell Admin</div>
- </div>
- </div>
- <!-- ====== ANTECEDENTES (bloque indivisible, mantiene texto e imagen juntos) ====== -->
- <!--<t t-if="doc.x_studio_texto_antecedentes or doc.x_studio_imagen_antecedentes">-->
- <!--<t t-if="(doc.x_studio_texto_antecedentes and not ('<br' in doc.x_studio_texto_antecedentes or '&nbsp;' in doc.x_studio_texto_antecedentes or doc.x_studio_texto_antecedentes.strip() == '')) or doc.x_studio_imagen_antecedentes">-->
- <t t-if="doc.x_studio_antecedentes_bool">
- <div style="page-break-inside: avoid;">
- <section class="mt-4" style="page-break-inside: avoid; overflow: hidden;">
- <h4>ANTECEDENTES</h4>
- <hr class="mt-0 mb-1"/>
- <t t-if="doc.x_studio_texto_antecedentes">
- <div class="mb-3" style="page-break-inside: avoid;">
- <t t-raw="doc.x_studio_texto_antecedentes"/>
- </div>
- </t>
- <t t-if="doc.x_studio_imagen_antecedentes">
- <div style="text-align:center; margin-top:10px; page-break-inside: avoid;">
- <img t-att-src="image_data_uri(doc.x_studio_imagen_antecedentes)" style="max-width:70%; height:auto; display:block; margin-left:auto; margin-right:auto; max-height:18cm;"/>
- </div>
- </t>
- </section>
- </div>
- </t>
- <!-- ====== ALCANCE ====== -->
- <!--<t t-if="(doc.x_studio_texto_alcance and not ('<br' in doc.x_studio_texto_alcance or '&nbsp;' in doc.x_studio_texto_alcance or doc.x_studio_texto_alcance.strip() == ''))">-->
- <t t-if="doc.x_studio_alcance_bool">
- <div style="page-break-inside: avoid;">
- <section class="mt-4">
- <h4>ALCANCE DE LOS TRABAJOS OFERTADOS</h4>
- <hr class="mt-0 mb-1"/>
- <div class="mb-3"><t t-raw="doc.x_studio_texto_alcance"/></div>
- </section>
- </div>
- </t>
- <!-- Is there a discount on at least one line? -->
- <t t-set="lines_to_report" t-value="doc._get_order_lines_to_report().filtered(lambda l: l.product_template_id.id == 30)"/>
- <t t-set="display_discount" t-value="any(l.discount for l in lines_to_report)"/>
- <div class="oe_structure"/>
- <!--<div style="display: block; page-break-inside: avoid; overflow: hidden;">-->
- <!--<div style="display:block; page-break-before: auto;">-->
- <!-- <h4 style="margin-top:45px">HONORARIOS</h4>-->
- <!-- <hr class="mt-0 mb-1"/>-->
- <!-- <table class="o_has_total_table table o_main_table table-borderless">-->
- <!-- <thead style="display: table-row-group">-->
- <!-- <tr>-->
- <!-- <th name="th_description" class="text-start">Description</th>-->
- <!-- <th name="th_quantity" class="text-end text-nowrap">Quantity</th>-->
- <!-- <th name="th_priceunit" class="text-end text-nowrap">Unit Price</th>-->
- <!-- <th name="th_discount" t-if="display_discount" class="text-end"><span>Disc.%</span></th>-->
- <!-- <th name="th_taxes" class="text-end">Taxes</th>-->
- <!-- <th name="th_subtotal" class="text-end"><span>Amount</span></th>-->
- <!-- </tr>-->
- <!-- </thead>-->
- <!-- <tbody class="sale_tbody">-->
- <!-- <t t-set="current_subtotal" t-value="0"/>-->
- <!-- <t t-foreach="lines_to_report" t-as="line">-->
- <!-- <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>-->
- <!-- <tr t-att-class="'fw-bold o_line_section' if (line.display_type == 'line_section' or line.product_type == 'combo') else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">-->
- <!-- <t t-if="not line.display_type and line.product_type != 'combo'">-->
- <!-- <td name="td_name">-->
- <!-- <span t-esc="line.name.split('\n', 1)[-1]"/>-->
- <!-- </td>-->
- <!-- <td name="td_quantity" class="text-end text-nowrap">-->
- <!-- <span t-field="line.product_uom_qty"/>-->
- <!-- <span t-field="line.product_uom"/>-->
- <!-- <span t-if="line.product_packaging_id">-->
- <!-- (<span t-field="line.product_packaging_qty" t-options="{'widget':'integer'}"/>-->
- <!-- <span t-field="line.product_packaging_id"/>)-->
- <!-- </span>-->
- <!-- </td>-->
- <!-- <td name="td_priceunit" class="text-end text-nowrap">-->
- <!-- <span t-field="line.price_unit"/>-->
- <!-- </td>-->
- <!-- <td t-if="display_discount" class="text-end">-->
- <!-- <span t-field="line.discount"/>-->
- <!-- </td>-->
- <!-- <t t-set="taxes" t-value="', '.join([(tax.invoice_label or tax.name) for tax in line.tax_id])"/>-->
- <!-- <td name="td_taxes" t-attf-class="text-end {{ 'text-nowrap' if len(taxes) < 10 else '' }}">-->
- <!-- <span t-out="taxes"/>-->
- <!-- </td>-->
- <!-- <td t-if="not line.is_downpayment" name="td_subtotal" class="text-end o_price_total">-->
- <!-- <span t-field="line.price_subtotal"/>-->
- <!-- </td>-->
- <!-- </t>-->
- <!-- <t t-elif="line.display_type == 'line_section' or line.product_type == 'combo'">-->
- <!-- <td name="td_section_line" colspan="99">-->
- <!-- <span t-field="line.name"/>-->
- <!-- </td>-->
- <!-- <t t-set="current_section" t-value="line"/>-->
- <!-- <t t-set="current_subtotal" t-value="0"/>-->
- <!-- </t>-->
- <!-- <t t-elif="line.display_type == 'line_note'">-->
- <!-- <td name="td_note_line" colspan="99">-->
- <!-- <span t-field="line.name"/>-->
- <!-- </td>-->
- <!-- </t>-->
- <!-- </tr>-->
- <!-- <t t-if="current_section and ( line_last or lines_to_report[line_index+1].display_type == 'line_section' or lines_to_report[line_index+1].product_type == 'combo' or (line.combo_item_id and not lines_to_report[line_index+1].combo_item_id) ) and not line.is_downpayment">-->
- <!-- <t t-set="current_section" t-value="None"/>-->
- <!-- <tr class="is-subtotal text-end">-->
- <!-- <td name="td_section_subtotal" colspan="99">-->
- <!-- <strong class="mr16">Subtotal</strong>-->
- <!-- <span t-out="current_subtotal" t-options="{'widget':'monetary','display_currency': doc.currency_id}"/>-->
- <!-- </td>-->
- <!-- </tr>-->
- <!-- </t>-->
- <!-- </t>-->
- <!-- </tbody>-->
- <!-- </table>-->
- <!-- <div class="clearfix" name="so_total_summary">-->
- <!-- <div id="total" class="row mt-n3" name="total">-->
- <!-- <div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto">-->
- <!-- <table class="o_total_table table table-borderless">-->
- <!-- Tax totals -->
- <!-- <t t-call="sale.document_tax_totals_copy_1">-->
- <!-- <t t-set="tax_totals" t-value="doc.tax_totals"/>-->
- <!-- <t t-set="currency" t-value="doc.currency_id"/>-->
- <!-- </t>-->
- <!-- </table>-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- </div> -->
- <!--</div>-->
- <div style="page-break-inside: avoid; break-inside: avoid; display: block;">
- <h4 style="margin-top:45px;">HONORARIOS</h4>
- <hr class="mt-0 mb-1"/>
- <table class="o_has_total_table table o_main_table table-borderless" style="page-break-inside: avoid; break-inside: avoid;">
- <thead>
- <tr>
- <th name="th_description" class="text-start">Description</th>
- <th name="th_quantity" class="text-end text-nowrap">Quantity</th>
- <th name="th_priceunit" class="text-end text-nowrap">Unit Price</th>
- <th name="th_discount" t-if="display_discount" class="text-end">
- <span>Disc.%</span>
- </th>
- <th name="th_taxes" class="text-end">Taxes</th>
- <th name="th_subtotal" class="text-end">
- <span>Amount</span>
- </th>
- </tr>
- </thead>
- <tbody class="sale_tbody">
- <t t-set="current_subtotal" t-value="0"/>
- <t t-foreach="lines_to_report" t-as="line">
- <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>
- <tr t-att-class="'fw-bold o_line_section' if (line.display_type == 'line_section' or line.product_type == 'combo') else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">
- <t t-if="not line.display_type and line.product_type != 'combo'">
- <td name="td_name">
- <span t-esc="line.name.split('\n', 1)[-1]"/>
- </td>
- <td name="td_quantity" class="text-end text-nowrap">
- <span t-field="line.product_uom_qty"/>
- <span t-field="line.product_uom"/>
- <span t-if="line.product_packaging_id">
- (<span t-field="line.product_packaging_qty" t-options="{'widget':'integer'}"/>
- <span t-field="line.product_packaging_id"/>)
- </span>
- </td>
- <td name="td_priceunit" class="text-end text-nowrap">
- <span t-field="line.price_unit"/>
- </td>
- <td t-if="display_discount" class="text-end">
- <span t-field="line.discount"/>
- </td>
- <t t-set="taxes" t-value="', '.join([(tax.invoice_label or tax.name) for tax in line.tax_id])"/>
- <td name="td_taxes" t-attf-class="text-end {{ 'text-nowrap' if len(taxes) < 10 else '' }}">
- <span t-out="taxes"/>
- </td>
- <td t-if="not line.is_downpayment" name="td_subtotal" class="text-end o_price_total">
- <span t-field="line.price_subtotal"/>
- </td>
- </t>
- <t t-elif="line.display_type == 'line_section' or line.product_type == 'combo'">
- <td name="td_section_line" colspan="99">
- <span t-field="line.name"/>
- </td>
- <t t-set="current_section" t-value="line"/>
- <t t-set="current_subtotal" t-value="0"/>
- </t>
- <t t-elif="line.display_type == 'line_note'">
- <td name="td_note_line" colspan="99">
- <span t-field="line.name"/>
- </td>
- </t>
- </tr>
- <t t-if="current_section and ( line_last or lines_to_report[line_index+1].display_type == 'line_section' or lines_to_report[line_index+1].product_type == 'combo' or (line.combo_item_id and not lines_to_report[line_index+1].combo_item_id) ) and not line.is_downpayment">
- <t t-set="current_section" t-value="None"/>
- <tr class="is-subtotal text-end">
- <td name="td_section_subtotal" colspan="99">
- <strong class="mr16">Subtotal</strong>
- <span t-out="current_subtotal" t-options="{'widget':'monetary','display_currency': doc.currency_id}"/>
- </td>
- </tr>
- </t>
- </t>
- </tbody>
- </table>
- <div class="clearfix" name="so_total_summary" style="page-break-inside: avoid; break-inside: avoid;">
- <div id="total" class="row mt-n3" name="total" style="page-break-inside: avoid; break-inside: avoid;">
- <div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto">
- <table class="o_total_table table table-borderless" style="page-break-inside: avoid; break-inside: avoid;">
- <t t-call="sale.document_tax_totals_copy_1">
- <t t-set="tax_totals" t-value="doc.tax_totals"/>
- <t t-set="currency" t-value="doc.currency_id"/>
- </t>
- </table>
- </div>
- </div>
- </div>
- </div>
- <div class="oe_structure"/>
- <!-- ====== FORMA DE PAGO ====== -->
- <t t-if="doc.x_studio_informacion_pago_bool">
- <!--<t t-if="doc.x_studio_texto_forma_de_pago">-->
- <section class="mt-4">
- <h4>FORMA DE PAGO</h4>
- <hr class="mt-0 mb-1"/>
- <div><t t-raw="doc.x_studio_texto_forma_de_pago"/></div>
- </section>
- </t>
- <!-- ====== PLAZO DE ENTREGA ====== -->
- <t t-if="doc.x_studio_plazo_entrega_bool">
- <!--<t t-if="doc.x_studio_texto_plazo">-->
- <section class="mt-4">
- <h4>PLAZO DE ENTREGA</h4>
- <hr class="mt-0 mb-1"/>
- <div><t t-raw="doc.x_studio_texto_plazo"/></div>
- </section>
- </t>
- <div t-if="not doc.signature" class="oe_structure"/>
- <div t-else="" class="mt-4 ml64 mr4" name="signature">
- <div class="offset-8">
- <strong>Signature</strong>
- </div>
- <div class="offset-8">
- <img t-att-src="image_data_uri(doc.signature)" style="max-height: 4cm; max-width: 8cm;"/>
- </div>
- <div class="offset-8 text-center">
- <span t-field="doc.signed_by">Oscar Morgan</span>
- </div>
- </div>
- <div t-if="not (doc.sale_order_option_ids and doc.state in ['draft', 'sent'])" class="oe_structure"></div>
- <div t-else="">
- <t t-set="has_option_discount" t-value="any(option.discount != 0.0 for option in doc.sale_order_option_ids)"/>
- <h4 name="h_optional_products">
- <span>Options</span>
- </h4>
- <table name="table_optional_products" class="table table-sm">
- <thead class="fw-bold">
- <tr>
- <td name="th_option_name" class="text-start">Description</td>
- <td t-if="has_option_discount" name="th_option_discount" class="text-start">Disc.%</td>
- <td name="th_option_price_unit" class="text-end">Unit Price</td>
- </tr>
- </thead>
- <tbody class="sale_tbody">
- <tr t-foreach="doc.sale_order_option_ids" t-as="option">
- <td name="td_option_name">
- <span t-field="option.name">Extra Chips</span>
- </td>
- <td t-if="has_option_discount" name="td_option_discount">
- <strong t-if="option.discount != 0.0" class="text-info">
- <t t-out="((option.discount % 1) and '%s' or '%d') % option.discount">-</t>%
- </strong>
- </td>
- <td name="td_option_price_unit">
- <strong class="text-end">
- <div t-field="option.price_unit" t-options="{"widget": "monetary", "display_currency": doc.currency_id}" t-att-style="option.discount and 'text-decoration: line-through' or None" t-att-class="option.discount and 'text-danger' or None">1.5</div>
- <div t-if="option.discount">
- <t t-out="((1-option.discount / 100.0) * option.price_unit)" t-options="{"widget": "monetary", "display_currency": doc.currency_id}"> </t>
- </div>
- </strong>
- </td>
- </tr>
- </tbody>
- </table>
- <div class="oe_structure"></div>
- </div>
- <div style="page-break-after: auto;"/>
- <div>
- <h4>CONDICIONES GENERALES</h4>
- <hr class="mt-0 mb-1"/>
- <span t-field="doc.note" t-attf-style="#{'text-align:justify;text-justify:inter-word;' if doc.company_id.terms_type != 'html' else ''}" name="order_note"/>
- <p t-if="not is_html_empty(doc.payment_term_id.note)">
- <span t-field="doc.payment_term_id.note">The payment should also be transmitted with love</span>
- </p>
- <div class="oe_structure"/>
- <p t-if="doc.fiscal_position_id and not is_html_empty(doc.fiscal_position_id.sudo().note)" id="fiscal_position_remark">
- <strong>Fiscal Position Remark:</strong>
- <span t-field="doc.fiscal_position_id.sudo().note">No further requirements for this payment</span>
- </p>
- </div>
- <div class="oe_structure"/>
- </div>
- </t>
- </xpath>
- </data>
Add Comment
Please, Sign In to add comment