Browse Source

Reset product search when product is selected with mouse.

pull/443/head
François Kawala 5 years ago
parent
commit
6d7cd4504e
  1. 1
      pos_reset_search/__init__.py
  2. 29
      pos_reset_search/__openerp__.py
  3. BIN
      pos_reset_search/static/description/icon.png
  4. 13
      pos_reset_search/static/src/js/reset.js
  5. 9
      pos_reset_search/views/templates.xml

1
pos_reset_search/__init__.py

@ -0,0 +1 @@
# -*- coding: utf-8 -*-

29
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',
],
}

BIN
pos_reset_search/static/description/icon.png

After

Width: 1571  |  Height: 1690  |  Size: 90 KiB

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

9
pos_reset_search/views/templates.xml

@ -0,0 +1,9 @@
<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>
</odoo>
Loading…
Cancel
Save