report_invoice.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <template id="arabic_english_invoice" inherit_id="l10n_sa.arabic_english_invoice">
  5. <!-- Add Currency Exchange rate if different currency than SAR -->
  6. <xpath expr="//div[hasclass('clearfix')]" position="after">
  7. <div t-if="o.company_id.country_id.code == 'SA' and o.currency_id != o.company_id.currency_id"
  8. id="sar_amounts" class="row clearfix ms-auto my-3 text-nowrap table">
  9. <t t-set="sar_rate"
  10. t-value="o.env['res.currency']._get_conversion_rate(o.currency_id, o.company_id.currency_id, o.company_id, o.l10n_sa_confirmation_datetime)"/>
  11. <div name="exchange_rate" class="col-auto">
  12. <strong>Exchange Rate</strong>
  13. <p class="m-0" t-esc="sar_rate" t-options='{"widget": "float", "precision": 5}'/>
  14. </div>
  15. <div name="sar_subtotal" class="col-auto">
  16. <strong>Subtotal (SAR)</strong>
  17. <p class="m-0" t-esc="o.amount_untaxed_signed"
  18. t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  19. </div>
  20. <div name="sar_vat_amount" class="col-auto">
  21. <strong>VAT Amount (SAR)</strong>
  22. <p class="m-0"
  23. t-esc="o.currency_id._convert(o.amount_tax, o.company_id.currency_id, o.company_id, o.l10n_sa_confirmation_datetime)"
  24. t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  25. </div>
  26. <div name="sar_total" class="col-auto">
  27. <strong>Total (SAR)</strong>
  28. <p class="m-0" t-esc="o.amount_total_signed"
  29. t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  30. </div>
  31. </div>
  32. </xpath>
  33. <xpath expr="//t[@t-set='address']" position="inside">
  34. <div t-if="o.partner_id.l10n_sa_additional_identification_scheme and o.partner_id.l10n_sa_additional_identification_number" class="text-end mt0">
  35. <span t-field="o.partner_id.l10n_sa_additional_identification_scheme"/>:
  36. <span t-field="o.partner_id.l10n_sa_additional_identification_number"/>
  37. </div>
  38. </xpath>
  39. <xpath expr="//div[hasclass('col-4')]//span[@t-if=&quot;o.move_type == &apos;out_invoice&apos; and o.state == &apos;posted&apos;&quot;]" position="replace">
  40. <span t-if="o.move_type == 'out_invoice' and o.state == 'posted'">
  41. <t t-if="o._l10n_sa_is_simplified()">
  42. Simplified Tax Invoice
  43. </t>
  44. <t t-else="">
  45. Tax Invoice
  46. </t>
  47. </span>
  48. </xpath>
  49. <xpath expr="//div[hasclass('col-4')][3]//span[@t-if=&quot;o.move_type == &apos;out_invoice&apos; and o.state == &apos;posted&apos;&quot;]" position="replace">
  50. <span t-if="o.move_type == 'out_invoice' and o.state == 'posted'">
  51. <t t-if="o._l10n_sa_is_simplified()">
  52. فاتورة ضريبية مبسطة
  53. </t>
  54. <t t-else="">
  55. فاتورة ضريبية
  56. </t>
  57. </span>
  58. </xpath>
  59. </template>
  60. </data>
  61. </odoo>