- Fixes tips ticket printing when there are tips after payment.
- Makes the ReceiptScreen opened after TipScreen, to show the receipt screen even when there is a tip added after payment.
closesodoo/odoo#127548
Task-id: 3394214
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
The pos_restaurant first test (test_01_pos_restaurant) has an assertion
that failed due to the fact that the deleteion of an order is
not awaited in the frontend. This led to the tour finishing very fast
after the orm call and the assertion done just after that. We add steps
in this test to see if the orm call has been done propely before ending
the tour.
Runbot Error: 22613, 22614
closesodoo/odoo#126779
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
pos*: point_of_sale, pos_restaurant
When deleting an order, the restaurant override of the deletion function
in `point_of_sale` interferes with the logic in such a way that we end up
writing the order that needs to be deleted 2 times.
This is obviously not the expected bahaviour. In this PR we remove
the `override` from `pos_restaurant`, as it is no longer needed and
we also add a mechanism that ensures that orders cannot be duplicated.
closesodoo/odoo#126442
Task: 3383043
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
pos*: pos_loyalty, pos_restaurant, pos_sale,
pos_adyen, pos_six, pos_stripe
At the moment, the `pos` models don't have access to the `env` variable.
This makes using `env` inside a model rather awkward.
This PR makes it so all the pos models have access directly to `env`.
closesodoo/odoo#124320
Task: 3358456
Related: odoo/enterprise#42209
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
*: point_of_sale, pos_self_order
Changes:
- Adds a default restaurant with some default usual settings (with tips after payment if the company is in the United States) but no floor in the Point of Sale app. Makes pos_restaurant module auto installed with point_of_sale.
- Makes some restaurant settings enabled by default (only for restaurants).
- Adds loadable default demonstration data for onboarding (only when no real product is available in POS), specific to a restaurant. The default demonstration data for onboarding of point_of_sale and pos_restaurant are loaded together (if pos_restaurant is installed) to make it so an user that clicks to add demo data will have demo data for the default point of sale and also for the default restaurant (and the current restaurant if it is different than the default one). Makes the load demonstration data button visible when there is no product with a positive price available, because without that condition the tips (in restaurant) and discount were preventing the display of the button.
- Hides the Preparation Printers menu item if there is no POS config using the printers.
- Renames some labels.
Fixes:
- Adds checks to always set set_tip_after_payment to False if a point of sale is no longer a restaurant or if the tips are disabled. This is needed because the code of pos_restaurant seems to be written considering that set_tip_after_payment is True only when the point of sale is a restaurant with the tips enabled (which wasn't guaranteed). Without that checks, some tests like ReceiptScreenTour fail. Another solution to make the tests successful without that checks would be to add !this.env.pos.config.module_pos_restaurant in pos_restaurant/static/src/js/Screens/PaymentScreen.js:16. But because other parts of the code only check the value of set_tip_after_payment, I think it is better to opt for the additionnal checks.
- Fixes duplication of displayed product categories when loading demonstration data.
- Fixes products before loading demonstration data that were kept and displayed after (discount for example).
- Fixes categories and therefore communication with the preparation display after loading demo data in a restaurant.
- Adds a check on the server side to prevent demonstration data loading when there is at least one valid product for POS.
- Fixes order count display when "NaN" (in floors and tables view).
- Fixes arguments of orm call for set_not_tip (model and method names were not given in the right order).
closesodoo/odoo#117941
Task-id: 2484291
Related: odoo/enterprise#39450
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Previously, when conducting a refund on a table, the system would
switch the active table to the table associated with the refunded
order. This was not the desired behavior, as it resulted in the details
of the order disappearing, requiring the user to navigate back to
the refund process.
Steps to reproduce the issue:
- install PoS restaurant
- pick a table, do an order and pay it
- pick another table, refund
- choose the previous order and refund
-> the order details disappear directly. You have to go back to refund.
opw-3301603
closesodoo/odoo#125908
X-original-commit: 1f560c8954359a15ba84eb695c7eca380722f9fc
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Currently, a product can only be part of one `pos_category`.
This PR changes the relationship between the `product` and the `pos_category` from a `One2many` to a `Many2many`.
closesodoo/odoo#122907
Task: 3138825
Related: odoo/enterprise#41791
Related: odoo/upgrade#4739
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos, point_of_sale,
pos_adyen, pos_discount, pos_epson_printer, pos_hr, pos_loyalty, pos_mercury,
pos_restaurant, pos_sale, pos_sale_product_configurator, pos_six, pos_stripe
After the architectural refactor of the PoS App, there are two classes that make sense to merge.
In this refactoring task, we're merging them.
closesodoo/odoo#124477
Task: 3358550
Related: odoo/enterprise#42257
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
steps to reproduce the issue:
-Navigate to POS, Open Bar (needs to be restaurant POS)
-Click on a table and add some items to the order.
-Click the Bill button under the order
-Wait about 90 seconds
-Bill page times out and goes back to the floor screen
-Click on Orders at the top and view Ongoing Orders. The one you just
made is not here (it should be)
The solution is to prevent removing the not finalized order when
coming back to the FloorScreen.
opw-3276345
closesodoo/odoo#124960
X-original-commit: be384e27ced7c256867938c53aa5d2a7d81c0ade
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
pos*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_in_pos,
point_of_sale, pos_discount, pos_epson_printer, pos_hr, pos_loyalty,
pos_mercury, pos_restaurant, pos_sale, pos_sale_product_configurator,
pos_six
Previously, none of the templates of the pos were namespaced, this means
that depending on context, you have to access them differently: in xpath
the module prefix is necessary even if the template name itself isn't
namespace, but in owl components you cannot use the namespaced version
because owl doesn't have the notion of modules.
This commit namespaces the component templates of all the pos modules so
that it's consistent with the rest of the code base. It also removes
some extraneous calls to super.setup() that were leftover and are not
necessary for components extending directly owl's base Component.
closesodoo/odoo#124069
Related: odoo/enterprise#42094
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
pos*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer, pos_hr,
pos_hr_restaurant, pos_loyalty, pos_mercury, pos_restaurant, pos_sale,
pos_sale_loyalty, pos_sale_product_configurator, pos_six, pos_stripe
The previous commit reorganizes the files in the pos, this commit
renames all of the imports of those files to match their new location.
This is done in a separate commit to allow git to better keep track of
the changes and apply forward-ports more seamlessly.
Part-of: odoo/odoo#123498
Before a longpolling every 5 seconds was set up to sync the number of
orders per table in the pos_restaurant, which was not very
userfriendly / efficient.
Now, the longpolling has been replaced by a bus (websocket). As soon as
an order is sent to the server by another PoS, the server dispatches the
information to all other PoS using the corresponding floor plan.
The bus_service was initialized in the pos_store of the point_of_sale,
but is now used only in the pos_restaurant via override.
This was done for obvious future use.
closesodoo/odoo#121875
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
The PoS needed improvments for the mobile use.
This commit is changing the display of some screen and popups
like the NumberPopup. It also changes the logic of the
order count badge on the table. It now displays the number
of orderline (and their quantity) to send to the printers
or preparation display if there is at least one.
closesodoo/odoo#121286
Related: odoo/enterprise#41013
Signed-off-by: Monnom David (moda) <moda@odoo.com>
This commit resolves 2 bugs.
The first one is that, in a PoS without pos_restaurant installed,
if we delete the last order of the list, we get a traceback.
This is resolved by adding an empty order if there is no order left
in the order list.
task-id: task-id: 3291831
The second bug is that, with pos_restaurant installed,
when going to a retail PoS, if we createan order with some products,
then create a new order from the TicketScreen, add some products,
go the the TicketScreen and delete the current order
and then click back, we have in the ProductScreen the order
that is supposed to be deleted.
This order doesn't show up in the ticket screen anymore.
This comes from the fact that the _selectNextOrder function is
not correctly implemented, leading to the next order not being
chosen because we do not have a table (we are in classic PoS).
This fix resolves this problem by changing the _selectNextOrder
function and the newly added addOrderIfEmpty function in models.js.
closesodoo/odoo#122269
Task-id: 3291821
X-original-commit: cd956daf21695bef4753301fe29a6ece1e97d32a
Signed-off-by: Monnom David (moda) <moda@odoo.com>
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
pos*: point_of_sale, pos_hr, pos_restaurant, pos_sale
This component is purely presentational and contains no code, it's also
only used once (it was actually used a second time in pos_hr only
because the way the xpath was written would replace the existing
instance with a new one with an added t-if, we can just use an attribute
xpath instead).
Existing xpaths have been adapted such that the burger menu's dropdown
structure is better semantically (an unordered list containing list
items, instead of containing list elements inside of random divs)
Part-of: odoo/odoo#122035
The IndependentToOrderScreen base class is used when a main screen
should not be stored on the order (so that it can be restored when the
order is selected again). Its implementation is simply a class with a
static flag, and a super simple close method which just calls the
equivalent method on the pos store. It has been removed and the classes
extending it have been adapted.
Part-of: odoo/odoo#122035
Before when you deleted a order in PoS with the preparation tools
enabled. The order was not cancelled on them.
Now, when cancelling/deleting an order in PoS the information is sent
to the preparation tools.
closesodoo/odoo#120447
Taskid: 3278081
Related: odoo/enterprise#40673
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Before when the point_of_sale was offline, popups were opened at each
RPC error. This was inconvenient for the user as the pos must be usable
offline.
Now, the error popup has been replaced by an alert popup explaining that
the point of sale works in limited version as long as it is offline.
The warning noise has also been removed.
closesodoo/odoo#120826
Related: odoo/enterprise#41323
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
- Modification of the search button on mobile to keep a fixed position.
- Modification of the splitbill system, after the validation of a part
ofthe order, a continue button is displayed in order to finish the
payment of the rest of it.
- The INPUT popup can now be validated by pressing the "enter" key.
- Debug widget is now hidden by default. And a button is added in the
burger menu to toggle its visibility.
- When adding a product with optional products the info popup is no
longer opened automatically but if the orderline is selected in the
order the info button will be highlighted.
closesodoo/odoo#119919
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
When an error of type "ConnectionLostError" arrives in the PoS, we catch
it in order to warn the user. In the catch, a bad detection of the
instance of this error was made which blocked the flow by throwing
an error.
We were checking whether the error message was an instance of a
ConnectionLostError in a way that assumes that the error was a legacy
error which is no longer the case since the POS no longer uses the
legacy rpc service. This commit adapts the instanceof check
The necessary changes have been made, it now works.
closesodoo/odoo#121536
X-original-commit: 963ea1c5779fbf7af7d5421a294ca2a24d7940af
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Monnom David (moda) <moda@odoo.com>
pos*: point_of_sale, pos_restaurant, pos_sale
Previously the pos would rerender the entire UI when the window was
resized. In practice, most components do not care about the size of the
UI for their rendering, and so we're doing a lot of needless work, and
also using an owl feature (deep renders) whose perennity is not certain
(we may want to remove the ability to do deep renders completely in the
future).
This commit changes the pos code to use the ui service `isSmall` field,
makes the ui service reactive so that components can subscribe to
changes inside of it with `useState`, and makes the ui service update
its internal state at most once per animation frame, instead of after
100ms without resizing, so that resizing the viewport results in a
smoother user experience.
closesodoo/odoo#121343
Signed-off-by: adgu-odoo <adgu@odoo.com>
Before this commit : The library underscore.js and
underscore.string.js were used in the ODOO solution.
After this commit : Every usages of a function from
underscore.js lib has been replaced with native javascript.
The goal is to remove all usages of underscore.js and to
not use anymore this library in ODOO.
---
TaskId : 3246238
closesodoo/odoo#120437
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.
task-2818586
Part-of: odoo/odoo#116641
*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos,
l10n_in_pos, point_of_sale, pos_discount, pos_hr, pos_loyalty,
pos_mercury, pos_restaurant, pos_sale, pos_six
The code of the pos was one of the first adopters of owl 1, as such, the
code was not initially written to take full advantage of the owl
reactivity system that would eventually make its way into owl 2. In
order to convert the code quickly when migrating to owl 2, a big
shortcut was taken: whenever something in the state of the pos changed,
the entire UI would be rerendered. While this works decently well in
practice, it can create confusing situations because the mental model
needed to understand how components work in the pos is different from
the rest of the code base.
This commit changes the existing code to use the typical fine-grained
reactivity model used everywhere else: components individually subscribe
to the pieces of state that they use and will rerender on their own when
this state changes. In order to achieve this, the pos global state has
been removed from the environment and should now be access through the
use of the custom hook `usePos` which will subscribe the component to
the state that it reads. This also has some minor performance benefits
as we only render the parts of the UI that actually need to update
whenever there is a state mutation, instead of the entire UI which can
be expensive in some cases (eg, the product screen will filter all
products during rendering to find only the products that match the
search, which is expensive when there are a lot of loaded products)
closesodoo/odoo#120992
Related: odoo/enterprise#40873
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Enable floor plan for all PoS Restaurant config. To accomplish this, we are
removing the following fields:
- `pos.config.is_table_management`
- `res.config.settings.pos_is_table_management`.
All access to `is_table_management` can be replaced by `module_pos_restaurant`
because originally, `is_table_management` can only be true if
`module_pos_restaurant` is true.
To adapt the tests, we should manually set `module_pos_restaurant` to `False` for
the `pos.config` used in tests outside `pos_restaurant` addon. This is because
when pos_restaurant addon is installed, it sets every new `pos.config` record to
be restaurant by default.
Task-3282975
closesodoo/odoo#120117
Related: odoo/enterprise#40532
Related: odoo/upgrade#4622
Signed-off-by: Monnom David (moda) <moda@odoo.com>
Before this commit, the Order button wasn't displayed due to an
incorrect comparison with a `LazyTranslatedString` object
(`this.props.actionName`). This commit resolves the issue by ensuring
proper comparison of `this.props.actionType` with the string "payment".
Step to reproduce:
- create a pos_config (bar)
- active a printer on it
- open the PoS bar
- select a table and add some product
- The orderline are green but there's not order button.
opw-3300533
closesodoo/odoo#120846
X-original-commit: a04f8ebdfb724c74531f38927a655e6aae86bc26
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
In odoo/odoo#120070 the pos assets bundle were refactored to stop
including the entirety of assets_backend. In doing so, jQuery.ui is no
longer present in the bundle. pos_restaurant adds an addon for jQuery.ui
to make its widgets work on mobile, but since the original library is
not present, this causes a crash when touch events are available (ie on
touch screens).
This commit fixes that by removing the addon entirely, since none of the
pos depends on jQuery.ui anymore.
Part-of: odoo/odoo#120791
*: l10n_ae_pos,l10n_fr_pos_cert,l10n_gcc_pos,pos_loyalty,pos_restaurant,
pos_sale,pos_sale_product_configurator
This commit is the start of a series of changes in the definitions of formatters
and rounders used in pos. We are introducing a new service called
`contextual_utils_service` that loads when the `pos` service is ready making
sure the currency is loaded. In this service, we define `formatCurrency`
(potentially others) which is the replacement to `format_currency{_no_symbol}`.
Also, instead of defining our own formatter, we are depending on web's
`formatMonetary`.
In this commit, we are replacing all uses of `format_currency{_no_symbol}` with
`formatCurrency` that's based on web's `formatMonetary`.
Part-of: odoo/odoo#120317
The first two arguments of the call() function of the orm service
have been inverted.
This is fixed.
closesodoo/odoo#120404
X-original-commit: 0a4e035083d6d3d62d0041fad62f71668dd77d7e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Monnom David (moda) <moda@odoo.com>
*:pos_epson_printer,pos_epson_printer_restaurant,point_of_sale,
pos_restaurant,pos_hr_restaurant
Before the printers only worked in the pos_restaurant and not in the
point_of_sale. Indeed, the methods managing the printers were located
in the pos_restaurant.
Now all these methods have been moved.
For the community part here are the affected modules:
- The methods in pos_epson_printer_restaurant have been moved to
pos_epson_printer.
- The methods in pos_restaurant have been moved to point_of_sale.
- The module pos_epson_printer_restaurant has been removed as it only
handled printers.
Some of these methods have been adapted/renamed to better suit
the needs.
This branch the first part of the following task: 3224508
closesodoo/odoo#114655
Related: odoo/upgrade#4414
Related: odoo/enterprise#37901
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
*: point_of_sale, pos_hr, pos_restaurant
Previously, the pos service started synchronously, but doing anything
meaningful with it needed to be done after it was "ready", meaning it
had loaded and processed the data. The reason for this is that we need
to start the services before we mount the chrome, but in the pos we want
to show the loader immediately while the data is loading. This means
that any service that depends on the pos service in a meaningful manner
has to be written in a convoluted way, where it starts as a dummy
service and then overwrites itself in the env when it's actually ready.
This commit allows to write services that depend on the pos service more
naturally, by making the pos service properly asynchronous, meaning its
dependents will only be loaded once it's actually ready. To work around
the loader issue, the loader is mounted as a separate owl appplication
with not services, this application is shown over the chrome and when
the chrome mounts, it hides the loader and destroys the loader
application after the fade-out transition.
closesodoo/odoo#119908
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
*: l10n_fr_pos_cert,portal_rating,pos_adyen,pos_epson_printer,pos_loyalty,
pos_mercury,pos_restaurant,pos_restaurant_adyen,pos_restaurant_stripe,
pos_sale,pos_six,pos_stripe,web
This is part of the continuous effort of refactoring pos addons towards using
more modern modules and programming patterns (such as services). After this
commit, point_of_sale addons are now left with the use of the legacy
`web.concurrency` module because of the `MutexedDropPrevious`. It's okay to keep
it because it's relatively an independent module compared to other legacy web
module.
The following summarizes the changes in this commit.
- import `_t` from `@web/core/l10n/translation`.
- convert `PosDB` to js native class
- remove use of `format` in `TicketScreen`
- To determine the cached orders are up-to-date, we now deserialize the dates
coming from the server using web's `deserializeDateTime` function. Then,
instead of initiating `cacheDate` as native js Date, we use the luxon's
`DateTime` which is supported by the web date utility methods.
- There is no need for the `format` function from `web.utils` legacy module.
- convert `PaymentInterface` to native class
- remove use of `web.config` module
- remove use of `web.time` module
- use `serializeDateTime` from web.
- remove use of `web.rpc`
- remove use of `web.utils` module
- introduce simple check for email address input
- Replace use of `web.utils.Markup` with `@odoo/owl.markup`.
- 'web.utils'.{round_decimals,round_precision,float_is_zero} copied to
'@web/core/utils/numbers'.{roundDecimals,roundPrecision,floatIsZero}.
- These helper functions are not removed from the web addon because they
are also used from other addons that are not linked to pos.
- `floatIsZero` is now computed by directly comparing the result of
`roundDecimals` to zero. This works because rounding a decimal number
which will result to zero will exactly give zero.
- remove use of `web.field_utils`
- Replace `web.field_utils.parse.float` with
`@web/views/fields/parsers.parseFloat`.
- Replace `web.field_utils.format.float` with
`@web/views/fields/formatters.formatFloat`.
- Replace `web.field_utils.format.date` with
`@web/core/l10n/dates.formatDate`.
- Replace `web.field_utils.format.datetime` with
`@web/core/l10n/dates.formatDateTime`.
- convert `PrinterMixin` and dependents to native class
- `PrinterMixin` is converted to `BasePrinter`.
- `Printer` is converted to `HWPrinter` (extending `BasePrinter`).
- `EpsonPrinter` retained its name and is converted to extend `BasePrinter`.
- Moreover, we also removed the convoluted `PrintResultGenerator`, replaced by
simply creating object with the following signature:
```js
{ successful: boolean; message?: { title: string, body?: string } }
```
- remove use of `web.Session`
- replace use of `qweb.render`
- We use `renderToElement` as replacement to templates that produces valid
html.
- Note that `renderToElement` is introduced in `@web/core/utils/render` module
which is extracted from the original `renderToString` method.
- For the epson printer template, we kept the xml layout and manually add
required xml element to contruct the xml that will be sent to the epson in
making print requests.
- use `Mutex` from `@web/core/utils/concurrency`
- remove use of `Markup` when rendering receipt info (`ticket`) in order to
render new lines.
- Remove use of `jquery` in `htmlToImg`.
closesodoo/odoo#117231
Related: odoo/enterprise#39078
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Current behavior:
When printing a bill in the restaurant you had an error poping.
Steps to reproduce:
- Open a restaurant session
- Go on a table and add some products
- Click on the bill button
- Click on the print button
- You get an error
opw-3259014
closesodoo/odoo#119041
X-original-commit: 1d1808e7136c6416fe88c28e7971e97707de2557
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
We want the order button to display the product summary by category to give more feedback to the waiter while taking an order.
closesodoo/odoo#116846
Task-id: 3229596
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Currently, there is only 1 plan view that is unreadable on mobile
and sometimes also complicated in some cases.
This commit adds a new "Kanban" view used by default on mobile
and available in desktop too. This commit also changes the edit bar
of the FloorScreen: the design is changed and some features are added
like the multiple selection of the tables or the adding and removing
of floors directly from the frontend. It also changes the navbar
of the PoS, moving the buttons in a navigation menu accessible
thanks to a button.
Task-id: 3212032
Currently, the "receipt_header" and "receipt_footer" text fields of the
'pos.config' model can be used to render html in the receipt using qweb by
putting `<!DOCTYPE QWEB` as the first line of the text. In the previous
versions, it is converted to a markup so it is rendered as html in the
receipt. Rendering it as markup poses security issues therefore we are
removing this feature in this commit.
After this commit, we now only allow regular string to be added in the
receipt and footer headers.
If user wants to introduce custom markup in the headers, they can
properly do so by extending the `OrderReceipt` template from other addons.
closesodoo/odoo#117336
Task-id: 3256208
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
*: web
This commit removes the use of the legacy environment from the PoS, as
it is no longer needed. This will allow us to more easily use the new
unit testing infrastructure from web.
Part-of: odoo/odoo#117290
In the previous state of the point_of_sale module, when the l10n_fr_pos_cert
module was used, we were too restrictive leading to an unusable flow by some
clients. We adapt the modules here so that the FR module is more usable
by the clients while still respecting the law.
closesodoo/odoo#113754
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
*: pos_epson_printer, pos_restaurant, pos_six
This commit continues the work of reducing the reliance of the pos
modules on legacy features from the JS framework, such as core.Class and
mixins, by converting the ProxyDevice class to ES6 (and renaming it
HardwareProxy, to avoid confusion with DeviceProxy from iot). It also
makes it available as a service in the new environment so that we can
hopefully get rid of the legacy environment in the near future.
closesodoo/odoo#114821
Related: odoo/enterprise#37991
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Previously, the payment button was larger than the others and next to
the numpad. The other buttons were managed by a mixin and arranged
in a predefined order.
Now, the payment button only stays in place when the "order" button is
not present, currently it can only be present if the restaurant module
is installed and a printer configured.
When it is present, it takes the place of the payment button and the
latter is added to the mixins with the other buttons
closesodoo/odoo#115988
X-original-commit: f32c07f28e2fd2830f568757d4700fa77b83ced7
Related: odoo/enterprise#38476
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
* The tours are now run by the `MacroEngine` defined in `macro.js`.
* This is accomplished by converting (at runtime) the user-defined tours to
`Macro`s. See `tour_compilers.js` for the step (and tour-to-macro) compilation.
* API is kept the same as much as possible. Basically, declaring tours stayed
the same with some exceptions:
* `allowInvisible` can be provided in a step to allow consuming the trigger
element even if it is invisible.
* `isCheck` can now be used to replace the no operation `run` that is
traditionally signals the runner to only perform a check.
* Before, multiple `run`s can be called simultaneously. Now, each `run` method
is awaited before proceeding to the next step.
* If the trigger element is `disabled`, the tour runner will *not* proceed on
calling the `run` method and the runner will stay on current step until the
trigger element becomes `enabled`.
* However, the tour runner is okay with `disabled` trigger element if the step
has `isCheck = true`. As long as the trigger element is found for `isCheck`
step, the tour runner will happily move to the next step.
* Some tours are adjusted to properly run with this new tour runner.
* When the tour failed:
* The dom string is not logged anymore.
* However, a warning message containing the relative location of the step will
be logged. This is better in helping the author in locating the failed step.
**Some guidelines learned during the development:**
* Each step may trigger a dom mutation. It's a good practice to insert an
intermediate step that *checks* the existence of an element that result from
the action of the previous step.
* Refrain from using the `run` method for assertions. `run`, in principle, is
provided to perform actions that are not offered by the helper. Use the
`trigger` for assertions.
* During dev, find `SHOW_POINTER_DURATION` and set it to `250`. This will show
the pointer (pointing to the trigger element) for 250ms when watching the
tour.
closesodoo/odoo#107618
Task-id: 3082036
Related: odoo/enterprise#37560
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Currently the below use-cases are hardly supportable, though quite common:
Retail: Sell product in one shop and return it in another one
Restaurant: Managing payment when having multiple checkout desks,
and multiple waiters (only taking orders)
This because currently:
PoS orders are only known by the cashier desk (pos.config) they were created from
One floor map can only be linked to one cashier desk at a time
More over, with the Self-Service coming along the way
(where kiosk orders must be accessible from a cashier desk),
this need must be supported.
For restaurant, floor plans can be linked to multiple cashier desks,
ongoing orders are shared between trusted PoS config
(through floor plans for restaurant and according to
the setting "Trusted PoS config" for the retails),
and past orders can be accessible from any desks within a same DB.
closesodoo/odoo#109216
Related: odoo/upgrade#4393
Related: odoo/enterprise#37955
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
*: l10n_co_pos, l10n_fr_pos_cert, point_of_sale, pos_loyalty,
pos_mercury, pos_restaurant, pos_sale, pos_sale_product_configurator
This is a step in the direction of making the pos no longer depend on
the legacy environment.
closesodoo/odoo#114668
Related: odoo/enterprise#37906
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
*:point_of_sale,pos_restaurant,web
A new module pos_preparation_display has been added to Odoo enterprise.
This PR is intended to add the requirements necessary for it to work
properly.
The changes are mainly related to the kitchen printer functions, as
the pos_preparation_display module reuses these flows in order to
receivethe orders to be prepared.
closesodoo/odoo#109024
Related: odoo/enterprise#35392
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>