Skip to content

Commit fb69aa0

Browse files
committed
[ADD] pharmacy_retail: added tour and buttons
1 parent 28506ab commit fb69aa0

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

pharmacy_retail/__manifest__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
'data/ir_model_data.xml',
4848
'data/mail_message.xml',
4949
'data/knowledge_tour.xml',
50+
'data/purchase_custom_tour.xml',
5051
],
5152
'demo': [
5253
'demo/res_partner_title.xml',
@@ -74,12 +75,14 @@
7475
'assets': {
7576
'web.assets_backend': [
7677
'pharmacy_retail/static/src/js/my_tour.js',
78+
'pharmacy_retail/static/src/js/tours/purchase_custom_tour.js',
7779
]
7880
},
7981
'author': 'Odoo S.A.',
8082
"cloc_exclude": [
8183
"data/knowledge_article.xml",
8284
"static/src/js/my_tour.js",
85+
"static/src/js/tours/purchase_custom_tour.js",
8386
],
8487
'images': ['images/main.png'],
8588
}

pharmacy_retail/data/knowledge_article.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<p style="margin-bottom: 0px;"><u>Lot Serial Number and Expiry Date Tracking</u></p>
7272
<p style="margin-bottom: 0px;"><br/></p>
7373
<p style="margin-bottom: 0px;">When the material is received, the user can either scan the barcode or manually enter the Lot Number, Expiry Date and Quantity for "<font class="text-o-color-1">Acetratine 10 mg</font>” product received.</p>
74+
<a class="btn btn-primary mb-2" href="/odoo?tour=purchase_custom_tour" data-bs-original-title="" title="">Purchase Flow Tutorial</a>
7475
<table class="table table-bordered o_table" style="width: 749.8px; margin-left: 0.2667px;">
7576
<tbody>
7677
<tr>
@@ -177,6 +178,9 @@
177178
<p style="margin-bottom: 0px;"><u>Create Invoice from Sales Order</u></p>
178179
<p style="margin-bottom: 0px;">Once the delivery is validated, go back to the sales order and "Create Invoice".</p>
179180
<p style="margin-bottom: 0px;">This will create an invoice based on the delivered products.</p>
181+
<br/><br/>
182+
<a class="btn btn-primary mb-2" href="/odoo?tour=sale_order_to_cash_tour" data-bs-original-title="" title="">Sale Flow Tutorial</a>
183+
<br/><br/>
180184
<blockquote style="margin-bottom: 0px;" data-o-mail-quote-node="1" data-o-mail-quote="1">The invoice will consider the discounted price due to the applied B2B customer discount.</blockquote>
181185
<p style="margin-bottom: 0px;"><br/></p>
182186
<h2 style="margin-bottom: 0px;">Flow 3: Sales B2C Customer : Point of Sale with Offers</h2>
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>
3+
<record id="purchase_tour" model="web_tour.tour">
4+
<field name="name">purchase_custom_tour</field>
5+
<field name="sequence">1000</field>
6+
<field name="rainbow_man_message">Good job! You went through all steps of this tour.</field>
7+
</record>
8+
</odoo>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { registry } from '@web/core/registry';
2+
3+
registry.category("web_tour.tours").add("purchase_custom_tour", {
4+
url: "/odoo",
5+
steps: () => [
6+
{
7+
"trigger": ".o_app[data-menu-xmlid='purchase\\.menu_purchase_root']",
8+
"run": "click"
9+
},
10+
{
11+
"trigger": ".o_list_button_add",
12+
"run": "click"
13+
},
14+
{
15+
"trigger": ".o_field_widget[name='partner_id'] .o-autocomplete--input",
16+
"run": "edit biocon"
17+
},
18+
{
19+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
20+
"run": "click"
21+
},
22+
{
23+
"trigger": ".o_field_x2many_list_row_add > a:nth-child(1)",
24+
"run": "click"
25+
},
26+
{
27+
"trigger": ".o_field_product_label_section_and_note_cell .o-autocomplete--input",
28+
"run": "edit acetratine"
29+
},
30+
{
31+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
32+
"run": "click"
33+
},
34+
{
35+
"trigger": ".o_field_widget[name='product_qty'] > .o_input",
36+
"run": "edit 12"
37+
},
38+
{
39+
"trigger": ".o_field_widget[name='partner_id'] .o-autocomplete--input",
40+
"run": "click"
41+
},
42+
{
43+
"trigger": ".o_statusbar_buttons > button[name='button_confirm']",
44+
"run": "click"
45+
},
46+
{
47+
"trigger": ".o_statusbar_buttons > button[name='action_view_picking']",
48+
"run": "click"
49+
},
50+
{
51+
"trigger": ".o_data_cell:nth-child(5) > button[name='Open\\ Move']",
52+
"run": "click"
53+
},
54+
{
55+
"trigger": ".o_data_cell[name='lot_name']",
56+
"run": "click"
57+
},
58+
{
59+
"trigger": ".o_field_widget[name='lot_name'] > .o_input",
60+
"run": "edit lot-111"
61+
},
62+
{
63+
"trigger": "footer > .o_form_button_save",
64+
"run": "click"
65+
},
66+
{
67+
"trigger": ".o_statusbar_buttons > button[name='button_validate']",
68+
"run": "click"
69+
},
70+
{
71+
"trigger": ".o_back_button > a",
72+
"run": "click"
73+
},
74+
{
75+
"trigger": ".o_menu_brand",
76+
"run": "click"
77+
}
78+
]
79+
})

0 commit comments

Comments
 (0)