account_journal_views.xml 5.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="view_account_journal_form" model="ir.ui.view">
  5. <field name="name">account.journal.form.l10n_sa_edi</field>
  6. <field name="model">account.journal</field>
  7. <field name="inherit_id" ref="account.view_account_journal_form"/>
  8. <field name="arch" type="xml">
  9. <xpath expr="//notebook" position="inside">
  10. <field name="l10n_sa_csr" invisible="1"/>
  11. <field name="l10n_sa_compliance_csid_json" invisible="1"/>
  12. <field name="l10n_sa_production_csid_json" invisible="1"/>
  13. <field name="l10n_sa_compliance_checks_passed" invisible="1"/>
  14. <page name="zatca_einvoicing" string="ZATCA" attrs="{'invisible': ['|', ('country_code', '!=', 'SA'), ('type', '!=', 'sale')]}">
  15. <group>
  16. <group>
  17. <field name="l10n_sa_serial_number"/>
  18. </group>
  19. </group>
  20. <p>
  21. <b>
  22. In order to be able to submit Invoices to ZATCA, the following steps need to be completed:
  23. </b>
  24. <ol class="mt-2 mb-4">
  25. <li>
  26. Set a Serial Number for your device
  27. <i class="fa fa-check text-success ms-1"
  28. attrs="{'invisible': [('l10n_sa_serial_number', '=', False)]}"/>
  29. </li>
  30. <li>
  31. Request a Compliance Certificate (CCSID)
  32. <i class="fa fa-check text-success ms-1"
  33. attrs="{'invisible': [('l10n_sa_compliance_csid_json', '=', False)]}"/>
  34. </li>
  35. <li>
  36. Complete the Compliance Checks
  37. <i class="fa fa-check text-success ms-1"
  38. attrs="{'invisible': [('l10n_sa_compliance_checks_passed', '=', False)]}"/>
  39. </li>
  40. <li>
  41. Request a Production Certificate (PCSID)
  42. <i class="fa fa-check text-success ms-1"
  43. attrs="{'invisible': [('l10n_sa_production_csid_json', '=', False)]}"/>
  44. </li>
  45. </ol>
  46. </p>
  47. <div class="alert alert-info d-flex justify-content-between align-items-center" role="alert"
  48. attrs="{'invisible':['|', ('l10n_sa_csr_errors', '!=', False), ('l10n_sa_compliance_csid_json', '!=', False)]}">
  49. <p class="mb-0">
  50. Onboard the Journal by completing each step
  51. </p>
  52. <button name="%(l10n_sa_edi_otp_wizard_act_window)d" type="action" icon="fa-key"
  53. class="btn-info ">
  54. Onboard Journal
  55. </button>
  56. </div>
  57. <div class="alert alert-danger d-flex flex-column align-items-end" role="alert"
  58. attrs="{'invisible':['|', '|', ('l10n_sa_csr_errors', '=', False), ('l10n_sa_compliance_csid_json', '!=', False), ('l10n_sa_production_csid_json', '!=', False)]}">
  59. <div class="w-100">
  60. <h4 role="alert" class="alert-heading">Journal could not be onboarded. Please make sure the Company VAT/Identification Number are correct.</h4>
  61. <field name="l10n_sa_csr_errors" nolabel="1" readonly="1"/>
  62. <hr/>
  63. </div>
  64. <button name="%(l10n_sa_edi_otp_wizard_act_window)d" type="action" icon="fa-key"
  65. class="btn-danger">
  66. Onboard Journal
  67. </button>
  68. </div>
  69. <div class="alert alert-info d-flex justify-content-between align-items-center" role="alert"
  70. attrs="{'invisible':['|', ('l10n_sa_compliance_checks_passed', '=', False), ('l10n_sa_production_csid_json', '=', False)]}">
  71. <p class="mb-0">
  72. The Production certificate is valid until
  73. <field name="l10n_sa_production_csid_validity" readonly="1" nolabel="1"
  74. class="fw-bold"/>
  75. </p>
  76. <div>
  77. <button name="%(l10n_sa_edi_otp_wizard_act_window)d" type="action" icon="fa-refresh"
  78. class="btn-info" context="{'default_l10n_sa_renewal': True}">
  79. Renew Production CSID
  80. </button>
  81. <button name="%(l10n_sa_edi_otp_wizard_act_window)d" type="action" icon="fa-refresh" class="btn-warning ms-2"
  82. confirm="Are you sure you wish to re-onboard the Journal?">
  83. Re-Onboard
  84. </button>
  85. </div>
  86. </div>
  87. </page>
  88. </xpath>
  89. </field>
  90. </record>
  91. </data>
  92. </odoo>