invoice_it_template.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="account_invoice_it_FatturaPA_export_withholding" inherit_id="l10n_it_edi.account_invoice_it_FatturaPA_export">
  4. <xpath expr="//DatiGeneraliDocumento/Numero" position="after">
  5. <t t-if="withholding_values" t-foreach="withholding_values" t-as="withholding">
  6. <DatiRitenuta>
  7. <TipoRitenuta t-esc="format_alphanumeric(withholding.tax.l10n_it_withholding_type)"/>
  8. <ImportoRitenuta t-esc="format_monetary(withholding.tax_amount, currency)"/>
  9. <AliquotaRitenuta t-esc="format_numbers(abs(withholding.tax.amount))"/>
  10. <CausalePagamento t-esc="format_alphanumeric(withholding.tax.l10n_it_withholding_reason)"/>
  11. </DatiRitenuta>
  12. </t>
  13. </xpath>
  14. <xpath expr="//DatiGeneraliDocumento/ImportoTotaleDocumento" position="before">
  15. <t t-if="pension_fund_values" t-foreach="pension_fund_values" t-as="pension_fund">
  16. <DatiCassaPrevidenziale>
  17. <TipoCassa t-esc="format_alphanumeric(pension_fund.tax.l10n_it_pension_fund_type)"/>
  18. <AlCassa t-esc="format_numbers(pension_fund.tax.amount)"/>
  19. <ImportoContributoCassa t-esc="format_monetary(pension_fund.tax_amount, currency)"/>
  20. <ImponibileCassa t-esc="format_monetary(pension_fund.base_amount, currency)"/>
  21. <AliquotaIVA t-esc="format_numbers(pension_fund.vat_tax.amount or 0.0)"/>
  22. <Ritenuta t-if="pension_fund.withholding_tax and pension_fund.withholding_tax.sequence > pension_fund.tax.sequence">SI</Ritenuta>
  23. <Natura t-if="pension_fund.tax.l10n_it_has_exoneration" t-esc="format_alphanumeric(pension_fund.tax.l10n_it_kind_exoneration)"/>
  24. <RiferimentoAmministrazione t-if="pension_fund.tax.description" t-esc="format_alphanumeric(pension_fund.tax.description)[:20]"/>
  25. </DatiCassaPrevidenziale>
  26. </t>
  27. </xpath>
  28. </template>
  29. <template id="account_invoice_line_it_FatturaPA_withholding" inherit_id="l10n_it_edi.account_invoice_line_it_FatturaPA">
  30. <xpath expr="//AliquotaIVA" position="after">
  31. <t t-if="line.tax_ids._l10n_it_filter_kind('withholding')">
  32. <Ritenuta>SI</Ritenuta>
  33. </t>
  34. </xpath>
  35. <xpath expr="//DettaglioLinee" position="inside">
  36. <t t-if="enasarco_values and enasarco_values[line.id]">
  37. <AltriDatiGestionali>
  38. <TipoDato>CASSA-PREV</TipoDato>
  39. <RiferimentoTesto t-esc="format_alphanumeric('TC07 - ENASARCO (' + format_numbers(abs(enasarco_values[line.id]['amount'])).rstrip('.0') + '%)')"/>
  40. <RiferimentoNumero t-esc="format_monetary(enasarco_values[line.id]['tax_amount'], currency)"/>
  41. </AltriDatiGestionali>
  42. </t>
  43. </xpath>
  44. </template>
  45. </odoo>