diff --git a/pos_empty_home/README.rst b/pos_empty_home/README.rst deleted file mode 100644 index adfd8384..00000000 --- a/pos_empty_home/README.rst +++ /dev/null @@ -1,60 +0,0 @@ -.. 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 - Empty Home -========================== - -This module extends Odoo Point Of Sale features, displaying an empty home page -at the start of the Point of Sale, or when no search is done and no category -is selected. (when root category is selected) - -This module is interesting to avoid to display useless products, when user did -not yet realized a search. (Default displayed products are just the first -eighty products) - -It can limits errors to avoid users to select undesired product. - - -.. image:: /pos_empty_home/static/description/pos_empty_home.png - :width: 800 px - -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 smash it by providing detailed and welcomed feedback. - -Credits -======= - -Contributors ------------- - -* Sylvain LE GAL - - -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_empty_home/__init__.py b/pos_empty_home/__init__.py index 40a96afc..e69de29b 100644 --- a/pos_empty_home/__init__.py +++ b/pos_empty_home/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/pos_empty_home/__openerp__.py b/pos_empty_home/__manifest__.py similarity index 65% rename from pos_empty_home/__openerp__.py rename to pos_empty_home/__manifest__.py index d9188764..fc3bc301 100644 --- a/pos_empty_home/__openerp__.py +++ b/pos_empty_home/__manifest__.py @@ -1,24 +1,24 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2017-Today: La Louve () +# Copyright (C) 2020-Today: Druidoo () # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Point of Sale - Empty Home', - 'version': '9.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Point Of Sale', - 'summary': 'Hide products at the start of the Point of Sale', + 'summary': ''' + Point of Sale - Hide products at the start of the Point of Sale''', 'author': 'La Louve, GRAP, Odoo Community Association (OCA)', - 'website': 'http://www.lalouve.net/', + 'website': 'https://github.com/OCA/pos', 'license': 'AGPL-3', 'depends': [ 'point_of_sale', ], 'data': [ - 'static/src/xml/templates.xml', + 'views/assets.xml', ], 'qweb': [ 'static/src/xml/pos_empty_home.xml', ], - 'installable': True, } diff --git a/pos_empty_home/i18n/ca.po b/pos_empty_home/i18n/ca.po index ab730ca6..acb8db53 100644 --- a/pos_empty_home/i18n/ca.po +++ b/pos_empty_home/i18n/ca.po @@ -6,7 +6,7 @@ # Marc Tormo i Bochaca , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 12.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-06-09 03:08+0000\n" "PO-Revision-Date: 2017-06-09 03:08+0000\n" diff --git a/pos_empty_home/i18n/fr.po b/pos_empty_home/i18n/fr.po index f4fc6b93..c9e82616 100644 --- a/pos_empty_home/i18n/fr.po +++ b/pos_empty_home/i18n/fr.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 12.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-05-05 09:32+0000\n" "PO-Revision-Date: 2017-05-05 09:32+0000\n" diff --git a/pos_empty_home/i18n/pos_empty_home.pot b/pos_empty_home/i18n/pos_empty_home.pot index daea5c3b..1c7a3122 100644 --- a/pos_empty_home/i18n/pos_empty_home.pot +++ b/pos_empty_home/i18n/pos_empty_home.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 12.0c\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" diff --git a/pos_empty_home/readme/CONTRIBUTORS.rst b/pos_empty_home/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..61ae03c1 --- /dev/null +++ b/pos_empty_home/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Sylvain LE GAL +* Druidoo diff --git a/pos_empty_home/readme/DESCRIPTION.rst b/pos_empty_home/readme/DESCRIPTION.rst new file mode 100644 index 00000000..2ef81113 --- /dev/null +++ b/pos_empty_home/readme/DESCRIPTION.rst @@ -0,0 +1,13 @@ +This module extends Odoo Point Of Sale features, displaying an empty home page +at the start of the Point of Sale, or when no search is done and no category +is selected. (when root category is selected) + +This module is interesting to avoid to display useless products, when user did +not yet realized a search. (Default displayed products are just the first +eighty products) + +It can limits errors to avoid users to select undesired product. + + +.. image:: ../static/description/pos_empty_home.png + :width: 800 px diff --git a/pos_empty_home/static/src/js/db.js b/pos_empty_home/static/src/js/db.js index e7366ce2..c25c3734 100644 --- a/pos_empty_home/static/src/js/db.js +++ b/pos_empty_home/static/src/js/db.js @@ -1,5 +1,6 @@ /* Copyright (C) 2017-Today: La Louve () + Copyright (C) 2019-Today: Druidoo () @author: Sylvain LE GAL (https://twitter.com/legalsylvain) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */ @@ -12,13 +13,13 @@ odoo.define('pos_empty_home.db', function (require) { PosDB.include({ get_product_by_category: function(category_id){ - console.log(this.config); - if (category_id != 0){ + if (category_id != 0) { return this._super(category_id); - } - else{ + } else { return []; } }, }); + + return PosDB; }); diff --git a/pos_empty_home/static/src/js/screens.js b/pos_empty_home/static/src/js/screens.js index d2c6c781..31ad788a 100644 --- a/pos_empty_home/static/src/js/screens.js +++ b/pos_empty_home/static/src/js/screens.js @@ -1,5 +1,6 @@ /* Copyright (C) 2017-Today: La Louve () + Copyright (C) 2019-Today: Druidoo () @author: Sylvain LE GAL (https://twitter.com/legalsylvain) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */ @@ -13,12 +14,13 @@ odoo.define('pos_empty_home.screens', function (require) { screens.ProductListWidget.include({ renderElement: function() { this._super(); - if (this.product_list.length == 0){ + if (this.product_list.length == 0) { this.el.querySelector('.product-list-empty-home').style['display'] = 'block'; - } - else{ + } else { this.el.querySelector('.product-list-empty-home').style['display'] = 'none'; } }, }); + + return screens; }); diff --git a/pos_empty_home/static/src/xml/pos_empty_home.xml b/pos_empty_home/static/src/xml/pos_empty_home.xml index 0c87636c..cae44ab4 100644 --- a/pos_empty_home/static/src/xml/pos_empty_home.xml +++ b/pos_empty_home/static/src/xml/pos_empty_home.xml @@ -1,6 +1,7 @@ diff --git a/pos_empty_home/static/src/xml/templates.xml b/pos_empty_home/views/assets.xml similarity index 84% rename from pos_empty_home/static/src/xml/templates.xml rename to pos_empty_home/views/assets.xml index 4d3e9ebd..bbfacfa3 100644 --- a/pos_empty_home/static/src/xml/templates.xml +++ b/pos_empty_home/views/assets.xml @@ -1,6 +1,7 @@ @@ -8,14 +9,11 @@ - -