presik_pos/INSTALL

334 lines
9.4 KiB
Plaintext

Installation of Tryton POS Client pySide6
====================================
This version is only compatible with Tryton 6.0+, it is assumed that the user has
previous basic knowledge about Tryton installation and configuration,
especially the official modules related to accounting and sales.
is not the purpose of this guide to deal with basic configuration issues.
To be able to install Tryton POS Client pySide6 the following packages are required
packages installed on the system:
On Debian, Ubuntu and Derivatives, it is recommended to use: $ apt install package.
* Python 3.10 or later (http://www.python.org/)
* python-setuptools
* python3-dateutil
* python3-pip
* libusb-1.0-0
* libusb-1.0-0-dev
* libcups2-dev
* gcc
* python-dev
* python3-dev
* python3-pil
The following packages must be installed using PIP
pip3 install pyusb
pip3 install pillow
pip3 install qrcode
pip3 install paramiko
pip3 install orjson
pip3 install escpos
pip3 install PySide6
pip3 install psutil
pip3 install setproctitle
For Windows add:
pip install pywin32
pip install win32printing
Note that some packages must be installed with pip for python3.
Note: the POS Client has been partially tested on Windows for the moment, so there is no guarantee that it will
so there is no guarantee that it will work 100% on this OS.
It is recommended to install Tryton 6.0 by creating a virtual environment with
virtualenv.
The following modules must be installed in the Tryton database
database and must be configured to 100% (more on configuration later).
will be explained later).
The modules should be installed roughly in the order in which they are listed from top to bottom, starting with
listed from top to bottom, starting with Official, and then the Presik modules.
Presik.
Official Modules
----------------------------------------------------------------------------
* trytond_account (http://www.tryton.org/)
* trytond_account_invoice (http://www.tryton.org/)
* trytond_stock (http://www.tryton.org/)
* trytond_sale (http://www.tryton.org/)
* trytond_sale_price_list (http://www.tryton.org/)
* trytond_sale_invoice_grouping (http://www.tryton.org/)
* trytond_account_statement (http://www.tryton.org/)
* trytond_sale_discount (http://www.tryton.org/)
Hint, install in the virtual environment using:
$ pip3 install trytond_module
Enter the directory and install (inside the virtual environment)
previously created):
$ python3 setup.py install
Unofficial Modules (Presik)
----------------------------------------------------------------------------
* trytonpsk_sale_shop (https://bitbucket.org/presik/trytonpsk_sale_shop)
* trytonpsk_sale_pos (https://bitbucket.org/presik/trytonpsk_sale_pos)
* trytonpsk_product_onebarcode (https://bitbucket.org/presik/trytonpsk_product_onebarcode)
* trytonpsk_sale_salesman (https://bitbucket.org/presik/trytonpsk_sale_salesman)
* trytonpsk_sale_pos_frontend (https://bitbucket.org/presik/trytonpsk_sale_pos_frontend)
* trytonpsk_sale_co (https://bitbucket.org/presik/trytonpsk_sale_co
Enter the directory and install (inside the previously created virtual environment)
previously created):
Hint, download the packages from bitbucket using in the terminal:
$ git clone package
Then install:
$ python3 setup.py install
Note: Verify all the above modules are in the correct version,
if any of them has a different version the POS will not work.
DATABASE CREATION AND SALES CONFIGURATION
----------------------------------------------------------------------------
It is assumed that you have previous knowledge about Tryton, so we will summarize the steps as follows
will summarise the steps:
- Create a database
- Install the official modules in the database:
* Administration > Modules > Modules
- Install the Presik modules:
* Administration > Modules > Modules
- Create the Company, Fiscal Year, Chart of Accounts, Payment Methods, etc.
Configuration of the Sales Module (especially sale_shop, sale_pos)
- Create an Account Statement Ledger:
Accounting > Configuration > Account Statements > Account Statement Books.
In the Sales module > Configuration:
- Create a "Shop" (Shop)
- Create a "Sales Terminal" and assign at least one Ledger to it.
Ex: Cash
In Third Parties:
- Create the "Third Party" that will be used in the POS and assign it to the default shops.
- Create at least one "Employee" (who will be used as a salesperson when the sale requires it).
requires it)
In the Administration module:
- Create a POS user, in:
"Administration > Users > Preferences".
Assign him the shop, and the sales terminal created earlier,
Also verify that this user has "Access Permissions" for the Sales module.
Sales module.
Also in the tab "Access Permissions" check the fields:
User POS Frontend [X]
User Delete POS Sales [X].
This last one is optional if applicable.
POS CLIENT INSTALLATION AND CONFIGURATION
----------------------------------------------------------------------------
Download the POS Client, using the hg clone command:
https://bitbucket.org/presik/presik_pos
This will give you the latest development version.
Download the NEO microframework, developed by presik:
https://bitbucket.org/presik/neo
Install it inside the main presik_pos folder,
the directories should look like this:
|__psk_pos
|__app
|__doc
|__commons
Put the downloaded folder somewhere in your /home/user/application directory.
Create the directory ".tryton" in the user's HOME directory, example
if my user's name is "pedro", the path should look like this:
/home/pedro/.tryton
Copy the file "config_pos.ini" from the downloaded package to the created ".tryton" directory.
created ".tryton" directory
At the end of the process it should look like this:
/home/myuser/.tryton/config_pos.ini
The config_pos.ini file defines the configuration information for the
the configuration information of the sales terminal, and the connection parameters.
If the file is wrong or with any error it is likely that the client will NOT work or will generate errors.
POS Configuration File
--------------------------------
The following explains the main fields in this configuration file.
configuration file:
# mode valid http or https
mode=http
The mode must be based by api service.
server=192.168.X.XX
The server to which the terminal is to connect.
port=8000
The connection port
database=DEMO40
The name of the database created
user=admin
The default user for the sales terminal, this user must have permissions to enter the terminal.
The default user for the terminal is admin.
The following format is used to configure the printer:
printer_sale_name=interface,printer_routine
There are three valid interfaces: usb, cups, network and ssh (in this case install openssh-server).
Examples
printer_sale_name=usb,/dev/usb/lp0
printer_sale_name=cups,EPSON-TM-T20
printer_sale_name=network,192.168.0.1 #optional linux network,192.168.0.1:4242 if service socat available
printer_sale_name=ssh,user@password@ipofthepictorquiporemote@port@/dev/usb/lpX
Device ID:
device_id=BOX-10
The Id number of the box to be connected as it was created in Tryton, under
Sales Terminals, to find it you must use the tools button,
and click on the option "View Registration...", in the Shop form.
Make a sale from Tryton without POS
-----------------------------------
So at this point without the need for the POS Client you should be able to
able through the Tryton 6.0 client, to make sales:
>> Sales > POS Sales
In case you are not able to make sales through this module you probably won't be able to do them through the
you probably won't be able to make sales through the POS Client either.
Remember that to start making sales you must first open the "Account Statements" through the Wizard.
Wizard in the Sales Module:
>> Sales
> Account Statements
> "Open Account Statements".
And at the end of the cashier's day/shift you should go to the same route and
"Close Account Statements", in order for Tryton to post the payments and to mark the
the payments and mark the invoices as paid.
Running the Presik POS Client
------------------------------
Before executing the client it is very important to verify that Tryton
is perfectly configured and allows to make sales by the created user.
Before running the client you must make sure that the server is running.
running. To run the client go to the directory
"presik_pos" directory and run:
$ python3 pospro
Basic POS Client Handling
-----------------------------
The POS client works with product codes, so products that do not have a code cannot be
products that do not have a product code cannot be entered.
To test the system you must create a saleable product type "Item", with code.
saleable, with a code.
Press the F1 key to see the main keyboard shortcuts.
* Enter products:
To enter a product, type the product code, and press the [+] key.
* End sale:
Press the [enter] key twice, which will prompt the system for the value to be paid.
value to be paid. In the top bar in the information field.
* Enter payment:
Enter the value in banknotes, customer's payment coins, and press the [+] key,
to confirm the payment.
* Print Invoice:
If the printer is properly configured, the printing of the invoice is automatic,
If there is no printer, the system will allow you to continue to the next sale,
if you want to reprint the invoice use the [F7] key.
Any bugs or errors can be reported on bitbucket. For further
or additional support, you can contact me: oscar.alvarez.montero@gmail.com