summaryrefslogtreecommitdiff
path: root/addons/account/views/account_onboarding_templates.xml
blob: 67bd94813733218d081f7a14bb9c4497c9937e80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <!-- ONBOARDING STEPS -->
    <template id="onboarding_invoice_layout_step">
        <t t-call="base.onboarding_step">
            <t t-set="title">Invoice Layout</t>
            <t t-set="description">Customize the look of your invoices.</t>
            <t t-set="done_icon" t-value="'fa-star'" />
            <t t-set="btn_text">Customize</t>
            <t t-set="done_text">Looks great!</t>
            <t t-set="method" t-value="'action_open_base_document_layout'" />
            <t t-set="model" t-value="'base.document.layout'" />
            <t t-set="state" t-value="state.get('account_onboarding_invoice_layout_state')" />
        </t>
    </template>
    <template id="onboarding_create_invoice_step">
        <t t-call="base.onboarding_step">
            <t t-set="title">Create Invoice</t>
            <t t-set="description">
                Create your first invoice.
            </t>
            <t t-set="btn_text">Create</t>
            <t t-set="done_text">First invoice sent!</t>
            <t t-set="method" t-value="'action_open_account_onboarding_create_invoice'" />
            <t t-set="model" t-value="'res.company'" />
            <t t-set="state" t-value="state.get('account_onboarding_create_invoice_state')" />
        </t>
    </template>
    <template id="onboarding_bank_account_step">
        <t t-call="base.onboarding_step">
            <t t-set="title">Bank Account</t>
            <t t-set="description">Setup your bank account to sync bank feeds.</t>
            <t t-set="btn_text">Add a bank</t>
            <t t-set="done_text">Step Completed!</t>
            <t t-set="method" t-value="'setting_init_bank_account_action'" />
            <t t-set="model" t-value="'res.company'" />
            <t t-set="state" t-value="state.get('account_setup_bank_data_state')" />
        </t>
    </template>
    <template id="onboarding_fiscal_year_step">
        <t t-call="base.onboarding_step">
            <t t-set="title">Accounting Periods</t>
            <t t-set="description">Define your fiscal years &amp; tax returns periodicity.</t>
            <t t-set="btn_text">Configure</t>
            <t t-set="done_text">Step Completed!</t>
            <t t-set="method" t-value="'setting_init_fiscal_year_action'" />
            <t t-set="model" t-value="'res.company'" />
            <t t-set="state" t-value="state.get('account_setup_fy_data_state')" />
        </t>
    </template>
    <template id="onboarding_chart_of_account_step">
        <t t-call="base.onboarding_step">
            <t t-set="title">Chart of Accounts</t>
            <t t-set="description">Setup your chart of accounts and record initial balances.</t>
            <t t-set="btn_text">Review</t>
            <t t-set="done_text">Chart of account set.</t>
            <t t-set="method" t-value="'setting_chart_of_accounts_action'" />
            <t t-set="model" t-value="'res.company'" />
            <t t-set="state" t-value="state.get('account_setup_coa_state')" />
        </t>
    </template>
    <template id="dashboard_onboarding_bill_step">
        <t t-call="base.onboarding_step">
            <t t-set="title">First Bill</t>
            <t t-set="description">Digitalize your vendor bills with OCR and Artificial Intelligence.</t>
            <t t-set="btn_text">Let's start!</t>
            <t t-set="done_text">All done!</t>
            <t t-set="method" t-value="'setting_upload_bill_wizard'"/>
            <t t-set="model" t-value="'account.move'"/>
            <t t-set="state" t-value="state.get('account_setup_bill_state')"/>
        </t>
    </template>
    <!-- ONBOARDING PANELS -->
    <template id="account_invoice_onboarding_panel" name="account.invoice.onboarding.panel">
        <t t-call="base.onboarding_container">
            <t t-set="classes" t-value="'o_onboarding_blue'"/>
            <t t-set="bg_image" t-value="'/account/static/src/img/account_invoice_onboarding_bg.jpg'"/>
            <t t-set="close_method" t-value="'action_close_account_invoice_onboarding'"/>
            <t t-set="close_model" t-value="'res.company'"/>
            <t t-set="text_completed">Congratulations! You are all set.</t>

            <t t-call="base.onboarding_company_step" name="company_step" />
            <t t-call="account.onboarding_invoice_layout_step" name="invoice_layout_step" />
            <t t-call="account.onboarding_create_invoice_step" name="create_invoice_step" />
        </t>
    </template>
    <template id="account_dashboard_onboarding_panel" name="account.dashboard.onboarding.panel">
        <t t-call="base.onboarding_container">
            <t t-set="classes" t-value="'o_onboarding_orange'"/>
            <t t-set="bg_image" t-value="'/account/static/src/img/account_dashboard_onboarding_bg.jpg'"/>
            <t t-set="close_method" t-value="'action_close_account_dashboard_onboarding'"/>
            <t t-set="close_model" t-value="'res.company'"/>

            <t t-call="account.dashboard_onboarding_bill_step" name="company_step" />
            <t t-call="account.onboarding_bank_account_step" name="bank_account_step" />
            <t t-call="account.onboarding_fiscal_year_step" name="fiscal_year_step" />
            <t t-call="account.onboarding_chart_of_account_step" name="chart_of_account_step" />
        </t>
    </template>
    <!-- SAMPLE INVOICE EMAIL -->
    <record id="action_open_account_onboarding_create_invoice" model="ir.actions.act_window">
        <field name="name">Create first invoice</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="account.view_move_form" />
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>
    <!-- SALE TAX -->
    <template id="onboarding_sale_tax_step">
        <t t-call="base.onboarding_step">
            <t t-set="title">Taxes</t>
            <t t-set="description">Choose a default sales tax for your products.</t>
            <t t-set="btn_text">Set taxes</t>
            <t t-set="done_text">Step Completed!</t>
            <t t-set="method" t-value="'action_open_account_onboarding_sale_tax'" />
            <t t-set="model" t-value="'res.company'" />
            <t t-set="state" t-value="state.get('account_onboarding_sale_tax_state')" />
        </t>
    </template>
    <record id="account_invoice_onboarding_sale_tax_form" model="ir.ui.view">
        <field name="name">account.invoice.layout.onboarding.form</field>
        <field name="model">res.company</field>
        <field name="mode">primary</field>
        <field name="priority">1000</field>
        <field name="arch" type="xml">
            <form>
                <div class="mb16">Choose a default sales tax for your products.</div>
                <label for="account_sale_tax_id" string="Sales Tax"/>
                <field name="account_sale_tax_id" />
                <footer>
                    <button string="Apply" class="btn btn-primary" type="object" name="action_save_onboarding_sale_tax" />
                    <button string="Cancel" class="btn-secondary" special="cancel" />
                </footer>
            </form>
        </field>
    </record>
    <record id="action_open_account_onboarding_sale_tax" model="ir.actions.act_window">
        <field name="name">Sales tax</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">res.company</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="account_invoice_onboarding_sale_tax_form" />
        <field name="target">new</field>
    </record>
</odoo>