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
closesodoo/odoo#82316
X-original-commit: 911a178c99fe56c5f644083a0bb5e992a11f34ed
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
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.
closesodoo/odoo#57952
Task-id: 2308862
Signed-off-by: Masereel Pierre <pim@odoo.com>
*: 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
closesodoo/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>
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.
closesodoo/odoo#80268
X-original-commit: eacfd60b1acfb6b793ac9d65c1cf63c24930cf2e
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
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
closesodoo/odoo#80065
X-original-commit: fae786706977db4f9705eee055f4f804064784dd
Signed-off-by: Masereel Pierre <pim@odoo.com>
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>
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>
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>
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>
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>
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
closesodoo/odoo#79436
X-original-commit: 75fb0aa6e9c314b61b30d49b5c463fa126dfc835
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#78850
X-original-commit: 8159e5ac93b18d147fc8688f1dc48f75cbd44a9b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
closesodoo/odoo#73464
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
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.
closesodoo/odoo#71598
Task-id: 2556994
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
closesodoo/odoo#74338
X-original-commit: 7504dd34557968b0ecfea0d5d2b0025516d1dda5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#72142
X-original-commit: 0e8d86238e56d7a248af340e13036444b0e49d4e
Related: odoo/enterprise#19007
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#73474
X-original-commit: 3ebfac79abb81a1ab5767c47fdc32f56b049b2df
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
closesodoo/odoo#73333
X-original-commit: 15fea6aa56ec132734c21418798b7dd5903b10bf
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
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
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.
closesodoo/odoo#66959
X-original-commit: 11d7daa481c05e56228e5b1bbf1ed1c0fe57e774
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
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
closesodoo/odoo#62790
X-original-commit: 00ba9d2d244314ee09ffefb616f9bc3a26027092
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
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.
closesodoo/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>
The alignment of quantity and product name was off when the product
name was split into multiple lines.
opw-2360424
closesodoo/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>
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
closesodoo/odoo#59465
X-original-commit: 6683a9929d68be956854000fa9b3e9f99ceecdfb
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
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.
closesodoo/odoo#59170
X-original-commit: 8e65a220cadefe41df9fcc2172d60ff90ea5b584
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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/ef311076a24d898132ed9c6b99367581closesodoo/odoo#58151
X-original-commit: 238a65f59202d279d2c9327dd7937f125d80175b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/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>
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.
closesodoo/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>
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
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.
closesodoo/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>
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.
closesodoo/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>
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.
closesodoo/odoo#56656
Taskid: 2117032
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#56148
Taskid: 2321771
Related: odoo/upgrade#1661
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#56198
Task-id: 2322683
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
If floor screen (iface_floorplan) is not active in the pos.config,
product screen should follow the tip screen and not an error.
closesodoo/odoo#55998
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#55488
Task-id: 2117029
Related: odoo/upgrade#1606
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#55100
Task-id: 2276678
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#51141
Task-id: 1981354
Related: odoo/enterprise#11690
Related: odoo/upgrade#1472
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>