Commit Graph
36 Commits
Author SHA1 Message Date
roen-odoo 944e442b68 [FIX] pos_coupon, pos_restaurant : Promotion program
Current behavior :
When you add a promotion campagn to a PoS the promotion is applied
on every line of every order everytime you load the order. This cause situations
where you have multiple discount for a single product.

Steps to reproduce:
- create a standrard promotion program (automatically applied, 10%)
- set that promotion on the PoS (bar)
- open a session, chooses a table and make an order --> promotion correctly applied
- get out of the table and go back to the same table --> 2 additional lines are created because of the promotion

opw-2699544

closes odoo/odoo#81096

X-original-commit: 72d6431eb26654b697fc0379f4b6d7e305bb79fc
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-09 10:27:02 +00:00
lejeune quentin 74e185cfe1 [IMP] point_of_sale: Authorizes the uses of POS in HTTPS with direct devices
To avoid the use of certificates when using direct devices
POS was redirected in HTTP

With new Chrome or Edge security measures this is no longer possible.

We add here the possibility to choose to redirect
the POS in https by adding a specific key in the parameters

closes odoo/odoo#78247

X-original-commit: 9cecb3bdbf5679b6d1d18dc2a250c86118bca6ce
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2021-10-12 17:03:41 +00:00
Jacky (trj) 629a4f34ea [IMP] point_of_sale: Added customer_note on order lines
In some use cases, the seller in point of sale needs to add a note on an
order line that has to be displayed on the receipt. So we've added a
field on the order line to set a note.

The note is also set on the invoice if the order is invoiced.

closes odoo/odoo#71598

Task-id: 2556994
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-03 06:16:37 +00:00
lejeune quentin 6565a037d2 [IMP] pos_*: Use the POS in http under specific conditions
Because there are some restrictions with the HTTPS and trusted certificates
We forward, in some cases,  the POS and the POS RESTAURANT to a specific url.

HTTPS: /pos/ui
HTTP: /pos/web

To allow rules for webserver

We make this change when we check 'Direct Devices'
And when we use a 'Order Printer' type 'epson_epos'

closes odoo/odoo#74239

Tasks: 2597021
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-26 12:05:16 +00:00
Adrian Torres 679185f3e8 [IMP] *: replace all raises inside unlink by api.ondelete
With this commit, all instances of errors being raised inside
`BaseModel.unlink` overrides are moved into methods decorated with
`api.ondelete` which is safer.
2020-12-04 09:16:16 +00:00
Anh Thao Pham (pta) 8dcb312650 [FIX] point_of_sale, pos_restaurant: fix full product name
- Go to Point of Sale > Configuration > Attributes and create an Attribute:
  * Attribute Name: Attribute X
  * Variants Creation Mode: Never
  * Attribute Values: Value Y, Value Z
- Create a Product (i.e. Product X) available in POS with the created Attribute and Values
- Configure a POS and enable the following options:
  * Is a Bar/Restaurant
  * Product Configurator
- Open POS Session and select a table (i.e. Table 1)
- Select Product X and a value for Attribute X
- In the order summary, the value of the attribute appears after product name
- Go to Floor plan
- Go back to Table 1
The values of all attributes don't appear anymore in order summary

In POS front-end, when adding a product, the name of all chosen attributes values
are registered in a variable named "description".
The full product name displayed in the order summary is generated from display_name
of the product and this "description" variable.
When moving to floor plan, ongoing orders are saved in DB and reloaded when moving
back to a table.
As "description" is not saved, regenerating full product name from display_name of
product and "description" is not possible.
However the generated full product name is saved in DB and can be retrieved.

opw-2371965

closes odoo/odoo#61266

X-original-commit: df3061f6e8061cf039bf083f649b7585c8c31df4
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-03 13:24:16 +00:00
Antoine Prieels 3b5f0e198b [IMP] pos_restaurant(_adyen): Keep tab open
As long as the payment is not validated, the cashier can add products
to the order, even if the payment has been completed. The amount
authorized can be adjusted if the payment interface implements the
canBeAdjusted method.

closes odoo/odoo#56656

Taskid: 2117032
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-27 13:22:04 +00:00
Antoine Prieels 379e4f0a72 [ADD] pos_restaurant_adyen: Tipping on the receipt
The amount is authorized when the customer scans its card, then the
customer writes the tip on the receipt and the total amount is captured
when the waiter manually inputs the tip, either right after or at the
end of the day.

closes odoo/odoo#56148

Taskid: 2321771
Related: odoo/upgrade#1661
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-21 12:41:10 +00:00
Joseph Caburnay 7f06412484 [FIX] point_of_sale,pos_restaurant: tipping workflow
This commit fixes the tipping workflow. It includes the following changes:
1. Instead of directly setting tip when clicking a tip amount in tip screen,
we set the input amount to that selected tip. Then we introduce validate
validate button to confirm setting of tip.
2. The tip screen is only shown for non-cash payments. This behavior can be
overridden in extension module in cases where the showing of the tip screen
is only available for certain type of payments.
3. We introduce a way a settle tips for multiple orders in the ticket list.
When the user filters by 'Tipping' status, an editable tip-amount column
appears which can be editted for each order. When tip amounts are final,
settle button will set tip for each order in tipping status.

closes odoo/odoo#56198

Task-id: 2322683
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-21 10:41:49 +00:00
Joseph Caburnay b0107e9230 [IMP] pos_restaurant,point_of_sale: set tip after payment
1. Introduce an option in restaurant config to allow setting tips after payment.
2. Tip form is shown in bills so the customers can choose/set their tips.
3. Validated orders are kept in TipScreen (access via TicketScreen) so that at the
end of the day, the user/cashier can set the tips for each validated order.

closes odoo/odoo#55488

Task-id: 2117029
Related: odoo/upgrade#1606
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-12 09:17:34 +00:00
Joseph Caburnay b2f8170d88 [IMP] point_of_sale,pos_*: allow users to manage orders in the pos frontend
We now allow invoicing of finalized orders in an open session in this first
iteration of order management in the pos frontend. Additionally, receipt
reprinting is also introduced. With this feature, we can now reprint the
receipt of old orders.

closes odoo/odoo#51141

Task-id: 1981354
Related: odoo/enterprise#11690
Related: odoo/upgrade#1472
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-17 10:00:04 +00:00
Joseph Caburnay 86bca35df0 [FIX] pos_restaurant: floors deleted without notice
Floors associated to the pos.config are deleted when is_table_management
is set to False from the backend interface because the backend issues a delete
request to the server. So instead of setting the [(5,0,0)] command during
onchange, we set it in write method to avoid unintended deletion of the floors.
2020-06-26 05:40:23 +00:00
Joseph Caburnay 67e148c20f [IMP] point_of_sale: various pos backend views and pos ui improvements
TASK-ID: 2230195
2020-06-26 05:40:23 +00:00
Robin Heinz b366501148 [IMP] point_of_sale: Back2Basics.
Allow the user to archive the payment methods and the floor plans.
Change some typo.
Allow manager to have access to the cash closing control wizard.
Allow the user to set cash in or out in the wizard.

closes odoo/odoo#45719

Task-id: 2125227
Related: odoo/enterprise#8562
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-17 13:49:10 +00:00
Robin Heinz 9a0a793026 [IMP]point_of_sale: Allow to modify pos config
Before, when a session was open, we couldn't change any of the options in the pos config.
Now, we're able to change most of the options except those which would lead to incorrect behavior.

closes odoo/odoo#40500

Task-id: 2086823
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-04-06 12:08:35 +00:00
Pierre Masereel d8cde5969f [FIX] pos_restaurant: improve performance retrieving table orders
Since synchronization of tables was added in POS restaurant,
requests are frequently made to the server to display the
number of open orders on each table.

The implementation of the counting caused O(num_tables) queries,
and those queries were slow on large databases because there
was no index for the `table_id` column.

This patch fixes both problems, and the counting now uses
3 fast queries regardless of the number of tables.

On a sample database with 2k tables and 50k POS orders,
calls to `get_tables_order_count` went down
from 1 s and 100+ SQL queries to 10 ms and 4 queries.

About 2 orders of magnitude faster, with server load drastically
reduced as well.

closes odoo/odoo#44782

X-original-commit: 6c21ea369dc247b3ab31b767315c48ffc8d40a3d
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-02-06 17:26:45 +00:00
Antoine Prieels 029ee8dc0d [FIX] point_of_sale: Lost payment info
Payment information for terminal transactions (payment_status,
transaction_id & card_type) was lost when going back to the floor
plan in pos_restaurant. Validated transactions were then considered as
not processed yet.

closes odoo/odoo#43550

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-01-20 14:06:13 +00:00
Robin Heinz 99615ff6cc [FIX] pos_restaurant: double printing not allowed.
Before this, when we printed a ticket for the kitchen, if we went back to the table management and go back to the order, we could re print the same product.
Now, we can only reprint the order if there is something different.

closes odoo/odoo#42208

Task-id: 2123029
X-original-commit: c8f604045eb0d476766641386c4e5e1605b915c3
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-12-24 14:27:11 +00:00
Gert Pellin ca57ecf446 [FIX] point_of_sale: fix order naming translations
Before this fix translations of the order names missed a crusial space
that is needed to get information out of it in the front-end.

* Load Spanish-PE translation.
* Change localization preference for a user (either admin or demo) to
Spanish.
* Login to Odoo POS using the user with spanish localization.
* Go to POS, select BAR POS, select a table and place a draft order
with at least 1 order line (do not proceed to payment)
* Go back to table mgmt view and click again to the previous selected
table and the error appears.

This issue happens in any translation where pos_reference for a draft
order is not separated with white space as it happens in English. I mean
in english the pos_reference is something like "Order 00003-001-0002"
but in spanish it is "Pedido00003-001-0002" (no whitespace), so
https://github.com/odoo/odoo/blob/13.0/addons/pos_restaurant/models/pos_order.py#L143
assumes that there will always be a whitespace which is not true for
some odoo translations like spanish one.

This fix adds a variable to the translation string making it more clear
the space is part of the string. To make sure the code will also work on
languages with the words in another order `order['pos_reference'].split(' ')[1]`
is replaced by `search(r"\d{5}-\d{3}-\d{4}", order['pos_reference']).group(0)`,
we know the uid will always be formatted as nnnnn-nnn-nnnn

solves #40036

closes odoo/odoo#40302

X-original-commit: c32126da5ac55a03637d82cf520b8655be8546e6
Signed-off-by: Gert Pellin - GPE <switch87@users.noreply.github.com>
2019-11-14 18:11:55 +00:00
Pierre Masereel 52b3daf260 [FIX] pos_restaurant: floor plans deletion
When you try to delete a floor, an error is raised if a pos config has
an opened session. Even if the floor is not used in the opened pos
config.

The real goal of this constraint is to avoid deleting a floor plan
linked to a pos config having an opened session.

Github issue: https://github.com/odoo/odoo/issues/38581

closes odoo/odoo#38719

X-original-commit: 9ec5a4c0126db767e17fc352fa184e0ee2bcc7e7
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-14 13:03:57 +00:00
Odoo's Mergebot 70a65b0132 [ADD] pos_adyen: generic payment interface and Adyen integration
This does two things:

- Makes it easy to implement new electronic payment methods in the POS by extracting a generic payment interface from the `pos_iot` enterprise module, and
- Uses this new interface to implement Adyen's Point of Sale Terminal API

For more info see individual commits.

Internal task: https://www.odoo.com/web#id=1981799&model=project.task&view_type=form&menu_id=

closes odoo/odoo#35702

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-28 10:57:36 +02:00
Pierre Masereel 73d877eef2 [FIX] point_of_sale, pos_restaurant: order sequence
WHen you are creating a draft order, the sequence is not saved on the
server, and when we load the orders from the server the session id is
not correct too.

This leads to having inconsistant sequence numbers in the POS, almost
when we are synchronizing orders through the pos restaurant.

We now show the orders sequence number prefixed by login number when the
order is synchronized and don't have the same login number as current.

TASK-ID: 2057436

closes odoo/odoo#36032

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-27 09:45:04 +00:00
Joren Van Onder aefe33735b [IMP] point_of_sale,pos_restaurant: move tipping to point_of_sale
You don't only tip in restaurants. In e.g. the US you can tip at a
barber shop.

It's not a big change since all the fields were already in
point_of_sale anyway.
2019-08-23 13:33:28 -07:00
Antoine Prieels 380c933a1d [ADD] pos_epson_printer_restaurant: Use Order printer without IoT Box
Add possibility to print orders on an ePOS compatible Epson receipt
printer located in the same local network than the browser running the
pos.

TaskID: 2033442
2019-08-20 12:19:19 +02:00
Gert Pellin 118190f3b3 [IMP] point_of_sale, pos_restaurant: multi-user sessions
PURPOSE
=========

When working in restaurants, there are often more than one waiter working on the same floor.
But Odoo doesn't support that.
There can only be one person working on one session for the same tables.
The purpose of this task to allow several people to work on the same session (while synchronizing sessions).

SPECIFICATIONS
===============

- MultiUser is active by default.
- Allow multiple waiters to login on one PoS Config.
- All waiters login to the same session, the waiter that does the paiment is the responsible for the order (same as now).
- Synchonize the information across the multiple instances running on same floors.

Syncronisation will take place at switch of table.
(close tables automaticly if no activity, to force sync)

- Syncro cannot be done if no internet : how do we manage it ? We should inform the user the internet connection has been lost and that synchro cannot be done. What impacts? To check

Useful links
https://github.com/it-projects-llc/pos-addons
https://apps.odoo.com/apps/modules/11.0/pos_bus_restaurant/

Related PR:
odoo#32789

TASK-ID: 1891130

closes odoo/odoo#33973

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-19 14:15:25 +00:00
Pierre Masereel 761f695e0d [FIX] pos_restaurant: fix typo
Forgot to remove unused function with pudb in a248171d96

closes odoo/odoo#35822

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-19 17:53:02 +00:00
Pierre Masereel a248171d96 [IMP] point_of_sale: improve consistencies between models
The deletion of some records can create inconsistencies in the
point_of_sale.

It can create inconsistencies when a session is open, for example if you
delete a partner that can be set on a pos order. You'll also got
problems if you remove an employee and this employee can be used in an
open session.

We also avoid to get point_of_sale config inconsistencies, by deleting
models required by it. If you delete a picking type used in a pos
config or a sequence.

To avoid all this consistencies, we have restricted the deletion of some
records in specific cases.

TASK-ID: 1879971

closes odoo/odoo#35793

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-19 08:04:31 +00:00
Gert Pellin ace7766971 [FIX] pos_restaurant: missing fields note, mp_skip
The note and mp_skip field of pos.order.line only exist in the frontend
application, this causes errors in some task of the PoS and IoT teams.

This pr adds the fields to the database, resolving these problems.

closes odoo/odoo#34210

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-06-18 08:50:13 +00:00
Xavier Morel 66f0e26f6f [CHG] *: make binary fields default to attachment=True
Check that it makes custom binary fields into attachment as that's the
main reason for the change: when users create binary fields via Studio,
they're necessarily db-stored (as the interface doesn't allow altering
the attachment attribute and it's unclear how we'd handle users
switching it on/off every time), which significantly bloats their
database (and burns storage & backup space), especially as the primary
use case for binary fields is adding images and documents to records.

* check that binary fields are properly created as attachment=True
* add attachment=False on fields where that seems relevant (most but not
  all of the fields previously using the default)
* remove occurrences of attachment=True

closes odoo/odoo#29308
2018-12-07 13:37:34 +00:00
Nimesh Jethva afb512a660 [IMP]pos_*: Improvement in model description
Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
2018-09-21 11:45:15 +02:00
Kinjal Mehta 1db7018095 [IMP] point_of_sale,pos_mercury,pos_sale,pos_restaurant: changed duplicate field label in the same model 2018-01-04 17:56:55 +05:30
Mansi Gandhi 80e89c7a11 [IMP] point_of_sale: Add new settings form per POS
Purpose: Replace POS APP settings with a clean POS Form settings,
         one per POS

    - add state button for (active/inactive) archive/unarchive and remove boolean field.
    - remove 'Reprint Receipt' field from pos_reprint module and related code.
    - remove 'Multi-currencies' field and related code.
    - put 'Company' field under the 'Taxes' block and 'Sales Channel' under the 'Pricing' block.
    - add 'save' buttons to install needed modules manually.
    - removed constrains and set default fiscal value on fiscal position ids even if that not selected.
    - change the skip Receipt Screen label to a more appropriate one.
    - Tax help only appears when Tax-included is selected.

    * [IMP] point_of_sale: Removing multiple prices prod

    Purpose: The choice of the method for "Multiple price per product" was
    not appropriate for the Point Of Sale. Only the choice of the Pricelist
    make sense. So, only the Pricelist can be choosen in the POS config.

    * [IMP] point_of_sale, pos_discount, pos_restaurant:
            Generic module install

    Purpose: Before this improvement, some fields were used in pos.config to
             automatically install some modules.
             This fix tries to mimic the ResConfigSettings transient so that
             when a field starts with 'module_', it's automaticaly
             installed.
2017-08-07 14:24:45 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Darshan Kalola 3de847afd8 [MIG] pos_restaurant : migration to new api
During migration, remove 'set_background_color' method, to directly use js api.
2016-05-31 09:20:11 +02:00
Jérome Maes 284e62def9 [MOV] pos_restaurant : slip file per models 2016-05-31 09:20:10 +02:00
Darshan Kalola 65fce907f2 [MOV] pos_restaurant : reoganize module directory 2016-05-31 09:20:10 +02:00