Skip to content

Commit e3c566c

Browse files
[IMP] it_hardware: improve repair service flow
# This commit improves the user experience by doing the following: - enabling use_product_returns for the customer care helpdesk project. - enabling use_product_repairs for the customer care helpdesk project. - Updating "Flow 5: Repair Service" using the newly enabled features to make the flow more functional by making process of returning/repairing products for customers easier for users. task-4656025 closes #728 Signed-off-by: Vallaeys Valentin (vava) <[email protected]> Signed-off-by: Abdelrahman Rashed (aras) <[email protected]>
1 parent 6cd1df0 commit e3c566c

File tree

9 files changed

+235
-60
lines changed

9 files changed

+235
-60
lines changed

it_hardware/__manifest__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
'name': 'IT Hardware & Support',
3-
'version': '1.0',
3+
'version': '1.1',
44
'category': 'Services',
55
'depends': [
66
'account_followup',
@@ -42,6 +42,7 @@
4242
'data/mail_message.xml',
4343
'data/website_view.xml',
4444
'data/website_theme_apply.xml',
45+
'data/helpdesk_config.xml',
4546
'data/knowledge_tour.xml',
4647
],
4748
'demo': [
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="helpdesk.helpdesk_team1" model="helpdesk.team" forcecreate="True">
4+
<field name="name">Customer Care</field>
5+
<field name="use_product_returns" eval="True"/>
6+
<field name="use_product_repairs" eval="True"/>
7+
</record>
8+
</odoo>

it_hardware/data/knowledge_article.xml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,29 +151,50 @@
151151
<p style="margin-bottom: 0px;">
152152
<br />
153153
</p>
154-
<h3 style="margin-bottom: 0px;">Flow 5: Repair Service</h3>
155-
<p style="margin-bottom: 0px;">If the product is in warranty and customer has any complaint, we can repair the product and generate the invoice if required.</p>
154+
<h3>Flow 5: Repair Service</h3>
155+
<p style="margin-bottom: 0px;">If the product is in warranty and customer has any complaint, we can repair the product and generate the invoice when relevant.</p>
156156
<p style="margin-bottom: 0px;">
157157
<br />
158158
</p>
159-
<p style="margin-bottom: 0px;">To do that,</p>
159+
<p>To do that,</p>
160160
<ul style="margin-bottom: 0px;">
161161
<li>Go to website and Helpdesk form</li>
162-
<li>In the form, the customer describes the product ('<font class="text-o-color-1">ThinkPad X1 Carbon 35.56cms - 12th Gen Intel i7</font>'), the serial number('CNC012345'), and submit the ticket.</li>
163-
<li>support ticket will be created from backend.</li>
164-
<li>Open the ticket from backend, enter the serial number and the warranty date will be displayed.</li>
162+
<li>In the form, the customer describes the product ('ThinkPad X1 Carbon 35.56cms - 12th Gen Intel i7'), the serial number('CNC012345'), and submit the ticket.</li>
163+
<li>Open the Helpdesk App, and then click the Tickets button to find the list of tickets, newest one is yours.</li>
165164
</ul>
166165
<p style="margin-bottom: 0px;">
167166
<br />
168167
</p>
169168
<p style="margin-bottom: 0px;">
170-
<u>Generate Repair Order</u>
169+
You can iterate with customers to define the best way to proceed to satisfy them from the chatter.
171170
</p>
172-
<p>To do that,</p>
171+
<p style="margin-bottom: 0px;">
172+
<br />
173+
</p>
174+
<p>
175+
<u>Return and repair orders</u>
176+
</p>
177+
<p>In case you decide that the product needs a return and repair, then you need to proceed as follow:</p>
178+
<ul>
179+
<li>From the ticket, click the Return button and adjust the quantities for the corresponding product and click return.</li>
180+
</ul>
181+
<div class="o_editor_banner user-select-none o_not_editable lh-1 d-flex align-items-center alert alert-info pb-0 pt-3">
182+
<i class="o_editor_banner_icon mb-3 fst-normal">💡</i>
183+
<div class="w-100 px-3">
184+
<p>
185+
The customer may not have been delivered any device yet and returns are only supported after deliveries.
186+
<br />
187+
To follow the flow, change the Customer to your contact.
188+
</p>
189+
</div>
190+
</div>
173191
<ul>
174-
<li>Create the Repair order from Helpdesk- &amp;gt;Repair Order.</li>
175-
<li>Take the product in our internal location from customer (WH/Repair).</li>
176-
<li>Repair the product, they move the Order to "Under Repair", and then "Repaired" when it's finished.</li>
192+
<li>The transfer can be validated, as if you were receiving the product from the customer.</li>
193+
<li>Come back to the Helpdesk ticket using the breadcrumb and note the return in the smart buttons.</li>
194+
<li>Now click the Repair button to create a repair order.</li>
195+
<li>Select the appropriate return and product, and adjust if needed the serial number.</li>
196+
<li>Place some notes if relevant and confirm the repair order.</li>
197+
<li>When working on it, click the Start Repair, and then End Repair when finished fixing the product.</li>
177198
</ul>
178199
<blockquote data-o-mail-quote="1" data-o-mail-quote-node="1" style="margin-bottom: 0px;">
179200
If the product is under warranty then no need to create the invoice and if the product is out of warranty then the user can send the quotation for the repair. Once the customer confirms the rate then the user can start repairing and
@@ -182,7 +203,7 @@
182203
</template>
183204

184205
<record id="welcome_article" model="knowledge.article">
185-
<field name="name">IT Hardware &amp;amp; Support</field>
206+
<field name="name">IT Hardware &amp; Support</field>
186207
<field name="icon">💻</field>
187208
<field name="internal_permission">write</field>
188209
<field name="cover_image_id" ref="knowledge_cover_2"/>

it_hardware/demo/purchase_order.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@
1212
<field name="partner_id" ref="res_partner_10"/>
1313
<field name="user_id" ref="base.user_admin"/>
1414
</record>
15+
<record id="purchase_order_4" model="purchase.order">
16+
<field name="partner_id" ref="res_partner_9"/>
17+
<field name="user_id" ref="base.user_admin"/>
18+
</record>
1519
</odoo>

it_hardware/demo/purchase_order_confirm.xml

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,37 @@
55
<function name="write" model="stock.move.line">
66
<value model="stock.move.line" eval="obj().search([
77
('product_id', '=', ref('product_product_5')),
8-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id)])[0].id"/>
9-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_2'), 'lot_name': obj().env.ref('it_hardware.stock_lot_2').name}"/>
8+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id),
9+
('lot_id', '=', False)], limit=1).id"/>
10+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_2')}"/>
1011
</function>
1112
<function name="write" model="stock.move.line">
1213
<value model="stock.move.line" eval="obj().search([
1314
('product_id', '=', ref('product_product_5')),
14-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id)])[1].id"/>
15-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_3'), 'lot_name': obj().env.ref('it_hardware.stock_lot_3').name}"/>
15+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id),
16+
('lot_id', '=', False)], limit=1).id"/>
17+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_3')}"/>
1618
</function>
1719
<function name="write" model="stock.move.line">
1820
<value model="stock.move.line" eval="obj().search([
1921
('product_id', '=', ref('product_product_5')),
20-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id)])[2].id"/>
21-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_4'), 'lot_name': obj().env.ref('it_hardware.stock_lot_4').name}"/>
22+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id),
23+
('lot_id', '=', False)], limit=1).id"/>
24+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_4')}"/>
2225
</function>
2326
<function name="write" model="stock.move.line">
2427
<value model="stock.move.line" eval="obj().search([
2528
('product_id', '=', ref('product_product_5')),
26-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id)])[3].id"/>
27-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_5'), 'lot_name': obj().env.ref('it_hardware.stock_lot_5').name}"/>
29+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id),
30+
('lot_id', '=', False)], limit=1).id"/>
31+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_5')}"/>
2832
</function>
2933
<function name="write" model="stock.move.line">
3034
<value model="stock.move.line" eval="obj().search([
3135
('product_id', '=', ref('product_product_5')),
32-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id)])[4].id"/>
33-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_6'), 'lot_name': obj().env.ref('it_hardware.stock_lot_6').name}"/>
36+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_1').picking_ids.id),
37+
('lot_id', '=', False)], limit=1).id"/>
38+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_6')}"/>
3439
</function>
3540

3641
<function name="button_validate" model="stock.picking">
@@ -43,14 +48,16 @@
4348
<function name="write" model="stock.move.line">
4449
<value model="stock.move.line" eval="obj().search([
4550
('product_id', '=', ref('product_product_10')),
46-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_2').picking_ids.id)])[0].id"/>
47-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_7'), 'lot_name': obj().env.ref('it_hardware.stock_lot_7').name}"/>
51+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_2').picking_ids.id),
52+
('lot_id', '=', False)], limit=1).id"/>
53+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_7')}"/>
4854
</function>
4955
<function name="write" model="stock.move.line">
5056
<value model="stock.move.line" eval="obj().search([
5157
('product_id', '=', ref('product_product_10')),
52-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_2').picking_ids.id)])[1].id"/>
53-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_8'), 'lot_name': obj().env.ref('it_hardware.stock_lot_8').name}"/>
58+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_2').picking_ids.id),
59+
('lot_id', '=', False)], limit=1).id"/>
60+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_8')}"/>
5461
</function>
5562
<function name="button_validate" model="stock.picking">
5663
<value model="stock.picking" eval="obj().env.ref('it_hardware.purchase_order_2').picking_ids.ids"/>
@@ -61,17 +68,60 @@
6168
<function name="write" model="stock.move.line">
6269
<value model="stock.move.line" eval="obj().search([
6370
('product_id', '=', ref('product_product_11')),
64-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_3').picking_ids.id)])[0].id"/>
65-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_9'), 'lot_name': obj().env.ref('it_hardware.stock_lot_9').name}"/>
71+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_3').picking_ids.id),
72+
('lot_id', '=', False)], limit=1).id"/>
73+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_9')}"/>
6674
</function>
6775
<function name="write" model="stock.move.line">
6876
<value model="stock.move.line" eval="obj().search([
6977
('product_id', '=', ref('product_product_11')),
70-
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_3').picking_ids.id)])[1].id"/>
71-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_10'), 'lot_name': obj().env.ref('it_hardware.stock_lot_10').name}"/>
78+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_3').picking_ids.id),
79+
('lot_id', '=', False)], limit=1).id"/>
80+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_10')}"/>
7281
</function>
7382
<function name="button_validate" model="stock.picking">
7483
<value model="stock.picking" eval="obj().env.ref('it_hardware.purchase_order_3').picking_ids.ids"/>
7584
</function>
7685
<function model="purchase.order" name="action_create_invoice" eval="[ref('purchase_order_3')]"/>
86+
87+
<function model="purchase.order" name="button_confirm" eval="[ref('purchase_order_4')]"/>
88+
<function name="write" model="stock.move.line">
89+
<value model="stock.move.line" eval="obj().search([
90+
('product_id', '=', ref('product_product_9')),
91+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_4').picking_ids.id),
92+
('lot_id', '=', False)], limit=1).id"/>
93+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_11')}"/>
94+
</function>
95+
<function name="write" model="stock.move.line">
96+
<value model="stock.move.line" eval="obj().search([
97+
('product_id', '=', ref('product_product_9')),
98+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_4').picking_ids.id),
99+
('lot_id', '=', False)], limit=1).id"/>
100+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_12')}"/>
101+
</function>
102+
<function name="write" model="stock.move.line">
103+
<value model="stock.move.line" eval="obj().search([
104+
('product_id', '=', ref('product_product_9')),
105+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_4').picking_ids.id),
106+
('lot_id', '=', False)], limit=1).id"/>
107+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_13')}"/>
108+
</function>
109+
<function name="write" model="stock.move.line">
110+
<value model="stock.move.line" eval="obj().search([
111+
('product_id', '=', ref('product_product_9')),
112+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_4').picking_ids.id),
113+
('lot_id', '=', False)], limit=1).id"/>
114+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_14')}"/>
115+
</function>
116+
<function name="write" model="stock.move.line">
117+
<value model="stock.move.line" eval="obj().search([
118+
('product_id', '=', ref('product_product_9')),
119+
('picking_id', '=', obj().env.ref('it_hardware.purchase_order_4').picking_ids.id),
120+
('lot_id', '=', False)], limit=1).id"/>
121+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_15')}"/>
122+
</function>
123+
<function name="button_validate" model="stock.picking">
124+
<value model="stock.picking" eval="obj().env.ref('it_hardware.purchase_order_4').picking_ids.ids"/>
125+
</function>
126+
<function model="purchase.order" name="action_create_invoice" eval="[ref('purchase_order_4')]"/>
77127
</odoo>

it_hardware/demo/purchase_order_line.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@
1515
<field name="product_qty">2.0</field>
1616
<field name="order_id" ref="purchase_order_3"/>
1717
</record>
18+
<record id="purchase_order_line_4" model="purchase.order.line">
19+
<field name="product_id" ref="product_product_9"/>
20+
<field name="product_qty">5.0</field>
21+
<field name="order_id" ref="purchase_order_4"/>
22+
</record>
1823
</odoo>

it_hardware/demo/sale_order_confirm.xml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,29 @@
22
<odoo>
33
<function model="sale.order" name="action_quotation_sent" eval="[[ref('sale_order_3')]]"/>
44

5-
<function model="sale.order" name="action_confirm" eval="[[ref('sale_order_2')]]"/>
5+
<function model="sale.order" name="action_confirm" eval="[[
6+
ref('sale_order_1'),
7+
ref('sale_order_2'),
8+
]]"/>
9+
10+
<function name="write" model="stock.move.line">
11+
<value model="stock.move.line" eval="obj().search([
12+
('product_id', '=', ref('product_product_9')),
13+
('picking_id', '=', obj().env.ref('it_hardware.sale_order_1').picking_ids.id),
14+
('lot_id', '=', False)], limit=1).id"/>
15+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_11')}"/>
16+
</function>
17+
18+
<function name="button_validate" model="stock.picking" context="{'skip_sms': True}">
19+
<value model="stock.picking" eval="obj().env.ref('it_hardware.sale_order_1').procurement_group_id.stock_move_ids.picking_id.ids"/>
20+
</function>
621

722
<function name="write" model="stock.move.line">
823
<value model="stock.move.line" eval="obj().search([
924
('product_id', '=', ref('product_product_5')),
10-
('picking_id', '=', obj().env.ref('it_hardware.sale_order_2').picking_ids.id)])[0].id"/>
11-
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_2'), 'lot_name': obj().env.ref('it_hardware.stock_lot_2').name}"/>
25+
('picking_id', '=', obj().env.ref('it_hardware.sale_order_2').picking_ids.id),
26+
('lot_id', '=', False)], limit=1).id"/>
27+
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_2')}"/>
1228
</function>
1329

1430
<function name="button_validate" model="stock.picking" context="{'skip_sms': True}">

it_hardware/demo/stock_lot.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,24 @@
3636
<field name="name">ENC012348</field>
3737
<field name="product_id" ref="product_product_11"/>
3838
</record>
39+
<record id="stock_lot_11" model="stock.lot">
40+
<field name="name">GNC012345</field>
41+
<field name="product_id" ref="product_product_9"/>
42+
</record>
43+
<record id="stock_lot_12" model="stock.lot">
44+
<field name="name">GNC012346</field>
45+
<field name="product_id" ref="product_product_9"/>
46+
</record>
47+
<record id="stock_lot_13" model="stock.lot">
48+
<field name="name">GNC012347</field>
49+
<field name="product_id" ref="product_product_9"/>
50+
</record>
51+
<record id="stock_lot_14" model="stock.lot">
52+
<field name="name">GNC012348</field>
53+
<field name="product_id" ref="product_product_9"/>
54+
</record>
55+
<record id="stock_lot_15" model="stock.lot">
56+
<field name="name">GNC012349</field>
57+
<field name="product_id" ref="product_product_9"/>
58+
</record>
3959
</odoo>

0 commit comments

Comments
 (0)