From 63e988fdda61fb5e858480da3b0f3f17dc8ef6a4 Mon Sep 17 00:00:00 2001 From: Francois Kawala Date: Wed, 22 Jan 2020 11:04:18 +0100 Subject: [PATCH] Lint fix + readme. --- pos_reset_search/README.rst | 75 +++++++++++++++++++++++++ pos_reset_search/__openerp__.py | 33 ++++------- pos_reset_search/static/src/js/reset.js | 19 +++---- pos_reset_search/views/templates.xml | 12 ++-- 4 files changed, 100 insertions(+), 39 deletions(-) create mode 100644 pos_reset_search/README.rst diff --git a/pos_reset_search/README.rst b/pos_reset_search/README.rst new file mode 100644 index 00000000..52e13373 --- /dev/null +++ b/pos_reset_search/README.rst @@ -0,0 +1,75 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================================================== +Point of Sale - Reset search when user clicks on product +======================================================== + +The POS search workflow is to type-in the product name until there is only one product left to be selected. Then the user will select the product by typing on the "enter" key. To select a clears the search. This workflow is very efficient but it requires training. + +This add-on complete the POS search workflow for beginners. This add-on enables users to search and narrow down the product selection to a handful of products. The user can then use the mouse and click on the product to select. To click on the product clears search. The default workflow is still usable for trained users. + +This new workflow is deemed less efficient but has proven to help beginners. + + +Installation +============ + +Normal installation. + +Configuration +============= + +No configuration required. + +Limits / Roadmap +================ + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/184/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed `feedback +`_. + +Credits +======= + +Authors +------- + +* Le Nid +* CoopITEasy + +Contributors +------------ + +* François Kawala + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/pos_reset_search/__openerp__.py b/pos_reset_search/__openerp__.py index 4dd0ab51..b15b2d62 100644 --- a/pos_reset_search/__openerp__.py +++ b/pos_reset_search/__openerp__.py @@ -1,30 +1,19 @@ # -*- coding: utf-8 -*- +# @author: François Kawala +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': "pos_reset_search", - - 'summary': """ - Reset search after click on product.""", - - 'description': """ - The POS search workflow is to type-in the product name until there is only one - product left to be selected. Then the user will select the product by typing on - the "enter" key. To select a clears the search. This workflow is very efficient - but it requires training. - - This add-on complete the POS search workflow for beginners. This add-on enables - users to search and narrow down the product selection to a handful of products. - The user can then use the mouse and click on the product to select. To click on - product clears search. The default workflow is still usable for trained users. - - This new workflow is deemed less efficient but has proven to help beginners.""", - - 'author': 'Cooperative le Nid', + 'name': "Point of Sale - Clear product search on click", + 'version': '9.0.0.0.1', + 'category': 'Point of Sale', + 'summary': 'Point of Sale - Clear product search when user clicks on a product.', + 'author': "Le Nid, Odoo Community Association (OCA)", 'website': "http://www.lenid.ch", 'license': 'AGPL-3', - 'category': 'Point of Sale', - 'version': '0.1', - 'depends': ['point_of_sale'], + 'depends': [ + 'point_of_sale', + ], 'data': [ 'views/templates.xml', ], + 'installable': True, } diff --git a/pos_reset_search/static/src/js/reset.js b/pos_reset_search/static/src/js/reset.js index e26d2bdb..ba2ebaa8 100644 --- a/pos_reset_search/static/src/js/reset.js +++ b/pos_reset_search/static/src/js/reset.js @@ -1,13 +1,12 @@ -odoo.define('product_click_search_reset',function(require) { - "use strict"; - var screens = require('point_of_sale.screens'); +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(); + screens.ProductScreenWidget.include({ + click_product: function (product) { + var self = this; + self.super(product); + self.product_categories_widget.clear_search(); }, - }); + }); }); diff --git a/pos_reset_search/views/templates.xml b/pos_reset_search/views/templates.xml index 87ff9702..0e85725b 100644 --- a/pos_reset_search/views/templates.xml +++ b/pos_reset_search/views/templates.xml @@ -1,9 +1,7 @@ - - - +