Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions pos_self_service_base/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
============================
Point Of Sale - Self-Service
============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-coopiteasy%2Faddons-lightgray.png?logo=github
:target: https://github.com/coopiteasy/addons/tree/12.0/pos_self_service_base
:alt: coopiteasy/addons

|badge1| |badge2| |badge3|

This is the base module for the implementation of POS as a self-service weighing station.
This module handles weighing/container taring and barcode formatting.
It is aimed to be used by several other modules:

* pos_self_service_print_zpl

**Table of contents**

.. contents::
:local:

Configuration
=============

Setup the self-service POS
~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Create a new POS
2. Enable "Is Self-Service"
3. Setup hardware proxy
* Enable electronic scale
4. Enable barcode reader and its nomenclature

Usage
=====

This module should be used from a computer accessible to customers.
In order to limit the risk of unfortunate/malicious actions, you should:

* **Use a dedicated odoo account with the least possible rights**
* Configure the web browser to be in kiosk mode (cf. "Launch Firefox" section)

Those measures aren't sufficient *per se*, but should lower the risk significantly.

Launch Firefox
~~~~~~~~~~~~~~

This self-service module can be used in kiosk mode. To launch Firefox in kiosk mode, run this command::

firefox <url> -foreground --kiosk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is foreground ?
I tested without, and it is launching in kiosk mode in the same way.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-foreground used to "Make this instance the active application.". I think it is now deprecated and will be removed from README


Known issues / Roadmap
======================

* Label printing using web print

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/addons/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/coopiteasy/addons/issues/new?body=module:%20pos_self_service_base%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Coop IT Easy SCRLfs

Contributors
~~~~~~~~~~~~

* `Coop IT Easy SCRLfs <https://coopiteasy.be>`_:
* Grégoire Leeuwerck <[email protected]>
* Vincent Van Rossem <[email protected]>
* `Le Nid <https://lenid.ch>`_:
* François Kawala
* `SPP <https://la-feve.ch>`_
* Icons made by Freepik from flaticon.com

Maintainers
~~~~~~~~~~~

This module is part of the `coopiteasy/addons <https://github.com/coopiteasy/addons/tree/12.0/pos_self_service_base>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions pos_self_service_base/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions pos_self_service_base/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2021 - Today Coop IT Easy SCRLfs (<http://www.coopiteasy.be>)
# - Grégoire Leeuwerck <[email protected]>
# - Vincent Van Rossem <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Point Of Sale - Self-Service",
"summary": "POS Self-Service Base Module",
"version": "12.0.1.0.0",
"category": "Point of Sale",
"author": "Coop IT Easy SCRLfs, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
"license": "AGPL-3",
"depends": ["point_of_sale", "pos_tare"],
"data": ["views/templates.xml", "views/pos_config_view.xml"],
"qweb": ["static/src/xml/pos_self_service.xml"],
"installable": True,
}
1 change: 1 addition & 0 deletions pos_self_service_base/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import pos_config
9 changes: 9 additions & 0 deletions pos_self_service_base/models/pos_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from odoo import fields, models


class PosConfig(models.Model):
_inherit = "pos.config"

iface_self_service = fields.Boolean(
string="Is Self-Service", help="Use that POS as self-service point"
)
7 changes: 7 additions & 0 deletions pos_self_service_base/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Setup the self-service POS
~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking : I think the the 2 lines are unnecessary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

points 1. and 2., right?

1. Create a new POS
2. Enable "Is Self-Service"
3. Setup hardware proxy
* Enable electronic scale
4. Enable barcode reader and its nomenclature
7 changes: 7 additions & 0 deletions pos_self_service_base/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* `Coop IT Easy SCRLfs <https://coopiteasy.be>`_:
* Grégoire Leeuwerck <[email protected]>
* Vincent Van Rossem <[email protected]>
* `Le Nid <https://lenid.ch>`_:
* François Kawala
* `SPP <https://la-feve.ch>`_
* Icons made by Freepik from flaticon.com
5 changes: 5 additions & 0 deletions pos_self_service_base/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This is the base module for the implementation of POS as a self-service weighing station.
This module handles weighing/container taring and barcode formatting.
It is aimed to be used by several other modules:

* pos_self_service_print_zpl
1 change: 1 addition & 0 deletions pos_self_service_base/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Label printing using web print
14 changes: 14 additions & 0 deletions pos_self_service_base/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This module should be used from a computer accessible to customers.
In order to limit the risk of unfortunate/malicious actions, you should:

* **Use a dedicated odoo account with the least possible rights**
* Configure the web browser to be in kiosk mode (cf. "Launch Firefox" section)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add : * hide the keyboard and mouse once the point of sale is launched ?

Those measures aren't sufficient *per se*, but should lower the risk significantly.

Launch Firefox
~~~~~~~~~~~~~~

This self-service module can be used in kiosk mode. To launch Firefox in kiosk mode, run this command::

firefox <url> -foreground --kiosk
52 changes: 52 additions & 0 deletions pos_self_service_base/readme/cups
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
upstream cups-reverse-proxy {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this file is in the readme part ?
Don't understand why it should be contained in this module.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it should be in pos_self_service_print_zpl (or simply removed since it's in pos_self_service_print_zpl/readme/CONFIGURE.rst)

server 127.0.0.1:631 weight=1 fail_timeout=60s;
}

server {
# server port and name
listen 8631;
listen [::]:8631;
server_name _;

# ssl log files
access_log /var/log/nginx/cups-access.log;
error_log /var/log/nginx/cups-error.log;


# increase proxy buffer to handle some Odoo web requests
proxy_buffers 16 64k;
proxy_buffer_size 128k;

location / {
proxy_pass http://cups-reverse-proxy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;

add_header 'Access-Control-Allow-Origin' "http://localhost:8000" always;
add_header 'Access-Control-Allow-Credentials' * always;
add_header 'Access-Control-Allow-Methods' * always;
add_header 'Access-Control-Allow-Headers' * always;
# required to be able to read Authorization header in frontend
add_header 'Access-Control-Expose-Headers' * always;

if ($request_method = 'OPTIONS') {
# Tell client that this pre-flight info is valid for 20 days
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
add_header 'Access-Control-Allow-Origin' "http://localhost:8000" always;
add_header 'Access-Control-Allow-Credentials' * always;
add_header 'Access-Control-Allow-Methods' * always;
add_header 'Access-Control-Allow-Headers' * always;
# required to be able to read Authorization header in frontend
add_header 'Access-Control-Expose-Headers' * always;

return 204;
}

# by default, do not forward anything
proxy_redirect off;
}
}
Loading