forked from Mapan/odoo17e
477 lines
27 KiB
XML
477 lines
27 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<template id="tim_section">
|
|
<t t-set="part_of_invoice" t-value="part_of_invoice or False"/>
|
|
<TIM t-if="tax_details_group" t-foreach="tax_details_group.values()" t-as="group_detail">
|
|
<TIM_1 t-out="'true' if group_detail['TIM_1'] else 'false'"/>
|
|
<TIM_2 t-out="'%.2f' % group_detail['TIM_2']"/>
|
|
<TIM_3 t-out="group_detail['TIM_3']"/>
|
|
<t t-if="not part_of_invoice">
|
|
<TIM_4 t-out="'%.3f' % group_detail['TIM_4']"/>
|
|
<TIM_5 t-out="group_detail['TIM_5']"/>
|
|
</t>
|
|
<IMP t-foreach="group_detail['IMPS']" t-as="IMP">
|
|
<IMP_1 t-out="IMP['IMP_1']"/>
|
|
<IMP_2 t-out="'%.2f' % IMP['IMP_2']"/>
|
|
<IMP_3 t-out="IMP['IMP_3']"/>
|
|
<IMP_4 t-out="'%.2f' % IMP['IMP_4']"/>
|
|
<IMP_5 t-out="IMP['IMP_5']"/>
|
|
<IMP_6 t-out="_l10n_co_edi_get_round_amount(IMP['IMP_6'])"/>
|
|
<IMP_7 t-out="IMP['IMP_7']"/>
|
|
<IMP_8 t-out="IMP['IMP_8']"/>
|
|
<IMP_9 t-out="IMP['IMP_9']"/>
|
|
<IMP_10 t-out="IMP['IMP_10']"/>
|
|
<IMP_11 t-out="IMP['IMP_11']"/>
|
|
</IMP>
|
|
|
|
</TIM>
|
|
</template>
|
|
<template id="tii_section">
|
|
<t t-set="part_of_invoice" t-value="part_of_invoice or False"/>
|
|
<t t-set="in_company_currency" t-value="in_company_currency or False"/>
|
|
<t t-set="currency" t-value="invoice.company_currency_id if in_company_currency else invoice.currency_id"/>
|
|
<t t-set="tax_amount_field" t-value="'tax_amount' if in_company_currency else 'tax_amount_currency'"/>
|
|
<t t-set="base_amount_field" t-value="'base_amount' if in_company_currency else 'base_amount_currency'"/>
|
|
<t t-foreach="tax_details['tax_details_per_record'][line]['tax_details']" t-as="group">
|
|
<t t-set="tax" t-value="tax_details['tax_details_per_record'][line]['tax_details'][group]" />
|
|
<TII t-foreach="tax['group_tax_details']" t-as="group_tax_details">
|
|
<t t-set="IIM_2" t-value="abs(group_tax_details[tax_amount_field])"/>
|
|
<!--
|
|
HACK: This is a workaround for calculating the base amount for VAT Withholding taxes.
|
|
Due to the limitations of the current system, we have no way of properly finding the amount on which the withholding was applied.
|
|
So we've resorted to hardcoding the calculation based on the specific VAT withholding rates applicable in Colombia:
|
|
* 19% VAT with a 15% withholding (i.e. 2.85% withholding on the base amount)
|
|
* 5% VAT with a 15% withholding (i.e. 0.75% withholding on the base amount).
|
|
-->
|
|
<t t-set="IIM_4" t-if="tax['l10n_co_edi_type'].code == '05'" t-value="abs(group_tax_details[base_amount_field] * 0.19) if tax['tax'].amount == -2.85 else abs(group_tax_details[base_amount_field] * 0.05)"/>
|
|
<t t-set="IIM_4" t-elif="tax['l10n_co_edi_type'].code == '34'" t-value="sum(line.product_id.volume * line.quantity for line in tax['records'])"/>
|
|
<t t-set="IIM_4" t-else="" t-value="abs(group_tax_details[base_amount_field])"/>
|
|
<t t-set="IIM_6" t-value="'15' if tax['l10n_co_edi_type'].code == '05' else tax['tax'].amount"/>
|
|
<t t-set="IIM_9" t-value="tax['tax'].amount if (tax['l10n_co_edi_type'].code != '34' or not IIM_2) else IIM_2 * 100 / IIM_4"/>
|
|
<TII_1 t-out="format_monetary(IIM_2, currency)"/>
|
|
<TII_2 t-out="currency.name"/>
|
|
<TII_3 t-out="'true' if tax['l10n_co_edi_type'].retention else 'false'"/>
|
|
<t t-if="not part_of_invoice">
|
|
<TII_4 t-if="tax['tax'].amount_type != 'fixed'" t-out="'%.3f'% ((float(IIM_6) / 100 * float(IIM_4)) - IIM_2)"/>
|
|
<TII_5 t-out="currency.name"/>
|
|
</t>
|
|
<IIM>
|
|
<IIM_1 t-out="tax['l10n_co_edi_type'].code"/>
|
|
<IIM_2 t-out="format_monetary(IIM_2, currency)"/>
|
|
<IIM_3 t-out="currency.name"/>
|
|
<IIM_4 t-out="format_monetary(IIM_4, currency)"/>
|
|
<IIM_5 t-out="currency.name"/>
|
|
<t t-if="tax['tax'].amount_type == 'fixed'">
|
|
<IIM_7 t-out="IIM_4 if tax['l10n_co_edi_type'].code == '34' else '1'"/>
|
|
<IIM_8 t-if="tax['l10n_co_edi_type'].code == '22'" t-out="'BO'"/>
|
|
<IIM_8 t-elif="tax['l10n_co_edi_type'].code == '34'" t-out="'MLT'"/>
|
|
<IIM_8 t-else="" t-out="'94'"/>
|
|
<IIM_9 t-out="'%.2f' % IIM_9"/>
|
|
<IIM_10 t-out="currency.name"/>
|
|
</t>
|
|
<t t-else="">
|
|
<IIM_6 t-out="abs(float(IIM_6))"/>
|
|
<IIM_7/>
|
|
<IIM_8/>
|
|
<IIM_9/>
|
|
<IIM_10/>
|
|
</t>
|
|
<IIM_11 t-out="tax['l10n_co_edi_type'].name"/>
|
|
</IIM>
|
|
</TII>
|
|
</t>
|
|
</template>
|
|
<template id="electronic_invoice_body">
|
|
<ENC>
|
|
<ENC_1 t-out="invoice._l10n_co_edi_get_electronic_invoice_type()"/>
|
|
<ENC_2 t-out="company_partner._get_vat_without_verification_code()"/>
|
|
<ENC_3 t-out="invoice_partner._get_vat_without_verification_code()"/>
|
|
<ENC_4>UBL 2.1</ENC_4>
|
|
<ENC_5 t-out="invoice._l10n_co_edi_get_electronic_invoice_type_info()"/>
|
|
<ENC_6 t-out="invoice.name"/>
|
|
<ENC_7 t-out="invoice.invoice_date"/>
|
|
<ENC_8 t-out="validation_time"/>
|
|
<ENC_9 t-out="edi_type"/>
|
|
<ENC_10 t-out="invoice.company_currency_id.name"/>
|
|
<ENC_11 t-if="invoice.l10n_co_edi_operation_type in ['22', '32']"
|
|
t-out="'%sT%s' % (invoice.invoice_date, validation_time)"/>
|
|
<ENC_12 t-if="invoice.l10n_co_edi_operation_type in ['22', '32']"
|
|
t-out="'%sT%s' % (invoice.invoice_date, validation_time)"/>
|
|
<ENC_15 t-out="len(invoice.invoice_line_ids.filtered(lambda line: line.display_type == 'product'))"/>
|
|
<ENC_16 t-out="invoice.invoice_date_due"/>
|
|
<ENC_17 t-out="invoice.l10n_co_edi_attachment_url"/>
|
|
<ENC_20 t-out="'2' if invoice.company_id.l10n_co_edi_test_mode else '1'"/>
|
|
<ENC_21 t-out="invoice.l10n_co_edi_operation_type"/>
|
|
</ENC>
|
|
|
|
<EMI>
|
|
<EMI_1 t-out="company_partner._l10n_co_edi_get_partner_type()"/>
|
|
<EMI_2 t-out="company_partner._get_vat_without_verification_code()"/>
|
|
<EMI_3 t-out="company_partner._l10n_co_edi_get_carvajal_code_for_identification_type()"/>
|
|
<EMI_4 t-out="company_partner._l10n_co_edi_get_fiscal_regimen_code()"/>
|
|
<EMI_6 t-out="company_partner.display_name"/>
|
|
<EMI_7 t-out="company_partner.l10n_co_edi_commercial_name or company_partner.name"/>
|
|
<EMI_8/>
|
|
<EMI_9/>
|
|
<EMI_10 t-out="company_partner._l10n_co_edi_get_company_address()"/>
|
|
<EMI_11 t-out="str(company_partner.state_id.l10n_co_edi_code).zfill(2)"/>
|
|
<EMI_12/>
|
|
<EMI_13 t-out="company_partner.city_id.name"/>
|
|
<EMI_14 t-out="company_partner.zip"/>
|
|
<EMI_15 t-out="company_partner.country_id.code"/>
|
|
<EMI_18/>
|
|
<EMI_19 t-out="company_partner.state_id.name"/>
|
|
<EMI_21 t-out="company_partner.country_id.name"/>
|
|
<EMI_22 t-out="company_partner._get_vat_verification_code()"/>
|
|
<EMI_23 t-out="str(company_partner.city_id.l10n_co_edi_code).zfill(5)"/>
|
|
<EMI_24 t-out="company_partner.l10n_co_edi_commercial_name or company_partner.name"/>
|
|
|
|
<TAC>
|
|
<TAC_1><t t-out="';'.join(company_partner.l10n_co_edi_obligation_type_ids.mapped('name'))"/></TAC_1>
|
|
</TAC>
|
|
|
|
<ICC>
|
|
<ICC_1/>
|
|
<ICC_9 t-out="invoice.sequence_prefix"/>
|
|
</ICC>
|
|
|
|
<DFE>
|
|
<DFE_1 t-out="str(company_partner.city_id.l10n_co_edi_code).zfill(5)"/>
|
|
<DFE_2 t-out="str(company_partner.state_id.l10n_co_edi_code).zfill(2)"/>
|
|
<DFE_3 t-out="company_partner.country_id.code"/>
|
|
<DFE_4 t-out="company_partner.zip"/>
|
|
<DFE_5 t-out="company_partner.country_id.name"/>
|
|
<DFE_6 t-out="company_partner.state_id.name"/>
|
|
<DFE_7 t-out="company_partner.city_id.name"/>
|
|
<DFE_8/>
|
|
</DFE>
|
|
|
|
<GTE>
|
|
<GTE_1 t-out="company_partner._l10n_co_edi_get_fiscal_regimen_code()"/>
|
|
<GTE_2 t-out="company_partner._l10n_co_edi_get_fiscal_regimen_name()"/>
|
|
</GTE>
|
|
|
|
<CDE>
|
|
<CDE_1 t-out="'2' if sales_partner.type == 'delivery' else '1'"/>
|
|
<CDE_2 t-out="sales_partner.function[:30] if sales_partner.function else 'Representante de Ventas'"/>
|
|
<CDE_3 t-out="format_domestic_phone_number(company_partner.phone)"/>
|
|
<CDE_4 t-out="company_partner.email"/>
|
|
</CDE>
|
|
</EMI>
|
|
<ADQ>
|
|
<ADQ_1 t-out="invoice_partner._l10n_co_edi_get_partner_type()"/>
|
|
<ADQ_2 t-out="invoice_partner._get_vat_without_verification_code()"/>
|
|
<ADQ_3 t-out="invoice_partner._l10n_co_edi_get_carvajal_code_for_identification_type()"/>
|
|
<ADQ_4 t-out="'No Aplica' if invoice_partner.vat != '222222222222' else invoice_partner.l10n_co_edi_fiscal_regimen"/>
|
|
<ADQ_5 t-out="invoice_partner.ref"/>
|
|
<ADQ_6 t-out="invoice_partner.display_name"/>
|
|
<ADQ_7 t-out="invoice_partner.l10n_co_edi_commercial_name or invoice_partner.name"/>
|
|
<ADQ_8 t-out="invoice_partner.display_name if invoice_partner._l10n_co_edi_get_partner_type() == '2' else ''"/>
|
|
<t t-if="invoice_partner.vat != '222222222222'">
|
|
<ADQ_10 t-out="invoice_partner._l10n_co_edi_get_company_address()"/>
|
|
<ADQ_11 t-out="str(invoice_partner.state_id.l10n_co_edi_code).zfill(2)"/>
|
|
<ADQ_12/>
|
|
<ADQ_13 t-out="invoice.partner_id.city"/>
|
|
<ADQ_14 t-out="invoice.partner_id.zip"/>
|
|
<ADQ_15 t-out="invoice.partner_id.country_id.code"/>
|
|
<ADQ_18/>
|
|
<ADQ_19 t-out="invoice.partner_id.state_id.name"/>
|
|
<ADQ_21 t-out="invoice.partner_id.country_id.name"/>
|
|
<ADQ_22 t-out="invoice_partner._get_vat_verification_code()"/>
|
|
<ADQ_23 t-out="str(invoice_partner.city_id.l10n_co_edi_code).zfill(5)"/>
|
|
</t>
|
|
<t t-else="">
|
|
<ADQ_10/>
|
|
<ADQ_11/>
|
|
<ADQ_12/>
|
|
<ADQ_13/>
|
|
<ADQ_14/>
|
|
<ADQ_15/>
|
|
<ADQ_18/>
|
|
<ADQ_19/>
|
|
<ADQ_21/>
|
|
<ADQ_22/>
|
|
<ADQ_23/>
|
|
</t>
|
|
<ADQ_24 t-out="invoice_partner._get_vat_without_verification_code()"/>
|
|
<ADQ_25 t-out="invoice_partner._l10n_co_edi_get_carvajal_code_for_identification_type()"/>
|
|
<ADQ_26 t-out="invoice_partner._get_vat_verification_code()"/>
|
|
|
|
<TCR>
|
|
<TCR_1 t-out="'R-99-PN' if invoice_partner.vat == '222222222222'
|
|
else ';'.join(invoice_partner.commercial_partner_id.l10n_co_edi_obligation_type_ids.mapped('name'))"/>
|
|
</TCR>
|
|
|
|
<ILA t-if="invoice_partner.vat != '222222222222'">
|
|
<ILA_1 t-out="invoice_partner.display_name"/>
|
|
<ILA_2 t-out="invoice_partner._get_vat_without_verification_code()"/>
|
|
<ILA_3 t-out="invoice_partner._l10n_co_edi_get_carvajal_code_for_identification_type()"/>
|
|
<ILA_4 t-out="invoice_partner._get_vat_verification_code()"/>
|
|
</ILA>
|
|
|
|
<ICR/>
|
|
|
|
<DFA t-if="invoice_partner.vat != '222222222222'">
|
|
<DFA_1 t-out="invoice_partner.country_id.code"/>
|
|
<DFA_2 t-out="str(invoice_partner.state_id.l10n_co_edi_code).zfill(2)"/>
|
|
<DFA_3 t-out="invoice_partner.zip"/>
|
|
<DFA_4 t-out="str(invoice_partner.city_id.l10n_co_edi_code).zfill(5)"/>
|
|
<DFA_5 t-out="invoice_partner.country_id and invoice_partner.country_id.name or 'Colombia'"/>
|
|
<DFA_6 t-out="invoice_partner.state_id.name"/>
|
|
<DFA_7 t-out="invoice_partner.city"/>
|
|
<DFA_8/>
|
|
</DFA>
|
|
|
|
<CDA>
|
|
<CDA_1 t-out="'2' if invoice_partner.type == 'delivery' else '1'"/>
|
|
<CDA_2 t-out="'%s/%s' % (invoice_partner.name, invoice_partner.function)"/>
|
|
<CDA_3 t-out="invoice_partner.phone"/>
|
|
<CDA_4 t-out="invoice_partner.email"/>
|
|
</CDA>
|
|
|
|
<GTA>
|
|
<t t-if="invoice_partner.vat == '222222222222'">
|
|
<GTA_1>ZZ</GTA_1>
|
|
<GTA_2>No Aplica</GTA_2>
|
|
</t>
|
|
<t t-else="">
|
|
<GTA_1 t-out="invoice_partner._l10n_co_edi_get_fiscal_regimen_code()"/>
|
|
<GTA_2 t-out="invoice_partner._l10n_co_edi_get_fiscal_regimen_name()"/>
|
|
</t>
|
|
</GTA>
|
|
</ADQ>
|
|
<TOT>
|
|
<TOT_1 t-out="format_monetary(-sign * invoice.amount_untaxed_signed, invoice.company_currency_id)"/>
|
|
<TOT_2 t-out="invoice.company_currency_id.name"/>
|
|
<TOT_3 t-out="format_monetary(-sign * invoice.amount_untaxed_signed, invoice.company_currency_id)"/>
|
|
<TOT_4 t-out="invoice.company_currency_id.name"/>
|
|
<TOT_5 t-out="withholding_amount_company"/>
|
|
<TOT_6 t-out="invoice.company_currency_id.name"/>
|
|
<TOT_7 t-out="withholding_amount_company"/>
|
|
<TOT_8 t-out="invoice.company_currency_id.name"/>
|
|
</TOT>
|
|
<t t-call="l10n_co_edi.tim_section">
|
|
<t t-set="retention" t-value="True"/>
|
|
<t t-set="part_of_invoice" t-value="True"/>
|
|
<t t-set="tax_details_group" t-value="retention_taxes_new_COP"/>
|
|
</t>
|
|
<t t-call="l10n_co_edi.tim_section">
|
|
<t t-set="retention" t-value="False"/>
|
|
<t t-set="part_of_invoice" t-value="True"/>
|
|
<t t-set="tax_details_group" t-value="regular_taxes_new_COP"/>
|
|
</t>
|
|
<TDC t-if="invoice.currency_id != invoice.company_currency_id">
|
|
<TDC_1 t-out="invoice.company_currency_id.name"/>
|
|
<TDC_2 t-out="invoice.currency_id.name"/>
|
|
<TDC_3 t-out="currency_rate"/>
|
|
<TDC_4 t-out="invoice.invoice_date"/>
|
|
<TDC_5 t-out="currency_rate"/>
|
|
<TDC_6>1.00</TDC_6>
|
|
</TDC>
|
|
<DRF>
|
|
<DRF_1 t-out="invoice.journal_id.l10n_co_edi_dian_authorization_number"/>
|
|
<DRF_2 t-out="invoice.journal_id.l10n_co_edi_dian_authorization_date"/>
|
|
<DRF_3 t-out="invoice.journal_id.l10n_co_edi_dian_authorization_end_date"/>
|
|
<DRF_4 t-out="invoice.sequence_prefix"/>
|
|
<DRF_5 t-out="invoice.journal_id.l10n_co_edi_min_range_number"/>
|
|
<DRF_6 t-out="invoice.journal_id.l10n_co_edi_max_range_number"/>
|
|
</DRF>
|
|
<ITD>
|
|
<ITD_5 t-out="format_monetary(-sign * invoice.amount_total_signed, invoice.company_currency_id)"/>
|
|
<ITD_6 t-out="invoice.company_currency_id.name"/>
|
|
</ITD>
|
|
|
|
<NOT t-foreach="notas" t-as="nota">
|
|
<NOT_1 t-out="nota"/>
|
|
</NOT>
|
|
|
|
<ORC>
|
|
<ORC_1 t-out="invoice.ref and invoice.ref[:35]"/>
|
|
<ORC_4 t-out="invoice.invoice_origin and invoice.invoice_origin[:35]"/>
|
|
</ORC>
|
|
|
|
<t t-set="origin_invoice" t-value="invoice.reversed_entry_id or invoice.debit_origin_id or False"/>
|
|
<REF t-if="origin_invoice">
|
|
<REF_1 t-out="'FTC' if edi_type == '03' else invoice_type_to_ref_1[origin_invoice.move_type]"/>
|
|
<REF_2 t-out="origin_invoice.name"/>
|
|
<REF_3 t-out="origin_invoice.date"/>
|
|
<REF_4 t-out="origin_invoice.l10n_co_edi_cufe_cude_ref"/>
|
|
<REF_5 t-out="'CUFE-SHA384' if origin_invoice.move_type == 'out_invoice' else 'CUDE-SHA384'"/>
|
|
</REF>
|
|
|
|
<IEN t-if="invoice_partner.vat != '222222222222'">
|
|
<IEN_1 t-out="shipping_partner.street if shipping_partner else ''"/>
|
|
<IEN_2 t-out="str(invoice.partner_shipping_id.state_id.l10n_co_edi_code or '').zfill(2)"/>
|
|
<IEN_3/>
|
|
<IEN_4 t-out="shipping_partner.city if shipping_partner else ''"/>
|
|
<IEN_5 t-out="shipping_partner.zip"/>
|
|
<IEN_6 t-out="shipping_partner.country_id.code if shipping_partner else ''"/>
|
|
<IEN_7 t-out="invoice_partner.name"/>
|
|
<IEN_8 t-out="delivery_date"/>
|
|
<IEN_12 t-out="str(invoice.partner_shipping_id.city_id.l10n_co_edi_code or '').zfill(5)"/>
|
|
<IEN_22 t-out="shipping_partner.state_id.name"/>
|
|
<IEN_23 t-out="shipping_partner.country_id.name"/>
|
|
<IEN_24 t-out="company_partner.lang.split('_')[0] if company_partner.lang and '_' in company_partner.lang else ''"/>
|
|
</IEN>
|
|
|
|
<TDE>
|
|
<TDE_1 t-out="company_partner.l10n_co_edi_commercial_name or company_partner.name"/>
|
|
<TDE_2 t-out="company_partner.country_id.code"/>
|
|
<TDE_3 t-out="str(company_partner.state_id.l10n_co_edi_code).zfill(2)"/>
|
|
<TDE_4 t-out="company_partner.zip"/>
|
|
<TDE_5 t-out="str(company_partner.city_id.l10n_co_edi_code).zfill(5)"/>
|
|
<TDE_6 t-out="company_partner.city_id.name"/>
|
|
<TDE_7 t-out="company_partner.state_id.name"/>
|
|
<TDE_8 t-out="company_partner.country_id.name"/>
|
|
<TDE_9 t-out="company_partner.lang.split('_')[0] if company_partner.lang and '_' in company_partner.lang else ''"/>
|
|
<TDE_10 t-out="company_partner._l10n_co_edi_get_company_address()"/>
|
|
<ITT>
|
|
<ITT_1 t-out="company_partner.display_name"/>
|
|
<ITT_2 t-out="';'.join(company_partner.l10n_co_edi_obligation_type_ids.mapped('name'))"/>
|
|
<ITT_3 t-out="company_partner._l10n_co_edi_get_fiscal_regimen_code()"/>
|
|
<ITT_4 t-out="company_partner._get_vat_without_verification_code()"/>
|
|
<ITT_5 t-out="company_partner._l10n_co_edi_get_carvajal_code_for_identification_type()"/>
|
|
<ITT_6 t-out="company_partner._get_vat_verification_code()"/>
|
|
</ITT>
|
|
<DFT>
|
|
<t t-if="tax_types">
|
|
<DFT_1 t-out="tax_types[0].code"/>
|
|
<DFT_2 t-out="tax_types[0].name"/>
|
|
</t>
|
|
<DFT_3 t-out="company_partner.country_id.code"/>
|
|
<DFT_4 t-out="str(company_partner.state_id.l10n_co_edi_code).zfill(2)"/>
|
|
<DFT_5 t-out="company_partner.zip"/>
|
|
<DFT_6 t-out="str(company_partner.city_id.l10n_co_edi_code).zfill(5)"/>
|
|
<DFT_7 t-out="company_partner.city_id.name"/>
|
|
<DFT_8 t-out="company_partner.state_id.name"/>
|
|
<DFT_9 t-out="company_partner.country_id.name"/>
|
|
<DFT_10 t-out="company_partner.lang.split('_')[0] if company_partner.lang and '_' in company_partner.lang else ''"/>
|
|
<DFT_11 t-out="company_partner._l10n_co_edi_get_company_address()"/>
|
|
</DFT>
|
|
</TDE>
|
|
|
|
<MEP>
|
|
<MEP_1 t-out="invoice.l10n_co_edi_payment_option_id.code"/>
|
|
<MEP_2 t-out="'1' if invoice.l10n_co_edi_is_direct_payment else '2'"/>
|
|
<MEP_3 t-out="invoice.invoice_date_due if not invoice.l10n_co_edi_is_direct_payment else ''"/>
|
|
</MEP>
|
|
|
|
<CTS>
|
|
<CTS_1 t-out="invoice.company_id._get_l10n_co_edi_template_code_description()"/>
|
|
</CTS>
|
|
|
|
<CDN>
|
|
<CDN_1 t-out="description_code"/>
|
|
<CDN_2 t-out="description"/>
|
|
</CDN>
|
|
|
|
<t t-set="ite_counter" t-value="1"/>
|
|
<ITE t-foreach="invoice_lines" t-as="line">
|
|
<t t-set="line_val" t-value="invoice_lines_values[line.id]"/>
|
|
|
|
<ITE_1 t-out="ite_counter"/>
|
|
<ITE_2/>
|
|
<ITE_3 t-out="line.quantity"/>
|
|
<ITE_4 t-out="line.product_uom_id.l10n_co_edi_ubl or '94'"/>
|
|
<ITE_5 t-out="format_monetary(line_val['price_subtotal'], invoice.company_currency_id)"/>
|
|
<ITE_6 t-out="invoice.company_currency_id.name"/>
|
|
<ITE_7 t-out="format_monetary(line_val['price_unit'], invoice.company_currency_id)"/>
|
|
<ITE_8 t-out="invoice.company_currency_id.name"/>
|
|
<ITE_10 t-out="line._l10n_co_edi_get_line_name()"/>
|
|
<ITE_11 t-out="line._l10n_co_edi_get_line_name()"/>
|
|
<ITE_18 t-out="line.product_id.default_code or line.product_id.product_tmpl_id.default_code"/>
|
|
<ITE_19 t-out="format_monetary(line_val['price_subtotal'], invoice.company_currency_id)"/>
|
|
<ITE_20 t-out="invoice.company_currency_id.name"/>
|
|
<ITE_21 t-out="format_monetary(line_val['price_subtotal'], invoice.company_currency_id)"/>
|
|
<ITE_22 t-out="invoice.company_currency_id.name"/>
|
|
<ITE_27 t-out="line.quantity"/>
|
|
<ITE_28 t-out="line.product_uom_id.l10n_co_edi_ubl or '94'"/>
|
|
|
|
<IRF>
|
|
<IRF_1 t-out="invoice_type_to_ref_1[invoice.move_type]"/>
|
|
<IRF_2 t-out="invoice.name"/>
|
|
<IRF_3 t-out="ite_counter"/>
|
|
</IRF>
|
|
|
|
<MYM>
|
|
<MYM_1 t-out="line.product_id.product_tmpl_id.l10n_co_edi_brand"/>
|
|
<MYM_2 t-out="line.product_id.display_name"/>
|
|
</MYM>
|
|
|
|
<IDE>
|
|
<IDE_1 t-out="'false' if float_compare(line_val['price_subtotal'], 0, precision_rounding=line.company_currency_id.rounding or invoice.company_currency_id.rounding) >= 0 else 'true'"/>
|
|
<IDE_2 t-out="format_monetary(round(invoice.company_currency_id.round(line_val['discount_amount']), 2), invoice.company_currency_id)"/>
|
|
<IDE_3 t-out="invoice.company_currency_id.name"/>
|
|
<IDE_6 t-out="line.discount"/>
|
|
<IDE_7 t-out="format_monetary(round(line_val['price_subtotal_before_discount'], 2), invoice.company_currency_id)"/>
|
|
<IDE_8 t-out="invoice.company_currency_id.name"/>
|
|
<IDE_10>1</IDE_10>
|
|
</IDE>
|
|
|
|
<t t-call="l10n_co_edi.tii_section">
|
|
<t t-set="part_of_invoice" t-value="True"/>
|
|
<t t-set="in_company_currency" t-value="True"/>
|
|
</t>
|
|
<IAE>
|
|
<t t-set="product_code" t-value="line._l10n_co_edi_get_product_code()"/>
|
|
<IAE_1 t-out="product_code[0]"/>
|
|
<IAE_2 t-out="product_code[1]"/>
|
|
<IAE_4 t-out="product_code[2]"/>
|
|
</IAE>
|
|
<NTI t-if="exempt_tax_dict.get(line.id)">
|
|
<NTI_1 t-out="'Bienes Cubiertos'"/>
|
|
</NTI>
|
|
<t t-set="ite_counter" t-value="ite_counter + 1"/>
|
|
</ITE>
|
|
|
|
<t t-if="invoice.currency_id != invoice.company_currency_id">
|
|
<EXT>
|
|
<EXT_1>Exportación</EXT_1>
|
|
</EXT>
|
|
|
|
<EGC>
|
|
<EGC_1>DATOS ADICIONALES</EGC_1>
|
|
</EGC>
|
|
|
|
<ECA>
|
|
<ECA_1>Observaciones</ECA_1>
|
|
<ECA_2>Ninguna</ECA_2>
|
|
</ECA>
|
|
|
|
<VMT>
|
|
<VMT_1 t-out="currency_rate"/>
|
|
<VMT_2 t-out="invoice.currency_id.name"/>
|
|
<VMT_3 t-out="format_monetary(invoice.amount_untaxed, invoice.currency_id)"/>
|
|
<VMT_4 t-out="0.00"/>
|
|
<VMT_5 t-out="0.00"/>
|
|
<VMT_6 t-out="format_monetary(invoice.amount_untaxed, invoice.currency_id)"/>
|
|
<t t-set="_get_group_detail_invoice_currency" t-value="lambda code: (retention_taxes_new if code in retention_taxes_new else regular_taxes_new).get(code, {})"/>
|
|
<VMT_7 t-out="format_monetary(_get_group_detail_invoice_currency('01').get('TIM_2', 0), invoice.currency_id)"/>
|
|
<VMT_8 t-out="format_monetary(_get_group_detail_invoice_currency('04').get('TIM_2', 0), invoice.currency_id)"/>
|
|
<VMT_9 t-out="''"/>
|
|
<VMT_10 t-out="''"/>
|
|
<VMT_11 t-out="''"/>
|
|
<VMT_12 t-out="withholding_amount"/>
|
|
<VMT_13 t-out="''"/>
|
|
<VMT_14 t-out="''"/>
|
|
<VMT_15 t-out="withholding_amount"/>
|
|
<VMT_16 t-out="format_monetary(_get_group_detail_invoice_currency('06').get('TIM_2', 0), invoice.currency_id)"/>
|
|
<VMT_17 t-out="format_monetary(_get_group_detail_invoice_currency('05').get('TIM_2', 0), invoice.currency_id)"/>
|
|
<VMT_18 t-out="format_monetary(_get_group_detail_invoice_currency('07').get('TIM_2', 0), invoice.currency_id)"/>
|
|
<VMT_19 t-out="0.00"/>
|
|
</VMT>
|
|
</t>
|
|
|
|
</template>
|
|
<template id="electronic_invoice_xml">
|
|
<NOTA t-if="'_refund' in invoice.move_type or ('_invoice' in invoice.move_type and invoice.l10n_co_edi_debit_note)">
|
|
<t t-call="l10n_co_edi.electronic_invoice_body"/>
|
|
</NOTA>
|
|
<FACTURA t-else="">
|
|
<t t-call="l10n_co_edi.electronic_invoice_body"/>
|
|
</FACTURA>
|
|
</template>
|
|
</data>
|
|
</odoo>
|