Commit Graph
218 Commits
Author SHA1 Message Date
Adrien Widart c8e6ab3c2b [FIX] pos_restaurant: distinguish product variants
When using a product attribute with a creation mode defined on "never",
the order sent to the kitchen doesn't consider the product attribute
value

To reproduce the issue:
(Use demo data)
1. Create a product P:
    - In variants, add the "size" attribute with at least two values
        - (Note that the creation mode of this attribute is "never")
    - Available in POS
        - Category: Miscellaneous
2. In Point of Sale, edit the "Bar" POS and enable:
    - Product Configurator
    - Order Printer (the Kitchen Printer must be working)
3. Start a POS session
4. Select a table and add:
    - 1 x P with a size value
    - 1 x P with another(!) size value
5. Send the order to the kitchen

Error: The printed order only contains one line: 2 x P with the first
size value selected

When checking if the current order has some changes, the lines summary
builrder does not distinguish the product variants

OPW-2698626

closes odoo/odoo#82316

X-original-commit: 911a178c99fe56c5f644083a0bb5e992a11f34ed
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-01-08 01:11:39 +00:00
Robin Heinz e34e8c36d7 [FIX] pos_restaurant: avoid double order in backend.
This fix removed the duplicates of an empty order when using the floor management. Before, when syncing order without order lines, it was creating an empty order in the backend.
When reloading the table, it was creating a new empty order, ignoring the previous one. That problem lead to empty unpaid draft order.

closes odoo/odoo#57952

Task-id: 2308862
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-01-05 13:44:55 +00:00
qsm-odoo 3490b998ee [FIX] web, *: fix the grab cursor not working on all browsers
*: web_editor, point_of_sale, pos_restaurant

The grab cursor is currently not working on all browsers (at least
Chrome Linux). The fallback rule does not even work, meaning that if
you type:

```
cursor: move;
cursor: grab;
```

Those browsers does not even use "move" as they see "grab" as valid but
use the "default" cursor.

This commit replaces our "grab" uses with a local cursor ensuring it
works.

Related to task-2431469

closes odoo/odoo#82093

X-original-commit: 23ebcca902781f2fa0f2381997be4f3d375385b5
Related: odoo/enterprise#23193
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-03 18:58:41 +00:00
Joseph Caburnay 1e15908622 [FIX] pos_{hr,restaurant}: show opening cash control popup at the right time
1. pos_hr: Show the popup when an employee is logged in.
2. pos_restaurant: Show the popup already in the FloorScreen, no need
to click a table to see the popup.

closes odoo/odoo#80268

X-original-commit: eacfd60b1acfb6b793ac9d65c1cf63c24930cf2e
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-11-23 17:53:49 +00:00
Adrien Widart e206b8a80e [FIX] pos_resturant: distinguish all order lines
In some cases, it is not possible to print the order changes

To reproduce the issue:
(Use demo data)
1. Point of Sale > Configuration > Order Printers, edit Kitchen Printer:
    - Printed Product Categories: Food
2. Edit the POS Bar:
    - Enable Order Printer
3. Start a session of POS Bar
4. Open table T1
5. Select a Food product and add a note
6. Submit the order to the kitchen
7. Select again the same product without any note

Error: The order button isn't green, it is not possible to sent the
second order line to the kitchen

The issue comes from the logic used in `computeChanges`:
https://github.com/odoo/odoo/blob/75fb0aa6e9c314b61b30d49b5c463fa126dfc835/addons/pos_restaurant/static/src/js/multiprint.js#L215-L222
`old_res` contains the products already sent to the kitchen
As a result, since the line from step 5 and the one from step 7 have the
same product, we consider that the new line (step 7) was already
present. Then, when comparing the quantities, both lines have their
quantity equal to 1, so we consider there isn't any information that
should be sent to the kitchen

OPW-2557518

closes odoo/odoo#80065

X-original-commit: fae786706977db4f9705eee055f4f804064784dd
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-18 21:45:50 +00:00
Romain EstievenartandAdrien Dieudonné 477a535e03 [FIX] pos_*: add missing translation flag
closes odoo/odoo#79448

X-original-commit: 1ace6a4a51a86922c9632614c4043e85f6ef1d6e
Related: odoo/enterprise#22146
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:50 +00:00
4bc7fbd720 [IMP] pos_restaurant: add zoom on floor screen
Add possibility to zoom on floor screen on mobile devices.
It should be more easy to navigate when there is a lot of
tables.

Task ID: 2453679

X-original-commit: 43fbe45d4f9fc43477690e3d2fb1bc1299f4824b
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 8174f77eb0 [FIX] pos_*: Only show 3 control-buttons in product screen on mobile
Before this commit, when you clicked on "Review" the order lines weren't
visible due to the number of control-buttons.

To fix this, a "More..." button is displayed if there is more than 3 buttons.
When you click on this button, a new modal will display a menu with all controls.
Note that we had to find a way to close this popup after clicking on an action.

Task ID: 2453679

X-original-commit: 430d40f90c1e9a7e8e3663e8f2b129b0c24911e1
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné a2ddef022f [IMP] pos_*: Ticket/Order kanban screens on mobile
Using a list view isn't the best way to display data on small screen.
We had to change this behavior to display a kanban view of orders.

We also merge design of "Ticket" screen and "Order Management" screen.

Task ID: 2453679

X-original-commit: d0e53721a97c14419a2f81ef8aa8be317cc5644a
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7334cd3086 [FIX] pos_restaurant: Reduce "Back to Floor" button size on mobile
The "back to floor" button is currently too big to be used on mobile
To fix this we have no choice but to display the table number only.
It would be good practice for this number to be unique; we will fix
the demo data in master branch.

This also fix a misalignment between arrow and text.

Task ID: 2453679

X-original-commit: 31dc371c824cee431072788faafb7f1dfd4a1335
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7594c055de [FIX] pos,pos_restaurant: Improve UX on Search products on small screen
The top of POS is too large and must be scrolled to be used.
To improve the UX, we remove the current search box and only keep the
icon and when the search icon is clicked, the search input is shown.

Task ID: 2453679

X-original-commit: e5d54ac1d30eef789ec1604e3a1212f415224ada
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:46 +00:00
Adrien Widart 9320b1b4f1 [FIX] pos_restaurant: submit order lines only once
This commit reverts [1]. Otherwise, the same order lines may be
submitted several times.

To reproduce the issue:
(Use demo data)
1. Point of Sale > Configuration > Order Printers, edit Kitchen Printer:
    - Printed Product Categories: Food
2. Edit the POS Bar:
    - Enable Order Printer
3. Start a session of POS Bar
4. Select table T1
5. Add a Bacon Burger and submit the order
6. Open another table
7. Reopen table T1
8. Add a Cheese Burger and submit the order

Error: The ticket sent to the kitchen has the bacon burger and the
cheese burger. Only the last one should be sent to the kitchen

When selecting a table, a RPC call gets all information about the
current order. In the server response, the orderlines are sent as new
records:
https://github.com/odoo/odoo/blob/629a4f34ea66f10a981f4b25d5d69281f62853b6/addons/pos_restaurant/models/pos_order.py#L88
Therefore, the orderlines will have a new ID. However, since [1], the
lines identifiers are used to know which lines have changed. This
explains why the bacon burger is sent twice.

[1] 8159e5ac93b18d147fc8688f1dc48f75cbd44a9b

OPW-2678701

closes odoo/odoo#79436

X-original-commit: 75fb0aa6e9c314b61b30d49b5c463fa126dfc835
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-05 16:03:07 +00:00
thcl-odoo 46f9a22690 [FIX] pos_restaurant: Order button should go green after unskip orderline
Expected behavior : The order button should go green and active when you 'unskipped' an orderline

Current behavior : The order button doesn't go green and can't be clicked when an orderline is 'unskipped'

Steps to reproduce the error :
First of all, you need to setup a PoS Restaurant with these options :
~ Bar/Restaurant
~ Enable `Table Management`
~ Enable and setup `Order Printer` with IP Address and choose Categories to be printed on.

1. Open a restaurant session
2. Pick a table
3. Select a product and put it on hold
4. Select the **same** product and order it
5. 'Unskipped' the product from step 3

Order button should be green and active but is unactive so the order can't be sent

Previously, the condition was only based on the product_id so error occurs when multiline of the same product are handled

opw-2557518

closes odoo/odoo#78850

X-original-commit: 8159e5ac93b18d147fc8688f1dc48f75cbd44a9b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-10-24 21:33:17 +00:00
Jacky (trj) 442f856bb8 [IMP] point_of_sale: opening cash control and closing session in POS UI
The opening cash control has been refactored and the closing of the session is now happening in the POS UI. This also leads to a cash control in the UI during the closing.

The advanced cash control is no longer a setting to activate in the config by the user but a computed field based on the presence of a cash payment method. We force the user to always have it now.

The opening cash control has been revamped with the addition of a new money calculator (`MoneyDetails`) allowing the user to easily compute how much money does he have based on his bills.

The closing control has been converted into a popup which allows the users to get an overview of his session details (about orders, payments, payment methods, cash moves, ...). If the `cash_control` has been set to `True`, the user still needs to count his money by introducing it or using the new calculator.

When trying to close the session, if it fails, depending on the error the user get, he can be redirected to the back end to manually close the session. At this point, the user is not able to open the POS UI.
(In order to fully bring the closing of the session in the front end, all the error handlings need to be brought to the front end as well which takes a lot more time.)

Rescue session can only be closed through the back end and the closing cash control is automatically being computed without the user's involvement. This avoid any cash profit/loss in the journals.

The session chatter is being logged with all the details regarding the opening and closing. This give the user a better view of his cash flow in a specific session.

task-2456424

closes odoo/odoo#73464

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-28 09:28:50 +00:00
Joseph Caburnay 92e70b8392 [IMP] point_of_sale,pos_*: refund orders thru POS UI
* Perform refunds in the POS UI.
* Select orderlines and quantity to refund.
* Add refund orderlines in the active order.

closes odoo/odoo#75322

Task-id: 2481561
Related: odoo/enterprise#20358
Related: odoo/upgrade#2753
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-31 17:11:56 +00:00
Joseph Caburnay a2ff6d5383 [IMP] point_of_sale,pos_*: combine ticket and management screens
We are referring to TicketScreen and OrderManagementScreen.
The two screens almost serves the same purpose. There is not much reason
to keep them separate. We combine the two in this commit. Basically,
we remove OrderManagementScreen and its components. Some are kept and
moved to the TicketScreen.

Task-id: 2481404
Part-of: odoo/odoo#75322
2021-08-31 17:11:56 +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
Pierre Masereel 5a620eded9 [FIX] pos_restaurant: don't mark order as printed
When the final receipt of an order is printed, the order is marked as
printed, as it can be then removed, and nothing can be added to it
anymore.

When the Bill is printed, we should not mark it as printed, as there
can be some modifications made after the bill is printed.

So as the bill receipt is an inherited object from the final receipt, we
have to change the behavior for the bill receipt to not mark the order
as printed.

OPW-2555272

closes odoo/odoo#74338

X-original-commit: 7504dd34557968b0ecfea0d5d2b0025516d1dda5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-27 17:26:31 +00:00
Robin Heinz 0ddb06b5ec [FIX] pos_restaurant: Fix bill receipt
When bill printing, the order was done instead of just going back to the order.
Now we don't validate the order anymore when showing the printbill receipt screen anymore.

closes odoo/odoo#72142

X-original-commit: 0e8d86238e56d7a248af340e13036444b0e49d4e
Related: odoo/enterprise#19007
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-12 07:49:00 +00:00
Robin Heinz e9b5556501 [FIX] pos_restaurant: fix kitchen ticket display with arabic
Printing a kitchen ticket with arabic product name lead to bad css layout.
The layout has been switched to make it no matter language is used.

closes odoo/odoo#73474

X-original-commit: 3ebfac79abb81a1ab5767c47fdc32f56b049b2df
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-09 09:26:10 +00:00
Romain Estievenart bfcea333d6 [FIX] pos_restaurant: Allow scroll on Floor screen
Steps to reproduce:

1. On small screen like mobile devices, open the pos app
   and start a bar/restaurant session;
2. You can't navigate on Floor screen => bug

To fix that we allow scroll on Floor screen

Task ID: 2453679

closes odoo/odoo#73333

X-original-commit: 15fea6aa56ec132734c21418798b7dd5903b10bf
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-07-06 16:57:26 +00:00
Romeo Fragomeli 21f4dbad38 [FIX] point_of_sale: print not working in Mobile App
Before this commit, "document.execCommand" was first
method used when attempting to print, due to a bug
in Safari for Windows (ndr. which is deprecated as
the last version of Safari for Windows is 5.1.7
from may 2012).

On the mobile App, the "document.execCommand('print')"
call returns "true" even if nothing has actually been
done, which therefore prevents from executing "window.print()".

After this commit, we execute directly "window.print()"
as it's supported by all modern browsers (except Firefox Android,
which doesn't support printing at all).

Notes:
* "document.execCommand" is deprecated and the "print" command isn't even documented
* Safari 5.1.7 doesn't support Promise/Async/Await, and therefore not Odoo 13+.

References:
* https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
* https://developer.mozilla.org/en-US/docs/Web/API/Window/print
* https://caniuse.com/?search=await
* https://caniuse.com/?search=promise
* https://apple.stackexchange.com/questions/68836/where-can-i-download-safari-for-windows

opw-2486818

closes odoo/odoo#71494

X-original-commit: a11662e525aad9a843acf54b717f3df18d8c2cab
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-05-31 12:33:26 +00:00
Jacky (trj) e921a2f2ce [REF] point_of_sale + pos_restaurant: adjusted code for German POS localization
These changes have been made to be able to add some behaviors in some specific points of the flow when overridden.

X-original-commit: 455f49fe74611849ee1ff6addc875352d1b6c386
2021-05-26 09:07:17 +00:00
Jorge Pinna PuissantandSamuel Degueldre 9a76719893 [FIX] *: undeclared variables and restricted globals
closes odoo/odoo#69988

Related: odoo/enterprise#17991
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-05-04 13:32:49 +00:00
Joseph Caburnay 3d36ee40c2 [FIX] point_of_sale: translation issue in the ticket screen
The terms in the search bar of the ticket screen are not translated.
This commit fixes this issue by passing the translated form of the
terms to the search bar component.

closes odoo/odoo#66959

X-original-commit: 11d7daa481c05e56228e5b1bbf1ed1c0fe57e774
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-26 18:16:03 +00:00
Jacky (trj) 5dd5fdb6d3 [IMP]: pos_restaurant: table shows ratio between taken seat and max seat
This change allows the user to see how many seats are already taken in a table.

Task ID: 2419637
2021-02-25 09:47:50 +00:00
Jacky (trj) 13843f8545 [IMP]: point_of_sale UI: NumberPopup and NumberBuffer can pre-select input which will change the value upon triggering a key
The user doesn't need to delete the current input before changing it. He can now write
hiw new value which will erase the current one.
The guest popup from the `pos_restaurant` module and the global discount popup from the
`pos_discount` module benefit from this and have their input pre-selected.

Before: when opening the guest or discount popup, the user always has to delete the curent
value before changing it. Let's say that the current value was `5`, the user needs to either
press the `Delete` or `Backspace` button/key before entering his new value.

After: the user doesn't need to press the `Delete` or `Backspace` button/key and can now directly
enter his new value

Task ID: 2419637
2021-02-25 09:47:50 +00:00
Goffin Simon a7fc92dab2 [FIX] pos_restaurant: Impossible to print bill
Steps to reproduce the bug:

1. Install PoS
2. Change the Shop type to "Bar/restaurant" (into its setting) then save
3. Go into the newly created "Bar" settings
4. Enable "Direct devices" (with any IP)
5. Open a session on Bar
6. Pick a table
7. Ignore the "Connection to the printer Failed" error
8. Take a coca
9. Click on the "Bill" button
10. On the Bill Printing screen, pick "Print"

Bug:

A traceback was raised

opw:2382350

closes odoo/odoo#62790

X-original-commit: 00ba9d2d244314ee09ffefb616f9bc3a26027092
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-12-03 09:57:49 +00:00
Joseph Caburnay 85b9dbaa45 [FIX] pos_restaurant: order remained after deletion
There is a situation in pos_restaurant such that when an order
is deleted from the ticket screen, it persists to show when the
table is opened. To reproduce:

1. Create an order in T1 then add items to it.
2. Get out of the table (back to floor).
3. Open ticket screen.
4. Delete the order in T1.
5. Close the ticket screen.
6. Open T1, the order is still there (bug).

This commit fixes this behavior such that in step 6, new order should
show and not the deleted order.

Note that we also made a change in the template in order to allow
checking the number of synced orders during testing. We want to make
sure that the table is clicked when the sync finishes to prevent
concurrency issue during testing.

closes odoo/odoo#62488

X-original-commit: e6e2a7392a5dd518c3f0df1c1ac0f90b0cba78f4
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-11-27 09:30:03 +00:00
Antoine Prieels 798621ae5f [FIX] pos_restaurant: Order change receipts alignment
The alignment of quantity and product name was off when the product
name was split into multiple lines.

opw-2360424

closes odoo/odoo#60547

X-original-commit: 58404f299f7fa9128758b4b7830a6393c64ad085
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-10-22 14:21:22 +00:00
Joseph Caburnay be9c8fa303 [FIX] pos_restaurant: table and guests in the receipt
X-original-commit: b87e210d87e71e40d88b0d9f4ca824651651bd8b
2020-10-12 07:55:15 +00:00
Nasreddin (bon) 5c27b57ef9 [FIX] pos_restaurant: Error when adding product after printing the bill
Issue

	- Install "Point of sale"
	- Create a new one.
	- Activate the "Is a Bar/Restaurant" feature and save
	- Activate the "Bill Printing" feature then save
	- Start a new session
	- Add a product A
	- Click on "Bill" then "Print"
	- Then click on "Ok" to go back to order
	- Add a product B

	Error is raised ("Cannot read property 'add_product' of null").

Cause

	Trying to add a product to an order who is destroyed
	if the bill has been printed.

Solution

	If the bill is printed (and not the receipt), set '_printed' of
	the current order to 'false', therefore it will add the product
	to the current order.

opw-2341115

closes odoo/odoo#59465

X-original-commit: 6683a9929d68be956854000fa9b3e9f99ceecdfb
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-08 08:28:01 +00:00
Joseph Caburnay fd4a42a7d6 [FIX] pos_restaurant: remove ambiguity to prevent runbot error
This random runbot error happens when the tour manager is steps ahead of
the rendering:
1. clicks Second Floor button
2. checks T1 - this won't fail even if the Second Floor hasn't finished
rendering because Main Floor has tables that start with `T1`.
3. clicks a table in Main Floor with T1 in name
4. Then error because the back to floor button should be Second Floor.

Tables that start with `T1` is created in Main Floor during the tour,
however, we also have one in Second Floor. To make sure that the runbot
correctly waits and clicks for the right table, we use T3 in Second
Floor instead of it's T1.

closes odoo/odoo#59170

X-original-commit: 8e65a220cadefe41df9fcc2172d60ff90ea5b584
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-06 06:25:36 +00:00
Joseph Caburnay 0cf51928ac [FIX] pos_restaurant: runbot random error on clicking table
Checking the log of the runbot error, there is an extra `create_from_ui`
rpc call for `restaurant.floor`. This is because when table T4 is clicked,
it is still an `EditableTable`. It is possible that the full rendering after
toggling edit mode isn't complete and the tour proceeds because it sees
table T4 in the dom, when in fact the table we want to click should not be
`EditableTable` instead a `TableWidget`. This is random because the tour
may proceed as long at it sees the trigger element, even if the owl
rendering is not finished.

In this commit, we make sure that we click the correct element which is an
unselected table. So we check if table T4 is unselected before clicking
table T4 to open the product screen.

To reproduce, follow instructions here: https://gist.github.com/caburj/ef311076a24d898132ed9c6b99367581

closes odoo/odoo#58151

X-original-commit: 238a65f59202d279d2c9327dd7937f125d80175b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-09-21 14:42:20 +00:00
Joseph Caburnay 359d0990ab [FIX] pos_restaurant: random fails when transferring order to other table
To transfer an order from one table to another, we first select the order,
then we click the 'transfer button', then we are shown the table selection.
The moment we click the 'transfer button', two simultaneous rpc's are made
for the same method (`create_from_ui`). This method deletes and recreates
the orderlines in database. The 2nd request fails because of the deletion.
But despite the failure, the server retries the rpc after a random amount
of time in sec: `wait_time = random.uniform(0.0, 2 ** tries)`.
If the user immediately (within the `wait_time`) clicks the new table where
the order is to be placed, the problem happens - the transfer of order to
the new table fails. This is because of the 3rd rpc whose result is used
for the actual order transfer. If the 3rd rpc happens before the retry of
the second, the transfer fails.

The randomness of `wait_time` (time-to-retry rpc) results to the random
runbot error. The solution is to prevent the 2nd (redundant) request
because it is not actually needed. This commit tries to accomplish that.

closes odoo/odoo#57370

X-original-commit: af7e7899124d2d8e3d4526d7de1c93158878f6e6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-09-09 14:27:10 +00:00
Joseph Caburnay cab75e7969 [FIX] pos_restaurant: order management screen random runbot error
Initial rendering of order management screen shows the list of orders
based on the previous render. This is done so that during fetching of
new orders from the server, a list of orders are already shown.

This optimization causes a random runbot error when transferring an
order from one table to the other. The moment the order management
screen is open, it will render orders with the old table, but right
after fetching of orders, the listed orders are immediately updated.

To rectify the random error, we modify the test so that instead of
immediately clicking the transferred order, we wait for its new table
to show before selecting it.

closes odoo/odoo#57104

X-original-commit: 713dd3777ca0ce9d121d5162a3d63de3237509f4
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-09-04 14:27:25 +00:00
Antoine Prieels a8a6a2d498 [FIX] pos_restaurant: Print Tip receipt from web browser
It was only possible to print the tip receipts through an IoT Box.
If no IoT Box is configured, we now show the browser's dialog.

X-original-commit: 4b48109bb414b4768712d0e5d8706fd0088bef4b
2020-09-03 15:14:23 +00:00
Joseph Caburnay a654fdf839 [FIX] pos_restaurant: check product screen, not floor screen
After clicking a table, ProductScreen should show, not FloorScreen.

closes odoo/odoo#57025

X-original-commit: 0a9f6f81525b12e6e3b30eb6d875c8f36db509ee
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-09-03 11:36:40 +00:00
Joseph Caburnay d8e210e8e1 [FIX] point_of_sale,pos_restaurant: remove step_delay in pos test tours
Tours with `step_delay` potentially hide errors because of missing tour steps.
This is mainly caused by unfinished renders within the `step_delay` between
two steps. It is possible that the render after the 1st trigger is not yet
finished but the 2nd step trigger already existed in the screen. Because the
render result of 1st step is late and the 2nd step is already triggered, the
3rd step will fail. Note that the 3rd step will occassionally fail because
render of the 1st step is most of the time faster than step_delay but
there is no guarantee that the render is always faster because of occassional
cpu slow downs.

Runbot will eventually catch these tour errors which it did with the ticket
screen tour.

In this commit, we removed the `step_delay` in the pos tours. We also
supplemented the missing step in the ticket screen tour which was the cause
of random runbot error when there was `step_delay`.

We also figured that value property of input element is not observed by the
tour service's mutation observer, which result to an indeterministic error
in a step in tip screen. To fix this, we introduce an attribute to the input
element which is used in the step trigger.

closes odoo/odoo#56961

X-original-commit: 2ef73bb64cd0730d1e078a47f2ea9e1290b0df6c
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-09-02 13:56:44 +00:00
Antoine Prieels 3f138b9d3c [IMP] point_of_sale, pos_*: Enable HTTPS in POS
HTTPS had been disabled on SaaS to allow the use of the IoT Box that
had no valid SSL certificate. As of V13.0, IoT Boxes connected to
Enterprise DBs have a valid certificate. POS can then use HTTPS.

Nginx is configured to redirect all requests to `/pos/web` to HTTP,
so we change the POS URL to `/pos/ui`, except when using a Six
payment terminal as it only works in HTTP.

closes odoo/odoo#56933

Taskid: 2191878
X-original-commit: 8aee4992778fee5e2f146c4cff8b35e83c7f56b3
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-09-02 10:53:34 +00:00
Antoine Prieels bbc3f70ece [IMP] pos_restaurant: Open tabs Usability
Improve usability of open tabs in the POS.

closes odoo/odoo#56785

X-original-commit: bbe80dcb30c1f5f028bf05cd14a514c627f4ee92
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-31 09:16:46 +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 96e27f0900 [FIX] point_of_sale,pos_*: indeterministic tour tests failures
closes odoo/odoo#56062

Related: odoo/enterprise#12487
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-19 07:34:04 +00:00
Joseph Caburnay 18651864dd [FIX] pos_restaurant: selectedTable can change during user input
In this commit, we make sure that the selectedTable doesn't change
even during the popup is shown to the user. During testing, there might
be rouge clicks that click the .floor-map element which deselects the
selected floor, making the value of this.selectedTable to be false,
causing runtime error.
2020-08-19 07:34:04 +00:00
Joseph Caburnay 9cf8da90d5 [FIX] pos_restaurant: should show product screen after tip screen
If floor screen (iface_floorplan) is not active in the pos.config,
product screen should follow the tip screen and not an error.

closes odoo/odoo#55998

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-17 14:08:29 +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 9ea0aca6ea [IMP] point_of_sale,pos_*: top bar improvements and ticket list
The following changes are made in this task:

1. Remove order tabs and replace with ticket list.
2. Top bar color change.
3. Search bar in the product screen is moved in the top bar.
4. List of sub-categories are now in the same line as the category
breadcrumbs.

closes odoo/odoo#55100

Task-id: 2276678
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-05 13:35:08 +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