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>
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
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>
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>
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>
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>
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>
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>
The layout of the split bill screen is broken after the responsive pos ui.
This fixes the split bill screen and make it also responsive.
New classes are introduced because reusing proved to be very difficult.
One benefit of declaring a new classes (then styling them) is that we can
target the particular elements that we wanted to change without the concerns
that another elements are changed.
closesodoo/odoo#54529
X-original-commit: 51f0c6a1be912192d910d47b79ac2cb3c5b42784
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>