| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<template id="nav_online_invoice_xml_3_0"> |
| 4 |
<InvoiceData xmlns="http://schemas.nav.gov.hu/OSA/3.0/data" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.nav.gov.hu/OSA/3.0/data invoiceData.xsd" |
| 5 |
xmlns:common="http://schemas.nav.gov.hu/NTCA/1.0/common" xmlns:base="http://schemas.nav.gov.hu/OSA/3.0/base"> |
| 6 |
<invoiceNumber t-out="invoice.name"/> |
| 7 |
<invoiceIssueDate t-out="invoiceIssueDate"/> |
| 8 |
<completenessIndicator t-out="format_bool(completenessIndicator)"/> |
| 9 |
<invoiceMain> |
| 10 |
<invoice> |
| 11 |
<invoiceReference t-if="base_invoice"> |
| 12 |
<originalInvoiceNumber t-out="base_invoice.name"/> |
| 13 |
<modifyWithoutMaster t-out="format_bool(modifyWithoutMaster)"/> |
| 14 |
<modificationIndex t-out="invoice.l10n_hu_invoice_chain_index"/> |
| 15 |
</invoiceReference> |
| 16 |
<invoiceHead> |
| 17 |
<supplierInfo> |
| 18 |
<supplierTaxNumber> |
| 19 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_tax_number"> |
| 20 |
<t t-set="vat" t-value="supplier_vat_data['tax_number']"/> |
| 21 |
</t> |
| 22 |
</supplierTaxNumber> |
| 23 |
<groupMemberTaxNumber t-if="supplier_vat_data.get('group_member_tax_number')"> |
| 24 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_tax_number"> |
| 25 |
<t t-set="vat" t-value="supplier_vat_data.get('group_member_tax_number')"/> |
| 26 |
</t> |
| 27 |
</groupMemberTaxNumber> |
| 28 |
<supplierName t-out="supplier.name"/> |
| 29 |
<supplierAddress> |
| 30 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_simple_address"> |
| 31 |
<t t-set="partner" t-value="supplier"/> |
| 32 |
</t> |
| 33 |
</supplierAddress> |
| 34 |
<supplierBankAccountNumber t-out="supplierBankAccountNumber"/> |
| 35 |
<individualExemption t-out="format_bool(individualExemption)"/> |
| 36 |
</supplierInfo> |
| 37 |
<customerInfo> |
| 38 |
<customerVatStatus t-out="customerVatStatus"/> |
| 39 |
<customerVatData t-if="customer.is_company"> |
| 40 |
<customerTaxNumber t-if="customer_vat_data.get('tax_number')"> |
| 41 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_tax_number"> |
| 42 |
<t t-set="vat" t-value="customer_vat_data.get('tax_number')"/> |
| 43 |
</t> |
| 44 |
<groupMemberTaxNumber t-if="customer_vat_data.get('group_member_tax_number')"> |
| 45 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_tax_number"> |
| 46 |
<t t-set="vat" t-value="customer_vat_data.get('group_member_tax_number')"/> |
| 47 |
</t> |
| 48 |
</groupMemberTaxNumber> |
| 49 |
</customerTaxNumber> |
| 50 |
<communityVatNumber t-out="customer_vat_data.get('community_vat_number')"/> |
| 51 |
<thirdStateTaxId t-out="customer_vat_data.get('third_state_tax_id')"/> |
| 52 |
</customerVatData> |
| 53 |
<customerName t-if="customer.is_company" t-out="customer.name"/> |
| 54 |
<customerAddress t-if="customer.is_company"> |
| 55 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_simple_address"> |
| 56 |
<t t-set="partner" t-value="customer"/> |
| 57 |
</t> |
| 58 |
</customerAddress> |
| 59 |
<customerBankAccountNumber t-out="customerBankAccountNumber"/> |
| 60 |
</customerInfo> |
| 61 |
<invoiceDetail> |
| 62 |
<invoiceCategory t-translation="off">NORMAL</invoiceCategory> |
| 63 |
<invoiceDeliveryDate t-out="invoice.delivery_date or invoice.invoice_date"/> |
| 64 |
<smallBusinessIndicator t-out="format_bool(smallBusinessIndicator)"/> |
| 65 |
<currencyCode t-out="invoice.currency_id.name"/> |
| 66 |
<exchangeRate t-out="float_repr(exchangeRate, 6)"/> |
| 67 |
<paymentMethod t-if="invoice.l10n_hu_payment_mode" t-out="invoice.l10n_hu_payment_mode"/> |
| 68 |
<paymentDate t-if="invoice.invoice_date_due" t-out="invoice.invoice_date_due"/> |
| 69 |
<cashAccountingIndicator t-out="format_bool(cashAccountingIndicator)"/> |
| 70 |
<invoiceAppearance t-translation="off">PAPER</invoiceAppearance> |
| 71 |
</invoiceDetail> |
| 72 |
</invoiceHead> |
| 73 |
<invoiceLines> |
| 74 |
<mergedItemIndicator t-out="format_bool(mergedItemIndicator)"/> |
| 75 |
<line t-foreach="lines_values" t-as="line_values"> |
| 76 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_line"/> |
| 77 |
</line> |
| 78 |
</invoiceLines> |
| 79 |
<invoiceSummary> |
| 80 |
<summaryNormal> |
| 81 |
<summaryByVatRate t-foreach="tax_summary" t-as="tax_vals"> |
| 82 |
<vatRate> |
| 83 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_vat_rate"> |
| 84 |
<t t-set="tax" t-value="tax_vals['vat_tax']"/> |
| 85 |
<t t-set="vatPercentage" t-value="tax_vals['vatPercentage']"/> |
| 86 |
</t> |
| 87 |
</vatRate> |
| 88 |
<vatRateNetData> |
| 89 |
<vatRateNetAmount t-out="float_repr(tax_vals['vatRateNetAmount'], 2)"/> |
| 90 |
<vatRateNetAmountHUF t-out="float_repr(tax_vals['vatRateNetAmountHUF'], 2)"/> |
| 91 |
</vatRateNetData> |
| 92 |
<vatRateVatData> |
| 93 |
<vatRateVatAmount t-out="float_repr(tax_vals['vatRateVatAmount'], 2)"/> |
| 94 |
<vatRateVatAmountHUF t-out="float_repr(tax_vals['vatRateVatAmountHUF'], 2)"/> |
| 95 |
</vatRateVatData> |
| 96 |
</summaryByVatRate> |
| 97 |
<invoiceNetAmount t-out="float_repr(invoiceNetAmount, 2)"/> |
| 98 |
<invoiceNetAmountHUF t-out="float_repr(invoiceNetAmountHUF, 2)"/> |
| 99 |
<invoiceVatAmount t-out="float_repr(invoiceVatAmount, 2)"/> |
| 100 |
<invoiceVatAmountHUF t-out="float_repr(invoiceVatAmountHUF, 2)"/> |
| 101 |
</summaryNormal> |
| 102 |
<summaryGrossData> |
| 103 |
<invoiceGrossAmount t-out="float_repr(invoiceGrossAmount, 2)"/> |
| 104 |
<invoiceGrossAmountHUF t-out="float_repr(invoiceGrossAmountHUF, 2)"/> |
| 105 |
</summaryGrossData> |
| 106 |
</invoiceSummary> |
| 107 |
</invoice> |
| 108 |
</invoiceMain> |
| 109 |
</InvoiceData> |
| 110 |
</template> |
| 111 |
|
| 112 |
<template id="nav_online_invoice_xml_3_0_simple_address" xmlns:base="http://schemas.nav.gov.hu/OSA/3.0/base"> |
| 113 |
<base:simpleAddress> |
| 114 |
<base:countryCode t-out="partner.country_code"/> |
| 115 |
<base:postalCode t-out="partner.zip"/> |
| 116 |
<base:city t-out="partner.city"/> |
| 117 |
<base:additionalAddressDetail t-out="partner.street"/> |
| 118 |
</base:simpleAddress> |
| 119 |
</template> |
| 120 |
|
| 121 |
<template id="nav_online_invoice_xml_3_0_tax_number" xmlns:base="http://schemas.nav.gov.hu/OSA/3.0/base"> |
| 122 |
<t t-if="vat"> |
| 123 |
<t t-if="'-' in vat"> |
| 124 |
<base:taxpayerId t-out="vat[:8]"/> |
| 125 |
<base:vatCode t-out="vat[9:10]"/> |
| 126 |
<base:countyCode t-out="vat[11:13]"/> |
| 127 |
</t> |
| 128 |
<t t-else="else"> |
| 129 |
<base:taxpayerId t-out="vat[:8]"/> |
| 130 |
<base:vatCode t-out="vat[8:9]"/> |
| 131 |
<base:countyCode t-out="vat[9:11]"/> |
| 132 |
</t> |
| 133 |
</t> |
| 134 |
</template> |
| 135 |
|
| 136 |
<template id="nav_online_invoice_xml_3_0_vat_rate"> |
| 137 |
<vatPercentage t-if="tax.l10n_hu_tax_type == 'VAT'" t-out="float_repr(vatPercentage, 4)"/> |
| 138 |
<vatExemption t-if="tax.l10n_hu_tax_type in ['AAM','TAM','KBAET','KBAUK','EAM','NAM']"> |
| 139 |
<case t-out="tax.l10n_hu_tax_type"/> |
| 140 |
<reason t-out="tax.l10n_hu_tax_reason"/> |
| 141 |
</vatExemption> |
| 142 |
<vatOutOfScope t-if="tax.l10n_hu_tax_type in ['ATK','EUFAD37','EUFADE','EUE','HO']"> |
| 143 |
<case t-out="tax.l10n_hu_tax_type"/> |
| 144 |
<reason t-out="tax.l10n_hu_tax_reason"/> |
| 145 |
</vatOutOfScope> |
| 146 |
<vatDomesticReverseCharge t-if="tax.l10n_hu_tax_type == 'DOMESTIC_REVERSE'" t-translation="off">true</vatDomesticReverseCharge> |
| 147 |
<marginSchemeIndicator t-if="tax.l10n_hu_tax_type in ['TRAVEL_AGENCY', 'SECOND_HAND', 'ARTWORK', 'ANTIQUES']" t-out="tax.l10n_hu_tax_type"/> |
| 148 |
<vatAmountMismatch t-if="tax.l10n_hu_tax_type in ['REFUNDABLE_VAT', 'NONREFUNDABLE_VAT']"> |
| 149 |
<vatRate> |
| 150 |
<vatPercentage t-out="float_repr(vatPercentage, 4)"/> |
| 151 |
</vatRate> |
| 152 |
</vatAmountMismatch> |
| 153 |
<noVatCharge t-if="tax.l10n_hu_tax_type == 'NO_VAT'" t-translation="off">true</noVatCharge> |
| 154 |
</template> |
| 155 |
|
| 156 |
<template id="nav_online_invoice_xml_3_0_line"> |
| 157 |
<t t-set="line" t-value="line_values['line']"/> |
| 158 |
<lineNumber t-out="line_values['lineNumber']"/> |
| 159 |
<lineModificationReference t-if="line_values['lineNumberReference']"> |
| 160 |
<lineNumberReference t-out="line_values['lineNumberReference']"/> |
| 161 |
<lineOperation t-translation="off">CREATE</lineOperation> |
| 162 |
</lineModificationReference> |
| 163 |
<advanceData t-if="line_values.get('advanceIndicator')"> |
| 164 |
<advanceIndicator t-translation="off">true</advanceIndicator> |
| 165 |
<advancePaymentData t-if="line_values.get('advanceOriginalInvoice')"> |
| 166 |
<advanceOriginalInvoice t-out="line_values.get('advanceOriginalInvoice')"/> |
| 167 |
<advancePaymentDate t-out="line_values.get('advancePaymentDate')"/> |
| 168 |
<advanceExchangeRate t-out="float_repr(line_values.get('advanceExchangeRate'), 6)"/> |
| 169 |
</advancePaymentData> |
| 170 |
</advanceData> |
| 171 |
<productCodes t-if="line.product_id.l10n_hu_product_code_type or line.product_id.default_code"> |
| 172 |
<productCode t-if="line.product_id.l10n_hu_product_code_type"> |
| 173 |
<productCodeCategory t-out="line.product_id.l10n_hu_product_code_type"/> |
| 174 |
<productCodeValue t-out="line.product_id.l10n_hu_product_code"/> |
| 175 |
</productCode> |
| 176 |
<productCode t-if="line.product_id.default_code"> |
| 177 |
<productCodeCategory t-translation="off">OWN</productCodeCategory> |
| 178 |
<productCodeOwnValue t-out="line.product_id.default_code"/> |
| 179 |
</productCode> |
| 180 |
</productCodes> |
| 181 |
<lineExpressionIndicator t-out="format_bool(line_values['lineExpressionIndicator'])"/> |
| 182 |
<lineNatureIndicator t-out="line_values['lineNatureIndicator']"/> |
| 183 |
<lineDescription t-out="line_values['lineDescription']"/> |
| 184 |
<t t-if="line_values['lineExpressionIndicator']"> |
| 185 |
<quantity t-out="line_values['quantity']"/> |
| 186 |
<unitOfMeasure t-out="line.product_uom_id.l10n_hu_edi_code or 'OWN'"/> |
| 187 |
<unitOfMeasureOwn t-if="not line.product_uom_id.l10n_hu_edi_code" t-out="line.product_uom_id.name"/> |
| 188 |
<unitPrice t-out="float_repr(line_values['unitPrice'], 6)"/> |
| 189 |
<unitPriceHUF t-out="float_repr(line_values['unitPriceHUF'], 6)"/> |
| 190 |
</t> |
| 191 |
<lineDiscountData t-if="line.discount"> |
| 192 |
<discountValue t-out="float_repr(line_values['discountValue'], 2)"/> |
| 193 |
<discountRate t-out="float_repr(line_values['discountRate'], 4)"/> |
| 194 |
</lineDiscountData> |
| 195 |
<lineAmountsNormal> |
| 196 |
<lineNetAmountData> |
| 197 |
<lineNetAmount t-out="float_repr(line_values['lineNetAmount'], 2)"/> |
| 198 |
<lineNetAmountHUF t-out="float_repr(line_values['lineNetAmountHUF'], 2)"/> |
| 199 |
</lineNetAmountData> |
| 200 |
<lineVatRate> |
| 201 |
<t t-call="l10n_hu_edi.nav_online_invoice_xml_3_0_vat_rate"> |
| 202 |
<t t-set="tax" t-value="line_values['vat_tax']"/> |
| 203 |
<t t-set="vatPercentage" t-value="line_values['vatPercentage']"/> |
| 204 |
</t> |
| 205 |
</lineVatRate> |
| 206 |
<lineVatData t-if="line_values['lineVatData']"> |
| 207 |
<lineVatAmount t-out="float_repr(line_values['lineVatAmount'], 2)"/> |
| 208 |
<lineVatAmountHUF t-out="float_repr(line_values['lineVatAmountHUF'], 2)"/> |
| 209 |
</lineVatData> |
| 210 |
<lineGrossAmountData> |
| 211 |
<lineGrossAmountNormal t-out="float_repr(line_values['lineGrossAmountNormal'], 2)"/> |
| 212 |
<lineGrossAmountNormalHUF t-out="float_repr(line_values['lineGrossAmountNormalHUF'], 2)"/> |
| 213 |
</lineGrossAmountData> |
| 214 |
</lineAmountsNormal> |
| 215 |
</template> |
| 216 |
</odoo> |