Skip to content

Commit 67b2b6e

Browse files
committed
[IMP] accounting_firm: add server actions and modify demo data
1 parent 15f2415 commit 67b2b6e

File tree

7 files changed

+162
-82
lines changed

7 files changed

+162
-82
lines changed

accounting_firm/__manifest__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
'sale_planning',
1515
'sale_timesheet_enterprise',
1616
'sign',
17+
'web_studio',
1718
],
1819
'data': [
1920
'data/res_config_settings.xml',
@@ -22,6 +23,7 @@
2223
'data/ir_model_fields.xml',
2324
'data/ir_default.xml',
2425
'data/ir_actions_server.xml',
26+
'data/ir_cron.xml',
2527
'data/ir_ui_view.xml',
2628
'data/ir_actions_act_window.xml',
2729
'data/ir_ui_menu.xml',
@@ -61,7 +63,6 @@
6163
'demo/project_task.xml',
6264
],
6365
'cloc_exclude': [
64-
'data/ir_actions_server.xml',
6566
'data/knowledge_article.xml',
6667
],
6768
'images': [

accounting_firm/data/ir_actions_server.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,40 @@ action = {
1212
}
1313
]]></field>
1414
</record>
15+
<record id="action_server_request_identity_document" model="ir.actions.server">
16+
<field name="model_id" ref="base.model_res_partner"/>
17+
<field name="state">code</field>
18+
<field name="name">Request Identity Document</field>
19+
<field name="binding_model_id" ref="base.model_res_partner"/>
20+
<field name="binding_view_types">form</field>
21+
<field name="code"><![CDATA[
22+
action ={
23+
"type": "ir.actions.act_window",
24+
"res_model": "documents.request_wizard",
25+
"views": [[False, "form"]],
26+
"target": "new",
27+
"context": {
28+
"default_folder_id": 2,
29+
"default_res_id": record.id or False,
30+
"default_res_model": env.context.get("default_res_model", False),
31+
"default_name": "Identity Document",
32+
"default_requestee_id": record.id,
33+
"default_partner_id": record.id,
34+
"default_activity_date_deadline_range": 7,
35+
"default_activity_note": "Please provide your identity document for update.",
36+
},
37+
"name": "New Document Request",
38+
}
39+
]]></field>
40+
</record>
41+
<record id="server_action_update_owner_id" model="ir.actions.server">
42+
<field name="model_id" ref="equity.model_equity_ubo"/>
43+
<field name="state">code</field>
44+
<field name="name">Update Owner ID</field>
45+
<field name="code"><![CDATA[
46+
for ubo in records.filtered('attachment_ids'):
47+
ubo.holder_id['x_id_scan'] = ubo.attachment_ids[-1].datas
48+
ubo.holder_id['x_id_expiration_date'] = ubo.attachment_expiration_date
49+
]]></field>
50+
</record>
1551
</odoo>

accounting_firm/data/ir_cron.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="ir_cron_request_guest_id_document" model="ir.cron">
4+
<field name="name">Accounting Firm: Request Guest Identity Document</field>
5+
<field name="interval_number">1</field>
6+
<field name="interval_type">days</field>
7+
<field name="model_id" ref="base.model_res_partner"/>
8+
<field name="state">code</field>
9+
<field name="code"><![CDATA[
10+
for contact in model.search([('x_id_expiration_date', '!=', False)]):
11+
if contact.x_id_expiration_date < datetime.datetime.today().date() + dateutil.relativedelta.relativedelta(days=7):
12+
action_send_doc_request = env['ir.actions.server'].browse(env.ref('accounting_firm.action_server_request_identity_document').id)
13+
action_send_doc_request.with_context(active_id=contact.id, active_model="res.partner").run()
14+
]]></field>
15+
</record>
16+
</odoo>

accounting_firm/data/ir_ui_view.xml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@
1212
<field name="arch" type="xml">
1313
<div name="button_box" position="after">
1414
<header invisible="country_code != 'BE' or not vat">
15-
<button string="Link CBE" type="action" name="%(parner_link_action)d" context="{'link': ['http://kbopub.economie.fgov.be/kbopub/zoeknummerform.html?nummer=']}"/>
15+
<button string="Link CBE" type="action" name="%(parner_link_action)d" context="{'link': ['http://kbopub.economie.fgov.be/kbopub/zoeknummerform.html?nummer=']}" help="Crossroads Bank for Enterprises"/>
1616
<button string="Link Belgian Monitor" type="action" name="%(parner_link_action)d" context="{'link': ['https://www.ejustice.just.fgov.be/cgi_tsv/list.pl?btw=', '&amp;view_numac=']}"/>
17-
<button string="Link NBB" type="action" name="%(parner_link_action)d" context="{'link': ['https://consult.cbso.nbb.be/consult-enterprise/']}"/>
17+
<button string="Link NBB" type="action" name="%(parner_link_action)d" context="{'link': ['https://consult.cbso.nbb.be/consult-enterprise/']}" help="National Bank of Belgium"/>
18+
</header>
19+
<header invisible="country_code != 'FR' or not vat">
20+
<button string="Link FBD" type="action" name="%(parner_link_action)d" context="{'link': ['https://annuaire-entreprises.data.gouv.fr/entreprise/']}" help="French Business Directory"/>
21+
</header>
22+
<header invisible="country_code != 'GB' or not vat">
23+
<button string="Link Companies House" type="action" name="%(parner_link_action)d" context="{'link': ['https://find-and-update.company-information.service.gov.uk/company/']}" help="Companies House"/>
1824
</header>
1925
</div>
20-
2126
<xpath expr="//page[@name='equity_ubo']" position="after">
2227
<page string="ID" name="accounting_firm_id_page" invisible="is_company">
2328
<group>
@@ -55,7 +60,6 @@
5560
<xpath expr="//field[@name='ubo_birth_date']" position="move"/>
5661
<xpath expr="//field[@name='ubo_birth_place']" position="move"/>
5762
</xpath>
58-
5963
<xpath expr="//div[hasclass('o_address_format')]" position="after">
6064
<field name="x_closing_month" invisible="not project_ids"/>
6165
<field name="x_vat_declaration_recurrence" invisible="not project_ids"/>
@@ -72,6 +76,7 @@
7276
<field name="model">res.partner</field>
7377
<field name="inherit_id" ref="account_followup.customer_statements_search_view"/>
7478
<field name="priority" eval="100"/>
79+
<field name="active" eval="True"/>
7580
<field name="arch" type="xml">
7681
<xpath expr="//filter[@name='filter_in_need_of_action']" position="after">
7782
<filter string="Expired IDs"
@@ -85,6 +90,7 @@
8590
<record id="x_mandate_view_form" model="ir.ui.view">
8691
<field name="name">Mandates</field>
8792
<field name="model">x_mandate</field>
93+
<field name="active" eval="True"/>
8894
<field name="arch" type="xml">
8995
<form string="Mandates">
9096
<sheet>
@@ -101,6 +107,7 @@
101107
<record id="x_mandate_view_list" model="ir.ui.view">
102108
<field name="name">Mandates</field>
103109
<field name="model">x_mandate</field>
110+
<field name="active" eval="True"/>
104111
<field eval="6" name="priority"/>
105112
<field name="arch" type="xml">
106113
<list string="Mandates" editable="bottom" multi_edit="1" sample="1">
@@ -116,6 +123,7 @@
116123
<field name="name">accounting.firm.view.project.project.form</field>
117124
<field name="model">project.project</field>
118125
<field name="inherit_id" ref="project.edit_project"/>
126+
<field name="active" eval="True"/>
119127
<field name="priority" eval="100"/>
120128
<field name="arch" type="xml">
121129
<xpath expr="//field[@name='user_id']" position="after">
@@ -129,6 +137,7 @@
129137
<field name="model">project.project</field>
130138
<field name="inherit_id" ref="project.view_project_kanban"/>
131139
<field name="priority" eval="100"/>
140+
<field name="active" eval="True"/>
132141
<field name="arch" type="xml">
133142
<xpath expr="//field[@name='user_id']" position="before">
134143
<field name="x_reviewer_id" class="me-1" widget="many2many_avatar_user"/>
@@ -157,4 +166,20 @@
157166
</form>
158167
</field>
159168
</record>
169+
170+
<!-- Equity UBO views -->
171+
<record id="equity_ubo_form_view_inherited" model="ir.ui.view">
172+
<field name="name">equity.ubo.form.view.inherited</field>
173+
<field name="model">equity.ubo</field>
174+
<field name="type">form</field>
175+
<field name="inherit_id" ref="equity.view_equity_ubo_form"/>
176+
<field name="active" eval="True"/>
177+
<field name="arch" type="xml">
178+
<xpath expr="//h1" position="before">
179+
<header invisible="not attachment_ids or not attachment_expiration_date">
180+
<button string="Update Owner ID" type="action" name="%(server_action_update_owner_id)d"/>
181+
</header>
182+
</xpath>
183+
</field>
184+
</record>
160185
</odoo>

accounting_firm/data/knowledge_article.xml

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ Otherwise, open the <strong>Sales App</strong> and create a new quote.
8484
</div>
8585
</div>
8686
<p>Once confirmed, by your customer, the quote turns into a sales order, which creates the corresponding project and tasks in the projects (where you manage your workload).</p>
87-
<div class="o_editor_banner user-select-none lh-1 d-flex align-items-center alert alert-success pb-0 pt-3 o-contenteditable-false" data-oe-role="status" role="status">
88-
<i class="o_editor_banner_icon mb-3 fst-normal" data-oe-aria-label="Banner Success" aria-label="Banner Success">✅</i>
89-
<div class="w-100 px-3 o_editor_banner_content o-contenteditable-true" contenteditable="true">
90-
<p>Rename the project at your will to better identify them by customer name or else.</p>
91-
</div>
92-
</div>
9387
<div class="o_editor_banner user-select-none lh-1 d-flex align-items-center alert alert-info pb-0 pt-3 o-contenteditable-false" data-oe-role="status" role="status">
9488
<i class="o_editor_banner_icon mb-3 fst-normal" data-oe-aria-label="Banner Info" aria-label="Banner Info">💡</i>
9589
<div class="w-100 px-3 o_editor_banner_content o-contenteditable-true" contenteditable="true">
@@ -98,43 +92,65 @@ Otherwise, open the <strong>Sales App</strong> and create a new quote.
9892
</div>
9993
</div>
10094
<p>&#xFEFF;<a href="https://www.odoo.com/documentation/latest/applications/sales/sales.html" class="btn btn-secondary">&#xFEFF;🎓 Sales&#xFEFF;</a>&#xFEFF;</p>
95+
<h3>Customer identity management</h3>
96+
<p>Identity management is a must do activity in your business and to support you with that, the contacts encompass all the necessary.</p>
97+
<ul>
98+
<li>
99+
Open the <strong>Contacts App</strong> and reach your new customer form.
100+
</li>
101+
<li>Easily request identity document from the gear icon (⚙️) in the bread crumb.</li>
102+
</ul>
103+
<div class="o_editor_banner user-select-none o-contenteditable-false lh-1 d-flex align-items-center alert alert-success pb-0 pt-3" data-oe-role="status" role="status">
104+
<i class="o_editor_banner_icon mb-3 fst-normal" data-oe-aria-label="Banner Success" aria-label="Banner Success">✅</i>
105+
<div class="o_editor_banner_content o-contenteditable-true w-100 px-3" contenteditable="true">
106+
<p>Sending a document request creates an activity for you to follow up without mental load!</p>
107+
</div>
108+
</div>
109+
<ul>
110+
<li>
111+
When the document is available, reach the contact ID tab to fill in the contact details.
112+
</li>
113+
</ul>
114+
<div class="o_editor_banner user-select-none lh-1 d-flex align-items-center alert alert-info pb-0 pt-3 o-contenteditable-false" data-oe-role="status" role="status">
115+
<i class="o_editor_banner_icon mb-3 fst-normal" data-oe-aria-label="Banner Info" aria-label="Banner Info">💡</i>
116+
<div class="w-100 px-3 o_editor_banner_content o-contenteditable-true" contenteditable="true">
117+
<p>When filling in the identity document expiration date, you can leverage the contacts filter "Expired IDs" to efficiently find the IDs to update!</p>
118+
</div>
119+
</div>
120+
<p>&#xFEFF;<a href="https://www.odoo.com/documentation/latest/applications/essentials/contacts.html" class="btn btn-secondary">&#xFEFF;🎓 Contacts&#xFEFF;</a>&#xFEFF;</p>
121+
<h3>Setup the project</h3>
101122
<p>The project creation created as well some tasks to handle from now on.</p>
102123
<ul>
103-
<li>Open the <strong>Project App</strong> and open the project corresponding to the sale order you just confirmed, or click the Tasks smart button at the top of the sale order.</li>
104124
<li>
105-
<p>The Customer onboarding task contains details about actions to take to have your customer in order.</p>
125+
Open the <strong>Project App</strong> and open the project corresponding to the sale order you just confirmed, or click the Tasks smart button at the top of the sale order.
126+
</li>
127+
<li>
128+
The Customer onboarding task contains details about actions to take to have your customer in order.
106129
<ul>
107130
<li>Set the recurrence for tasks not coming from the project template and the dead line dates to all project tasks.</li>
108-
<li>To assign the Project Manager, open the Project App and open the settings of the project, clicking the three dots in the top right corner of the corresponding tile. </li>
131+
<li>To assign the Project Manager, Assistant and Reviewer, open the Project App and open the settings of the project, clicking the three dots in the top right corner of the corresponding tile.</li>
109132
<li>For the project tasks, you can assign the owner or more employees in case you work with Junior / Senior pairing.</li>
110133
</ul>
111134
</li>
112-
113135
</ul>
114-
<div class="o_editor_banner user-select-none lh-1 d-flex align-items-center alert alert-success pb-0 pt-3 o-contenteditable-false" data-oe-role="status" role="status">
136+
<div class="o_editor_banner user-select-none o-contenteditable-false lh-1 d-flex align-items-center alert alert-success pb-0 pt-3" data-oe-role="status" role="status">
115137
<i class="o_editor_banner_icon mb-3 fst-normal" data-oe-aria-label="Banner Success" aria-label="Banner Success">✅</i>
116-
<div class="w-100 px-3 o_editor_banner_content o-contenteditable-true" contenteditable="true">
138+
<div class="o_editor_banner_content o-contenteditable-true w-100 px-3" contenteditable="true">
117139
<p>Define the to do list and documents to request which suite you in the template project tasks.</p>
118140
</div>
119141
</div>
120-
<div class="o_editor_banner user-select-none lh-1 d-flex align-items-center alert alert-success pb-0 pt-3 o-contenteditable-false" data-oe-role="status" role="status">
142+
<div class="o_editor_banner user-select-none o-contenteditable-false lh-1 d-flex align-items-center alert alert-success pb-0 pt-3" data-oe-role="status" role="status">
121143
<i class="o_editor_banner_icon mb-3 fst-normal" data-oe-aria-label="Banner Success" aria-label="Banner Success">✅</i>
122-
<div class="w-100 px-3 o_editor_banner_content o-contenteditable-true" contenteditable="true">
123-
<p>
124-
When you confirm a sale order, know that the duplicated project is defined in the product you sold. You can edit the project to adjust the list for customer onboarding actions or folder architecture so that you save
125-
time in the future.
126-
</p>
144+
<div class="o_editor_banner_content o-contenteditable-true w-100 px-3" contenteditable="true">
145+
<p>When you confirm a sale order, know that the duplicated project is defined in the product you sold. You can edit the project to adjust the list for customer onboarding actions or folder architecture so that you save time in the future.</p>
127146
<ul>
128147
<li>Open the <strong>Project App</strong>, open the project pointed by your Customer onboarding product and display the project shortcut for Documents if not yet done.</li>
129148
<li>Go to the project documents with the shortcuts to edit the folder architecture at your convenience.</li>
130149
<li>Open the Customer onboarding task to edit the action list.</li>
131150
</ul>
132151
</div>
133152
</div>
134-
<p>&#xFEFF;<a class="btn btn-secondary" href="https://www.odoo.com/documentation/latest/applications/services/project.html">&#xFEFF;🎓 Project&#xFEFF;</a>&#xFEFF;</p>
135-
<p>
136-
<br/>
137-
</p>
153+
<p>&#xFEFF;<a href="https://www.odoo.com/documentation/latest/applications/services/project.html" class="btn btn-secondary">&#xFEFF;🎓 Project&#xFEFF;</a>&#xFEFF;</p>
138154
<h3>🗂️Document management</h3>
139155
<p>Since a tedious part of the job is to request and organise documents for reference and traceability, a good document management system is required!</p>
140156
<div class="o_editor_banner user-select-none o-contenteditable-false lh-1 d-flex align-items-center alert alert-success pb-0 pt-3" data-oe-role="status" role="status">
@@ -249,9 +265,6 @@ Otherwise, open the <strong>Sales App</strong> and create a new quote.
249265
</p>
250266
<h3 class="">🧮 Ultimate beneficial owners' hunt</h3>
251267
<p>UBO identification can be a tedious task you don't want to lose time on. The Equity App comes with capabilities which will help you with this duty.</p>
252-
<p>
253-
<strong>Requesting UBO</strong>
254-
</p>
255268
<ul>
256269
<li>Open the contact from which you expect the UBO list.</li>
257270
<li>Select the Request UBO from the gear icon (⚙️) menu.</li>
@@ -274,6 +287,19 @@ Otherwise, open the <strong>Sales App</strong> and create a new quote.
274287
<p>
275288
<br/>
276289
</p>
290+
<h3>💸 Anti-Money Laundering</h3>
291+
<p>Among your activities, you might as well handle the anti-money laundering aspect.</p>
292+
<ul>
293+
<li>Open the contact form of the company you have to handle this for, Second Company for example.</li>
294+
<li>Navigate to the AML tab to appreciate the last assessment performed.</li>
295+
<li>Update the captured insights as you need and then update the last update date.</li>
296+
</ul>
297+
<div class="o_editor_banner user-select-none o-contenteditable-false lh-1 d-flex align-items-center alert alert-success pb-0 pt-3" data-oe-role="status" role="status">
298+
<i class="o_editor_banner_icon mb-3 fst-normal" data-oe-aria-label="Banner Success" aria-label="Banner Success">✅</i>
299+
<div class="o_editor_banner_content o-contenteditable-true w-100 px-3" contenteditable="true">
300+
<p>Information captured here are informative only and do not trigger or interact with any capability.</p>
301+
</div>
302+
</div>
277303
<h3>📊 Follow up on project profitability</h3>
278304
<p>A crucial part of business is as well making sure it is profitable. Odoo helps you following up project profitability with the project Dashboard.</p>
279305
<ul>

0 commit comments

Comments
 (0)