Skip to content

Commit dc855de

Browse files
[MIG] pos_supplierinfo_search: Migration to 17.0
1 parent 78ca52b commit dc855de

File tree

6 files changed

+38
-29
lines changed

6 files changed

+38
-29
lines changed

pos_supplierinfo_search/README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ Contributors
7070

7171
- Carlos Lopez
7272

73+
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
74+
75+
- Bhavesh Heliconia
76+
7377
Maintainers
7478
-----------
7579

pos_supplierinfo_search/__manifest__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Point of sale - Search products by supplier",
55
"summary": "Search products by supplier data",
6-
"version": "16.0.1.0.0",
6+
"version": "17.0.1.0.0",
77
"development_status": "Beta",
88
"category": "Point Of Sale",
99
"website": "https://github.com/OCA/pos",
@@ -17,8 +17,8 @@
1717
"point_of_sale",
1818
],
1919
"assets": {
20-
"point_of_sale.assets": [
21-
"/pos_supplierinfo_search/static/src/js/db.js",
20+
"point_of_sale._assets_pos": [
21+
"/pos_supplierinfo_search/static/src/js/db.esm.js",
2222
],
2323
},
2424
}

pos_supplierinfo_search/readme/CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
- Dhara Solanki \<<dhara.solanki@initos.com>\>
33
- \[Tecnativa\](<https://www.tecnativa.com>):
44
- Carlos Lopez
5+
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
6+
- Bhavesh Heliconia

pos_supplierinfo_search/static/description/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,10 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
416416
<li>Carlos Lopez</li>
417417
</ul>
418418
</li>
419+
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
420+
<li>Bhavesh Heliconia</li>
421+
</ul>
422+
</li>
419423
</ul>
420424
</div>
421425
<div class="section" id="maintainers">
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/** @odoo-module */
2+
3+
import {PosDB} from "@point_of_sale/app/store/db";
4+
import {patch} from "@web/core/utils/patch";
5+
6+
patch(PosDB.prototype, {
7+
_product_search_string(product) {
8+
var res = super._product_search_string(product).replace("\n", "");
9+
var supplier_data_list = JSON.parse(product.supplier_data_json);
10+
for (var i = 0, len = supplier_data_list.length; i < len; i++) {
11+
var supplier_data = supplier_data_list[i];
12+
if (supplier_data.supplier_name) {
13+
res += "|" + supplier_data.supplier_name.replace(/:/g, "");
14+
}
15+
if (supplier_data.supplier_product_code) {
16+
res += "|" + supplier_data.supplier_product_code.replace(/:/g, "");
17+
}
18+
if (supplier_data.supplier_product_name) {
19+
res += "|" + supplier_data.supplier_product_name.replace(/:/g, "");
20+
}
21+
}
22+
res += "\n";
23+
return res;
24+
},
25+
});

pos_supplierinfo_search/static/src/js/db.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)