Browse Source

Lint fix + readme.

pull/489/head
Francois Kawala 4 years ago
committed by François Kawala
parent
commit
63e988fdda
  1. 75
      pos_reset_search/README.rst
  2. 33
      pos_reset_search/__openerp__.py
  3. 19
      pos_reset_search/static/src/js/reset.js
  4. 12
      pos_reset_search/views/templates.xml

75
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
<https://github.com/OCA/{project_repo}/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
<https://github.com/OCA/
pos/issues/new?body=module:%20
pos_reset_search%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
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.

33
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,
}

19
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();
},
});
});
});

12
pos_reset_search/views/templates.xml

@ -1,9 +1,7 @@
<odoo>
<data>
<template id="assets_backend" name="pos_reset_search" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script type="text/javascript" src="/pos_reset_search/static/src/js/reset.js"></script>
</xpath>
</template>
</data>
<template id="assets_backend" name="pos_reset_search" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script type="text/javascript" src="/pos_reset_search/static/src/js/reset.js"></script>
</xpath>
</template>
</odoo>
Loading…
Cancel
Save