Commit Graph
819 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
roen-odoo 944e442b68 [FIX] pos_coupon, pos_restaurant : Promotion program
Current behavior :
When you add a promotion campagn to a PoS the promotion is applied
on every line of every order everytime you load the order. This cause situations
where you have multiple discount for a single product.

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

opw-2699544

closes odoo/odoo#81096

X-original-commit: 72d6431eb26654b697fc0379f4b6d7e305bb79fc
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-09 10:27:02 +00:00
roen-odoo 341ad3f4dd [FIX] point_of_sale, pos_coupon, pos_hr, pos_restaurant : Check COA not used
Check COA parameter in the open_session_cb was actually never used

opw-2691615

closes odoo/odoo#80410

Related: odoo/enterprise#22522
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-12-08 11:17:11 +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
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +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
lejeune quentin 74e185cfe1 [IMP] point_of_sale: Authorizes the uses of POS in HTTPS with direct devices
To avoid the use of certificates when using direct devices
POS was redirected in HTTP

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

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

closes odoo/odoo#78247

X-original-commit: 9cecb3bdbf5679b6d1d18dc2a250c86118bca6ce
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2021-10-12 17:03:41 +00:00
Jacky (trj) 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
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +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
Joseph Caburnay c0f879f6b8 [TEST] point_of_sale,account: revamp of accounting in pos
See simple test cases in the following spreadsheet:
https://docs.google.com/spreadsheets/d/1mt2jRSDU7OONPBFjwyTcnhRjITQI8rGMLLQA5K3fAjo/edit?usp=sharing

Part-of: odoo/odoo#74870
2021-08-27 17:43:08 +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
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
lejeune quentin 6565a037d2 [IMP] pos_*: Use the POS in http under specific conditions
Because there are some restrictions with the HTTPS and trusted certificates
We forward, in some cases,  the POS and the POS RESTAURANT to a specific url.

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

To allow rules for webserver

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

closes odoo/odoo#74239

Tasks: 2597021
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-26 12:05:16 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +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
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
+1 14bffd983e [REF] *: adapt code to new owl webclient
This commit adapts the community codebase to the rewriting of the
/web application in owl.

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-06-18 21:31:27 +02: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
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Julien MougenotandSimon Genin 26dea77c72 [REF] point_of_sale: clean up assets views
This commit handles 2 things:

- The line odoo._modules = <t t-raw="get_modules_order()"/>; used to be in
assets_backend but is now directly added to the web.bootsrap (the odoo
index template). Since pos has its own index, we add it there.

- An "id" attribute has been removed from a link tag which was used to
indentify said link as an xpath target. The xpath has been adapted to
target the href instead.

This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:17 +02: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
Martin Trigaux ade40f9028 [I18n] *: export saas-14.1 source terms
closes odoo/odoo#64393

X-original-commit: eaf7ec38b2f13b044768ccb457c5523cd24753f6
Related: odoo/enterprise#15693
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-12 10:38:54 +00:00
Adrian Torres 679185f3e8 [IMP] *: replace all raises inside unlink by api.ondelete
With this commit, all instances of errors being raised inside
`BaseModel.unlink` overrides are moved into methods decorated with
`api.ondelete` which is safer.
2020-12-04 09:16:16 +00:00
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
Martin Trigaux 1658473bf2 [FIX] *: rephrase, correct typos
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#62564

X-original-commit: 9b3b2e8d711e3be75b1faffaf6f4f8f4ec90186e
Related: odoo/enterprise#15038
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-30 07:07:58 +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
Anh Thao Pham (pta) 8dcb312650 [FIX] point_of_sale, pos_restaurant: fix full product name
- Go to Point of Sale > Configuration > Attributes and create an Attribute:
  * Attribute Name: Attribute X
  * Variants Creation Mode: Never
  * Attribute Values: Value Y, Value Z
- Create a Product (i.e. Product X) available in POS with the created Attribute and Values
- Configure a POS and enable the following options:
  * Is a Bar/Restaurant
  * Product Configurator
- Open POS Session and select a table (i.e. Table 1)
- Select Product X and a value for Attribute X
- In the order summary, the value of the attribute appears after product name
- Go to Floor plan
- Go back to Table 1
The values of all attributes don't appear anymore in order summary

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

opw-2371965

closes odoo/odoo#61266

X-original-commit: df3061f6e8061cf039bf083f649b7585c8c31df4
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-03 13:24:16 +00:00
Antoine Prieels 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