*: pos_online_payment_self_order,pos_restaurant,pos_self_order
Previously, when self order was set to "pay after each" and a user
ordered an order with a total of $0.00, the order was not automatically
set to paid status, as is the case with point_of_sale.
Now, when the self order is set to "pay after each" and an order with a
total of $0.00 is placed, it will be automatically paid.
Minor fixes:
- A props has been removed from `ReceiptHeader` because it was causing
an error in debug mode.
- In point_of_sale, when an order was placed with a total of $0.00, an
error was raised during validation because no payment method was
selected. Now, before checking this payment method, we first check
whether it exists.
closesodoo/odoo#139555
Related: odoo/enterprise#49442
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
pos*: l10n_es_pos, point_of_sale, pos_hr, pos_loyalty, pos_online_payment,
pos_online_payment_self_order, pos_restaurant, pos_sale, pos_self_order
In this commit we refactor all the pos tours.
Changes:
- Removed the `startSteps`, `getSteps` functions as they were
no longer serving a purpose. We now simply put the tours steps
in the array returned by the function given to `steps`. We
apply `flat()` to this array in order to be able to provide both
single steps and arrays containing multiple steps;
- removed the classes from the tours. Now each helper function
is simply exported from it's file and is consumed as `import * as myHelpers`;
- removed the `do`, `check`, `exec` subpaths as they were not providing
a clearer api. The functions themselves already have descriptive names.
( writing `ProductScreen.do.clickHomeCategory()` is not clearer than
`ProductScreen.clickHomeCategory()` )
- formatted all files.
closesodoo/odoo#139317
Task: 3565443
Related: odoo/enterprise#49313
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Before, a receipt was automatically generated in the mobile self order
and the confirmation screen would glitch when it was generated.
Now this receipt is only generated in kiosk mode and the confirmation
screen no longer glitches due to a hidden overflow.
closesodoo/odoo#139625
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Some layout change of res_config_settings_views.xml to make it more
readable.
Now, important parameters are on the top of the page.
closesodoo/odoo#139287
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Previously, QR codes could only be obtained by printing an A4 page.
The problem The problem was that some customers would want to create a
specific design and get the raw image of the QR code directly.
A button has now been added to the settings to download a zip file
containing all the QR codes in PNG format.
---
A change has been made to the restaurant table form to enable editing of
the access ID. editing of the access ID. This is useful if a customer
has reset his QR codes and wishes to put them back.
---
Previously, the "close" button in the table selection popup didn't work.
This has been corrected with this PR.
---
Small design change to the display of products that don't have an image
in the selfOrder.
Part-of: odoo/odoo#139287
When implementing the Stripe terminal in a device that will be used by
end-users, we need to ensure that it is the server that will validate
the data and not Javascript as is the case in Point of Sale.
Nevertheless, we're using the Javascript SDK for the connection to the
terminal, as we don't want to add a Python dependency to the Odoo server
How the SDK works:
During initialization, we create a terminal via the `create` function.
This function will receive as argument a function that generates a
unique token with a precise lifetime managed by the SDK. These tokens
must be supplied only to trusted devices, such as the kiosk, accessible
only if we have `access_token` from the `pos_config`.
Then, when making a payment, we make a request to the Odoo server to
create a Stripe payment request from the backend, connect the terminal
to the frontend via the `connectReader` function and send it the payment
request via the `collectPaymentMethod` function, passing it the
`client_secret` sent by the Odoo server.
We then use the `processPayment` function once the customer has
presented his payment card to finalize the payment on the terminal.
Finally, we call the `capturePayment` function, which contacts the Odoo
server to validate the amount and payment. If this is the case, it will
mark the order as paid and send a message via websocket to the kiosk to
display the confirmation page.
During these various stages, trust is placed in the server and not in
the frontend.
Stripe Javascript SDK documentation:
https://stripe.com/docs/terminal/references/api/js-sdkclosesodoo/odoo#138646
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
In this commit, we improved a few UI elements across pages.
Product List Page:
Moved the category title to a gray section for clearer spacing and
strengthened the association between category names and respective products.
Product Variant Page:
Fixed an issue where long variant text would overlap with other variants
and thus we adjusted the height of variants based on the tallest content
in the row. All variants on the same row are now consistently sized.
Cart Page:
Condensed product lines for better mobile viewing and to reduce the need
for excessive vertical scrolling.
Footer:
We renamed a few strings and move the order total to the right, also
cart now displays 0.00 even when empty
task-3557715
closesodoo/odoo#139072
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit allows to share kiosk orders with all pos_configs. A new pos_session
boolean attribute is added to check if there is a kiosk config in the company.
In point_of_sale and pos_restaurant, if the company they belong to contains
a kiosk config, the ticket_screen will retrieve the kiosk draft orders.
closesodoo/odoo#138264
Related: odoo/enterprise#49294
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
In this commit, we add the tracking_number of an order as a searchable
field in the ticket_screen. This is useful when using pos_self_order
for example. If a mobile is made with service at table and pay at
cashier after each order, the cashier can search the order by its
tracking_number in the history of orders.
closesodoo/odoo#139187
Related: odoo/enterprise#49200
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
In this commit, we remove the resume section for the attribute_selection
as it can lead to a lot of screen for the end-user (especially if the
attribute_selection is used in a combo). We add the add to cart button
instead with a quantity selector. The end resume is kept for the combo
selection.
Part-of: odoo/odoo#139187
In this commit, we change the way the order_widget acts. Now, if we are
in mobile with pay after meal, the order_widget will show 'To Order'
instead of 'To Pay' when clicking on 'Order Now' for a second time
and the order button will be disable until a new line is added. To see
what is already sent to the waiters, we can click on the 'My Order'
button in the landing page which will display the cart.
Part-of: odoo/odoo#139187
In the self, when clicking on the information tag on a product, the
product_info_popup is displayed. In this popup, the user has
the possibility to add the product to its cart. However, the
quantity is always set to 1. This commit adds a quantity selector
to the product_info_popup so that the user can choose the quantity
he wants to add to its cart. For the products that have attributes or
are combos, the quantity selector is not displayed as it will be
displayed later in the process after clicking on add to cart.
Part-of: odoo/odoo#139187
*point_of_sale, pos_self_order, pos_self_order_epson_printer
In this commit we introduce the functionality that allows
the pos_self_order module to generate receipts.
At the moment, this is possible by using Epson Printers via HTTP.
This is done through the use of the newly added bridge module
`pos_self_order_epson_printer`.
In order to generate the data required for the receipt we add more data
on the first load of the kiosk ( such as company information ) and
also in the `_export_for_self_order` method.
Printing is done through the `printer` service from POS.
closesodoo/odoo#137397
Task: 3487638
Related: odoo/enterprise#48304
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Change of domain applied when clicking on the "home buttons" button of
a self order, now showing buttons linked to its pos_config + those
linked to no pos_config.
Part-of: odoo/odoo#138897
If a pos_config has no category restrictions and receives a product with
no category, a default category named "uncategorised" will be created.
Technical change: previously, categories were grouped according to their
name, the problem being that if two categories had the same name, this
would cause problems; now they are grouped by their ID.
Part-of: odoo/odoo#138897
Before this commit, the table number was not displayed on the
confirmation page of the POS Self Order app. This is due to two PR being
merged at the same time, one that removed the field from the model and
the other using it. This is now fixed by using another field instead of
the removed one.
closesodoo/odoo#138895
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Online payment method added to kiosk. This works in the same way as in
the mobile SelfOrder, except that the payment page does not open
automatically in the kiosk. A QR code appears and the user is asked to
scan it to make the payment on their phone.
Once the QR code has been scanned, the page on the kiosk updates to show
"payment in progress", and once the payment has been validated, the
validation page appears on the kiosk. These different statuses are sent
via websocket.
closesodoo/odoo#138825
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
pos*: point_of_sale, pos_self_order
In this PR, we improve the tracking_number computation decreasing the
number of string manipulation and increasing the number of int manipulation
in the backend. In the frontend, the computation of the tracking_number
was wrong. It was previously taking the whole session id and concatenate
it with the whole sequence number. We also fix that. It now takes the
last digit of the session id and the 2 last digits of the sequence number.
We also improve the payment_screen. Now, when the user arrives on the
payment_screen. If there is only 1 payment method. This payment_method
will be chose by default.
We also fix the display of the tracking number in the order reminder
page in pos_self_order.
Enterprise PR: odoo/enterprise#48991closesodoo/odoo#138813
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Before this commit, the order history page needed a small ui improvement
The amount and tax were initially separated using justify-content-between
, placing the title on the left and the amount on the right.
To align with Odoo's aesthetics and achieve a ticket-like look, they are
now right-aligned in a table. Additionally, based on feedback, spacing
around the ticket has been removed and the layout has been a little bit
revamped for a cleaner appearance.
task-3500874
closesodoo/odoo#138828
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Previously, when a table was selected on a floor plan other than the
first, clicking on back brought you to the first floor plan, not the
one of the previously selected table.
Now, when you click on the back button, you return to the floor plan
corresponding to the previous table.
Also, the order number is now displayed on the floor screen button.
closesodoo/odoo#138013
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Before, when ordering on the kiosk/mobile, no confirmation page was
displayed, only a notification.
Now, a confirmation page displays the tracking number, the amount paid
and, if present, the customer's table...
Part-of: odoo/odoo#138013
This commit consist of adaptation of the pos_self_order module to send
orders to preparation display. The main changes consist of sending the
table stand number that the client put in to the backend to be shown
in the preparation display. It also consist of moving the tracking
number from the pos_self_order module to the point_of_sale module so
that every number has a tracking number.
closesodoo/odoo#134980
Task-id: 3495477
Related: odoo/enterprise#47203
Signed-off-by: David Monnom (moda) <moda@odoo.com>
This commit introduce the information button on the product card in the
self order mode. This button open a popup with the newly created field
"description_self_order" which is an HTML field allowing the user to
have a very customizable description for the product.
It also removes the description_ecommerce field from the product view
form as it is a field used in the website and not adapted for
the backend (css/js not compatible).
closesodoo/odoo#138216
Task-id: 3512835
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
**Steps to reproduce**
- Open general settings of pos.
- Select/Create a Point of Sale that is kiosk to see the `Splash screens` field.
- The field is pre-filled with 3 images.
- ISSUE: Try removing the images and save, they won't be removed.
**FIX**
- This is because of the `write` operation made from the `res.config.settings`
model to the `pos.config`.
- When removing an image, the field will be given `link` commands, linking the
remaining images. This is wrong because it won't unlink the images that are
deleted.
- To ensure the deletion, we reinterpret the command to the splash screen images
field if the command comes from the res.config.settings.
- We introduce a context called 'from_settings_view' such that it's set to
true when the write is from the `res.config.settings` view.
- And specific to the pos_self_order, we compute the items that should be
unlinked and we append the unlink commands to the original set of commands
for the splash screen field.
closesodoo/odoo#137819
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
The summary is a short char field. It should not contain carriage
returns.
The description is the longer text field.
Remove unnecessary spaces in both.
Automatically dedent the description to avoid this issue poping up
again in future modules.
closesodoo/odoo#138214
Related: odoo/enterprise#48695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This PR contains a few adaptations and fixes after the major design
refactoring.
closesodoo/odoo#137704
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Previously, mobile self-order was not available when restaurant mode was
deactivated.
Now it's possible to activate self-order mode without the restaurant
option activated. Self-order will then be forced to "pickup zone" mode
and pay after "each order".
---
Previously, when the self-order was closed, a popup indicating this
appeared in full screen.
Now, this popup has been replaced by a banner at the top of the screen,
so that the self-order can still be used in read-only mode.
---
Previously, when the kiosk was loaded and there was no product available
in the pos_config, a traceback was raised. Now, when we are in this
case, we display a message indicating to first add products in full
screen.
---
Fixed a traceback when trying to start the POS by clicking on the image
of the landing page. The function start() had been removed. It is now
restored.
closesodoo/odoo#137671
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Steps to reproduce:
- Activate "Eat in / Take away" (`pos_self_ordering_takeaway`) setting.
- Set the alternative fiscal position.
- ISSUE: When selecting take away in the app, the take away price is not shown.
FIX: The issue is because during the loading of the products, only the default
price is computed. In this PR, we are now computing the take away price as well.
And in the ui, depending on the choice, we are showing the correct price.
closesodoo/odoo#137653
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
**Steps to reproduce:**
- Create a fiscal position that maps to a different tax.
- Use that fiscal position as alternative fiscal position for the "Eat in / Take
away" setting.
- Create a "Take Away" order from the self-ordering app (kiosk or mobile).
- ISSUE: Send the order to the database (by "Pay at Cashier" or "Pay").
- Check the order and it doesn't have correct fiscal position resulting to
wrong amounts in the lines.
**FIX:** When creating the order, we make sure the correct fiscal position is
set. Also, we precompute `is_take_away` variable which is used in many places of
processing the order.
closesodoo/odoo#137669
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Replace all the calls to get_resource_path to the better file_path or
directly use file_open when not needed
Doing both a get_resource_path and file_open means checking twice that
the file exists.
Doing a simple path concatenation before a file_open is safe.
If given to another method (e.g. etree.parse), calling file_path is
the prefered method.
Note that get_resource_path used to return False when the file does
not exists while file_path/file_open raises a FileNotFoundException
closesodoo/odoo#135607
Related: odoo/upgrade#5187
Related: odoo/enterprise#47475
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This reverts commit 3b9401c354.
It shouldn't have been merged in the first place. The PR was `r-` but it
seems like the mergebot bugged and still merged it because there was an
occurence of `r+` in the sentence which asked robodoo to `r-`.
> robodoo r- just to be sure, since there was a random r+ not [...]
Rationale of the revert:
- Bad field name:
- "ecommerce" in product module
- "ecommerce" but used in POS
- Arguably very low value to share the field -> This field is used in
ecommerce to add info exactly between the price and the name of a
product. There is low chance that you want to share that exact
information with the POS.
- Technically, it couldn't work. What you design in website builder on
the product page is related to website assets JS and CSS, which are
not loaded neither in the backend and neither in the POS.
It was leading to multiple critical issues, mainly:
- Losing the whole style of the content (CSS)
- Breaking completly the snippets (visually and design wise) (CSS/JS)
- Not even show (JS is in charge of showing the content eg)
Note that the same issues were already existing in that field in the
backend (it's shown in the product form view). The ecommerce team was
looking for a solution to make it work, but it's impossible as to work,
it would need the website / frontend assets, which can't be loaded in
the backend / POS.
The cancel of this PR was validated with PO of POS and ecommerce
following those explanation, which they weren't aware of.
Apart from this revert, further PR will be done to:
1. Remove the field from the product form view (ecommerce app)
2. Create a new field for POS
Revert of https://github.com/odoo/odoo/pull/136906
task-3524272
closesodoo/odoo#137514
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
After merging of the mobile and kiosk app for self order
(https://github.com/odoo/odoo/pull/136051), the pay after selection that
requires the "upgrade to enterprise" label was misplace. This fix restores the
misplaced label.
closesodoo/odoo#137413
Signed-off-by: David Monnom (moda) <moda@odoo.com>
List of improvements:
- Product list button is now configurable and not hardcoded. Demo data
is updated accordingly. When a new `pos_config` is created the button is
created with the default value "Order Now".
- Fix error 403 error when `pos_session` is not in opened state.
- The `order_widget` display now the number of items to order when all
items are not ordered yet and the total amount to pay and the count when
all items are ordered.
- The `order_widget` button no longer displays the order price.
Mobile mode:
State of order_widget button on `product_list_page`...
..when configured in meal mode, no online payment:
- With new orderlines: "Order"
- Witout new orderlines: "Order"
..when configured in meal mode with online payment:
- With new orderlines: "Order"
- Without new orderlines: "Order"
..when configured in each mode with online payment:
- With new orderlines: "Order"
- Without new orderlines: "Order"
State of order_widget button on `cart_page`...
..when configured in meal mode, no online payment:
- With new orderlines: "Order"
- Witout new orderlines: "Pay at Cashier"
..when configured in meal mode with online payment:
- With new orderlines: "Order"
- Without new orderlines: "Pay"
..when configured in each mode with online payment:
- With new orderlines: "Pay"
- Without new orderlines: "Pay"
Kiosk mode:
State of order_widget button on `product_list_page`...
..when no payment methode:
- Without new orderline: "Pay at Cashier" (disabled)
- With new orderline: "Pay at Cashier" (active)
..when payment methode:
- Without new orderline: "Order" (disabled)
- With new orderline: "Order" (active)
State of order_widget button on `cart_page`...
..when no payment methode:
- Without new orderline: "Pay at Cashier" (disabled)
- With new orderline: "Pay at Cashier" (active)
..when payment methode:
- Without new orderline: "Pay" (disabled)
- With new orderline: "Pay" (active)
closesodoo/odoo#137387
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit adds a popup to show product information when clicking on an
info button in the product card in the self order app. The popup shows
the ecommerce description and the name of the product.
The ecommerce description field has thus been moved from website_sale to
the product module so that the pos_self_order module can use it.
closesodoo/odoo#136906
Task-id: 3524272
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The cookie service was replaced by a utils file in core. This was done
to be able to use the cookies without the need of environment.
"Om Nom Nom Nom" - Cookie Monster
part-of task-id 3439226
closesodoo/odoo#136782
Related: odoo/enterprise#48005
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
pos*: point_of_sale, pos_sale_product_configurator, pos_self_order
This commit removes the product info button and put a button on each
product card to open the product info popup.
The commit also adds a new field on the product template model to
track the availability of a product to the self ordering mode. This
field can be changed from the product form view or from the product
info popup directly in the POS. If the field is set to false,
the product will not be shown in the self ordering mode.
The commit also adds new filter and search fields on the product
list view in the backend.
closesodoo/odoo#136467
Task-id: 3515881
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Previously, attributes had to be selected one by one on different pages.
For each choice, you had to click on the next button.
Now, all product attributes are on the same page, simplifying selection.
closesodoo/odoo#137107
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Previously, the custom value of an attribute was not saved in the
database when selected via the point of sale or Self Order. The only way
to see this value was via the product name.
Now, this custom value is saved via the `product.attribute.custom.value`
template, in order to follow the behavior of the Sale module.
Others fix in this PR:
- Prevent to pass to payment page when we are in mobile mode. Only kiosk
mode is allowed to do so.
- Hide "Modify" button in the cart page when the line is already sent to
the server.
- Make the language popup behaviour available in mobile mode too.
closesodoo/odoo#136612
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
After the merge of kiosk and mobile self, the search bar had not been
reimplemented.
In this commit, we add it.
closesodoo/odoo#137063
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Previously, the self-order code and parameters were split into two parts
mobile and kiosk.
Now kiosk and mobile have been merged with each other to simplify
maintainability.
closesodoo/odoo#136051
Related: odoo/upgrade#5174
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Following the Odo comment https://github.com/odoo/odoo/pull/129562#discussion_r1306030434
We need to ensure that we have a default user for the mobile SelfOrder
when no session is open.
If we don't have a user, the system will be in sudo mode and the price
calculation will be erroneous because the system has chosen the wrong
taxes: it doesn't know which company to use to calculate the taxes.
We now force the setting of a default user for pos_config with mobile
selfOrder enabled, so that when no session is open, the default user
will be used.
closesodoo/odoo#134273
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>