diff --git a/pos_reset_search/__init__.py b/pos_reset_search/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/pos_reset_search/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/pos_reset_search/__openerp__.py b/pos_reset_search/__openerp__.py new file mode 100644 index 00000000..d9c671e4 --- /dev/null +++ b/pos_reset_search/__openerp__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +{ + 'name': "pos_reset_search", + + 'summary': """ + Reset search after click on product.""", + + 'description': """ + The POS search workflow is to type-in product name until there is only on product left + to be selected. Then the user will select the product by typing on enter. To select a + product clears the search. This workflow is very efficient but it requires training. + + This add-on complete the POS search workflow for beginers. This add-on enables users + to search and narrow down the product selection to a handfull of products. The user + can then use the mouse and click on the product to select. To click on product clears + the search. The default workflow remains usable for trained users. This new workflow + is deemed less efficient but has proven to help beginers. + """, + + 'author': 'Cooperative le Nid', + 'website': "http://www.lenid.ch", + 'license': 'AGPL-3', + 'category': 'Point of Sale', + 'version': '0.1', + 'depends': ['point_of_sale'], + 'data': [ + 'views/templates.xml', + ], +} diff --git a/pos_reset_search/static/description/icon.png b/pos_reset_search/static/description/icon.png new file mode 100644 index 00000000..3e885187 Binary files /dev/null and b/pos_reset_search/static/description/icon.png differ diff --git a/pos_reset_search/static/src/js/reset.js b/pos_reset_search/static/src/js/reset.js new file mode 100644 index 00000000..e26d2bdb --- /dev/null +++ b/pos_reset_search/static/src/js/reset.js @@ -0,0 +1,13 @@ +odoo.define('product_click_search_reset',function(require) { + "use strict"; + var screens = require('point_of_sale.screens'); + + screens.ProductScreenWidget.include( + { + click_product: function(product) { + var self = this; + this._super(product); + this.product_categories_widget.clear_search(); + }, + }); +}); diff --git a/pos_reset_search/views/templates.xml b/pos_reset_search/views/templates.xml new file mode 100644 index 00000000..87ff9702 --- /dev/null +++ b/pos_reset_search/views/templates.xml @@ -0,0 +1,9 @@ + + + + +