account_onboarding_templates.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- ONBOARDING STEPS -->
  4. <template id="onboarding_invoice_layout_step">
  5. <t t-call="base.onboarding_step">
  6. <t t-set="title">Invoice Layout</t>
  7. <t t-set="description">Customize the look of your invoices.</t>
  8. <t t-set="done_icon" t-value="'fa-star'" />
  9. <t t-set="btn_text">Customize</t>
  10. <t t-set="done_text">Looks great!</t>
  11. <t t-set="method" t-value="'action_open_base_document_layout'" />
  12. <t t-set="model" t-value="'base.document.layout'" />
  13. <t t-set="state" t-value="state.get('account_onboarding_invoice_layout_state')" />
  14. </t>
  15. </template>
  16. <template id="onboarding_create_invoice_step">
  17. <t t-call="base.onboarding_step">
  18. <t t-set="title">Create Invoice</t>
  19. <t t-set="description">
  20. Create your first invoice.
  21. </t>
  22. <t t-set="btn_text">Create</t>
  23. <t t-set="done_text">First invoice sent!</t>
  24. <t t-set="method" t-value="'action_open_account_onboarding_create_invoice'" />
  25. <t t-set="model" t-value="'res.company'" />
  26. <t t-set="state" t-value="state.get('account_onboarding_create_invoice_state')" />
  27. </t>
  28. </template>
  29. <template id="onboarding_bank_account_step">
  30. <t t-call="base.onboarding_step">
  31. <t t-set="title">Bank Account</t>
  32. <t t-set="description">
  33. Connect your financial accounts in seconds.
  34. </t>
  35. <t t-set="btn_text">Add a bank account</t>
  36. <t t-set="done_text">Step Completed!</t>
  37. <t t-set="method" t-value="'setting_init_bank_account_action'" />
  38. <t t-set="model" t-value="'res.company'" />
  39. <t t-set="state" t-value="state.get('account_setup_bank_data_state')" />
  40. </t>
  41. </template>
  42. <template id="onboarding_fiscal_year_step">
  43. <t t-call="base.onboarding_step">
  44. <t t-set="title">Accounting Periods</t>
  45. <t t-set="description">Define your fiscal years &amp; tax returns periodicity.</t>
  46. <t t-set="btn_text">Configure</t>
  47. <t t-set="done_text">Step Completed!</t>
  48. <t t-set="method" t-value="'setting_init_fiscal_year_action'" />
  49. <t t-set="model" t-value="'res.company'" />
  50. <t t-set="state" t-value="state.get('account_setup_fy_data_state')" />
  51. </t>
  52. </template>
  53. <template id="onboarding_chart_of_account_step">
  54. <t t-call="base.onboarding_step">
  55. <t t-set="title">Chart of Accounts</t>
  56. <t t-set="description">Setup your chart of accounts and record initial balances.</t>
  57. <t t-set="btn_text">Review</t>
  58. <t t-set="done_text">Chart of accounts set.</t>
  59. <t t-set="method" t-value="'setting_chart_of_accounts_action'" />
  60. <t t-set="model" t-value="'res.company'" />
  61. <t t-set="state" t-value="state.get('account_setup_coa_state')" />
  62. </t>
  63. </template>
  64. <template id="onboarding_taxes_step">
  65. <t t-call="base.onboarding_step">
  66. <t t-set="title">Taxes</t>
  67. <t t-set="description">Set default Taxes for sales and purchase transactions.</t>
  68. <t t-set="btn_text">Review</t>
  69. <t t-set="done_text">Taxes set.</t>
  70. <t t-set="method" t-value="'action_open_taxes_onboarding'" />
  71. <t t-set="model" t-value="'res.company'" />
  72. <t t-set="state" t-value="state.get('account_setup_taxes_state')" />
  73. </t>
  74. </template>
  75. <!-- ONBOARDING PANELS -->
  76. <template id="account_invoice_onboarding_panel" name="account.invoice.onboarding.panel">
  77. <t t-call="base.onboarding_container">
  78. <t t-set="classes" t-value="'o_onboarding_blue'"/>
  79. <t t-set="bg_image" t-value="'/account/static/src/img/account_invoice_onboarding_bg.jpg'"/>
  80. <t t-set="close_method" t-value="'action_close_account_invoice_onboarding'"/>
  81. <t t-set="close_model" t-value="'res.company'"/>
  82. <t t-set="text_completed">Congratulations! You are all set.</t>
  83. <t t-call="base.onboarding_company_step" name="company_step" />
  84. <t t-call="account.onboarding_bank_account_step" name="bank_account_step" t-if="not env.user.has_group('account.group_account_user')"/>
  85. <t t-call="account.onboarding_invoice_layout_step" name="invoice_layout_step" />
  86. <t t-call="account.onboarding_create_invoice_step" name="create_invoice_step" />
  87. </t>
  88. </template>
  89. <template id="account_dashboard_onboarding_panel" name="account.dashboard.onboarding.panel">
  90. <t t-call="base.onboarding_container">
  91. <t t-set="classes" t-value="'o_onboarding_orange'"/>
  92. <t t-set="bg_image" t-value="'/account/static/src/img/account_dashboard_onboarding_bg.jpg'"/>
  93. <t t-set="close_method" t-value="'action_close_account_dashboard_onboarding'"/>
  94. <t t-set="close_model" t-value="'res.company'"/>
  95. <t t-call="account.onboarding_fiscal_year_step" name="fiscal_year_step" />
  96. <t t-call="account.onboarding_bank_account_step" name="bank_account_step" />
  97. <t t-call="account.onboarding_taxes_step" name="taxes_step" />
  98. <t t-call="account.onboarding_chart_of_account_step" name="chart_of_account_step" />
  99. </t>
  100. </template>
  101. <!-- SAMPLE INVOICE EMAIL -->
  102. <record id="action_open_account_onboarding_create_invoice" model="ir.actions.act_window">
  103. <field name="name">Create first invoice</field>
  104. <field name="type">ir.actions.act_window</field>
  105. <field name="res_model">account.move</field>
  106. <field name="view_mode">form</field>
  107. <field name="view_id" ref="account.view_move_form" />
  108. <field name="context">{'default_move_type': 'out_invoice'}</field>
  109. </record>
  110. <!-- SALE TAX -->
  111. <template id="onboarding_sale_tax_step">
  112. <t t-call="base.onboarding_step">
  113. <t t-set="title">Taxes</t>
  114. <t t-set="description">Choose a default sales tax for your products.</t>
  115. <t t-set="btn_text">Set taxes</t>
  116. <t t-set="done_text">Step Completed!</t>
  117. <t t-set="method" t-value="'action_open_account_onboarding_sale_tax'" />
  118. <t t-set="model" t-value="'res.company'" />
  119. <t t-set="state" t-value="state.get('account_onboarding_sale_tax_state')" />
  120. </t>
  121. </template>
  122. <record id="account_invoice_onboarding_sale_tax_form" model="ir.ui.view">
  123. <field name="name">account.invoice.layout.onboarding.form</field>
  124. <field name="model">res.company</field>
  125. <field name="mode">primary</field>
  126. <field name="priority">1000</field>
  127. <field name="arch" type="xml">
  128. <form>
  129. <div class="mb16">Choose a default sales tax for your products.</div>
  130. <label for="account_sale_tax_id" string="Sales Tax"/>
  131. <field name="account_sale_tax_id" />
  132. <footer>
  133. <button string="Apply" class="btn btn-primary" type="object" name="action_save_onboarding_sale_tax" data-hotkey="q" />
  134. <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" />
  135. </footer>
  136. </form>
  137. </field>
  138. </record>
  139. <record id="action_open_account_onboarding_sale_tax" model="ir.actions.act_window">
  140. <field name="name">Sales tax</field>
  141. <field name="type">ir.actions.act_window</field>
  142. <field name="res_model">res.company</field>
  143. <field name="view_mode">form</field>
  144. <field name="view_id" ref="account_invoice_onboarding_sale_tax_form" />
  145. <field name="target">new</field>
  146. </record>
  147. </odoo>