Commit Graph
37 Commits
Author SHA1 Message Date
vlstandJoseph Caburnay 00dcc575b8 [IMP] point_of_sale,*: integrate combos in pos ui
*: pos_discount,pos_loyalty,pos_restaurant,pos_self_order

In a previous commit (669b9fcc2f) we added the
backend logic needed for creating combos in `pos`.

In this PR we add the combo functionality to the classic pos ui.

This means that products can now be grouped together and sold as a combo.

ex: Create a product called `Burger Menu` with type='combo'.This product will
have multiple combos associated with it, for ex:

- Drinks - will contain the list of drinks from which the customer can choose
- Main Course - will contain the list of main courses from which the customer
  can choose
- Dessert - will contain the list of desserts from which the customer can choose

In the event that one of the products inside one of the combos is to be more
expensive, this product will have a specific `combo_price` which will be added
to the main combo product's price.

We add the relational fields `combo_parent_id` and `combo_line_ids` in the
`pos.order.line` model. In the previous example, `combo_parent_id` will contain
the `id` of the `orderline` of the `Burger Menu` product.

In many cases `combo lines` have to be handled together. For example, deletion
of an orderline containing a product from a combo implies the deletion of all
other orderlines containing products from that combo. This means that multiple
methods from the codebase had to be changed for this reason. Places that needed
changes for this reason:

- `split_bill_screen.js`
- `addProductToCurrentOrder()`
- `remove_orderline()` and `add_orderline()` from the `Order` js model

In this PR we also:

- improve the demo data such that it contains a `pos combo`;
- refactor the `ProductItem` component such that it relies on a stateless
  component. This stateless component can now be used anywhere; ( it is now used
  in the popup which allows selecting the desired combo products )
- add a new method called `is_pos_groupable` on the `Orderline` js model. Before
  we relied on the product unit to see whether or not a product is groupable. We
  now needed a new mechanism, which could account for different reasons for
  which products are not groupable, such as belonging in a combo;

Note on price calculation:

- The idea is simple, imagine a rectangle divided into two parts. The whole
  rectangle is the total order, whereas the two partitions are the orderlines.
  - Now, imagine shrinking the rectangle by a certain factor. This shrinked
    rectangle represents an order containing a combo -- because normally, a
    combo results to smaller price. The two partitions are also shrinked by the
    same factor.
  - So the calculation will be:
    - Nominal total price is calculated. This is the sum of the orderlines'
      prices when they are added individually. This represents the whole
      rectangle.
    - Target price is derived from the combo product's price and selected
      components' combo prices. This represents the shrinked rectangle.
    - Reduction factor is computed as the ratio between the target price and the
      nominal price.
    - Each component's unit price is adjusted by multiplying the reduction
      factor.
    - When the unit prices of the components are computed, we now let the normal
      price computation take place.
- A spreadsheet is prepared to show a sample calculation:
  https://docs.google.com/spreadsheets/d/1iOdnaILnvKiaf2_z7jTijYiVfB_3mjKWjq6nOB70Un0/edit#gid=0

closes odoo/odoo#129483

Task: 3430636
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Co-authored-by: Joseph Caburnay <jcb@odoo.com>
2023-09-04 08:03:34 +00:00
David Monnom (moda) 01b3a2e4c2 [REF] point_of_sale, pos_*: only use export_for_ui for serializing
*:pos_hr,pos_hr_restaurant,pos_loyalty,pos_restaurant

Before when serializing a pos.order from the server, we are using
several methods for different use cases.

- table syncing: get_table_draft_orders
- order sharing: get_draft_share_order_ids
- ticket screen: export_for_ui

All of these methods had their own logic.

Now, to improve the maintainability of point_of_sale, order
serialization is only performed via export_for_ui.

Enterprise PR: https://github.com/odoo/enterprise/pull/45151

closes odoo/odoo#130695

Taskid: 3449870
Related: odoo/enterprise#45151
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-08 18:40:52 +02:00
Theo VINCENT (thvi) 3236c1cb50 [IMP] pos_restaurant, *: default settings and data
*: 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).

closes odoo/odoo#117941

Task-id: 2484291
Related: odoo/enterprise#39450
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-26 20:00:35 +02:00
pedrambiria 1214542413 [FIX] pos_restaurant: stay on current table after refund
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

closes odoo/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>
2023-06-22 08:35:04 +02:00
vlst 42087c6fa1 [IMP] point_of_sale: Allow products to be part of multiple pos categories
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`.

closes odoo/odoo#122907

Task: 3138825
Related: odoo/enterprise#41791
Related: odoo/upgrade#4739
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-21 13:45:50 +02:00
Adrien Guilliams (adgu) 60f41b1f83 [IMP] pos: Change waiter screen
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.

closes odoo/odoo#121286

Related: odoo/enterprise#41013
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-25 16:29:11 +02:00
David Monnom (moda) b22e770fd0 [IMP] point_of_sale, pos_*: misc ux improvement
- 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.

closes odoo/odoo#119919

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-23 16:31:24 +02:00
David Monnom (moda) cd81cc64ed [FIX] point_of_sale,pos_*: launch test with demo user
Before the PoS tours were mainly run with the `accountman` user, which
did not allow us to have a clear view of the permissions required for
each function of the Point of Sale.

Now, two users have been created for the PoS:
- `pos_user`
- `pos_admin`

The first one has no particular permission, he is a normal user of the
Point of Sale and Odoo, the second one is an administrator of the Odoo
application.

If the user `pos_user` is used and some permissions are missing in a
tour, these are added to the user with starting the test.

closes odoo/odoo#120380

Related: odoo/enterprise#40656
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-15 13:59:09 +02:00
Loukas Wets (lowe) e3ad1eb058 [IMP] pos_restaurant: always floor plan when restaurant
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

closes odoo/odoo#120117

Related: odoo/enterprise#40532
Related: odoo/upgrade#4622
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-11 12:01:35 +02:00
David Monnom (moda) 55ec4f75bc [FIX] point_of_sale,pos_restaurant: fix order btn
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

closes odoo/odoo#120846

X-original-commit: a04f8ebdfb724c74531f38927a655e6aae86bc26
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-05-10 20:15:26 +02:00
David Monnom (moda) f23edc1729 [FIX] pos_restaurant: wrong arguments for orm.call function
The first two arguments of the call() function of the orm service
have been inverted.

This is fixed.

closes odoo/odoo#120404

X-original-commit: 0a4e035083d6d3d62d0041fad62f71668dd77d7e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-03 13:57:24 +02:00
David Monnom (moda) 73aae73f1b [IMP] point_of_sale,*: move kitchen printer logic to point_of_sale
*: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

closes odoo/odoo#114655

Related: odoo/upgrade#4414
Related: odoo/enterprise#37901
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-03 12:39:17 +02:00
Archana Vaghasiya 91a6b3097b [FIX] point_of_sale: prevent creation of journals with existing id's
Error:'UniqueViolation duplicate key value violates unique constraint
account_journal_code_company_uniq.'

When we install the 'point_of_sale'  module it tries to create account journals
with existing id's due to which we face the above error.

This commit removes the portion of code that creates the account journal
with already existing id's.

sentry - 4062359900

closes odoo/odoo#118618

X-original-commit: 3c209e5c91e374dc7738df01f48e630a7fba5caf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-04-17 09:27:53 +02:00
Adrien Guilliams (adgu) 53f9e5845f [IMP] point_of_sale, pos_restaurant: Add cross-orders feature for point_of_sale and pos_restaurant
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.

closes odoo/odoo#109216

Related: odoo/upgrade#4393
Related: odoo/enterprise#37955
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-10 18:54:52 +01:00
Adrien Guilliams (adgu) ffe27c3f32 [IMP] pos_restaurant: Table not stacked when added
When we added tables on a floor plan from the floor screen,
the tables stacked one upon another which was confusing and annoying.
Now the table will be added on a free place on the floor plan.
We also rename the tables: they are no more called "T1", "T2"
but "1", "2",...

closes odoo/odoo#114282

Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-03-07 01:59:54 +01:00
rhe-odoo e75c5fc1af [IMP] point_of_sale: warning with cash payment methods
Currently, it is possible to assign the same "Cash" payment method to multiple PoS.
At the moment, when creating a new PoS, Odoo tends to assign it by default. Although this is highly not recommended as it can only lead to incorrect cash control (two PoS devices rarely share the same till and therefore needs their own cash payment method).

This commit makes sure payment methods of type Cash aren't set by default when creating new PoS.
it also blocks the user from setting the same Cash payment method to multiple PoS configs.

closes odoo/odoo#92664

Task-id: 2857417
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-02-13 12:36:15 +01:00
pedrambiria c80036552f [FIX] point_of_sale: add one default cash payment method
Before this commit: if more than one cash payment methods exist, it
would add all of them by default when you create a point of sale.

This commit prevents adding more than one cash payment method:
https://github.com/odoo/odoo/commit/f9da3590261b304f9c12f01f5800cec50faebc1a
So it's impossible to create a new point of sale when there are more than
one cash payment methods.

The solution is to limit the default cash payment methods to one.

opw-3134418

closes odoo/odoo#110717

X-original-commit: 5c839e684261e60328c7e06ae09685734507bf4f
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-23 19:28:49 +01:00
Demesmaeker 83c52575d0 [REF] product,repair,(*_)sale(_*): unrequired pricelist
Removes the constraint of using a pricelist and makes all sales flows
rely on the currency of the sale order (or repair order)

task-2735672

closes odoo/odoo#84920

Related: odoo/enterprise#24716
Related: odoo/upgrade#3642
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-01-18 21:08:52 +01:00
roen-odoo 5786d8adee [FIX] pos_restaurant: correctly save splitted order
Current behavior:
When splitting the order in a pos_restaurant session, the order was not
correctly saved in the backend. It resulted in an order that still had
all the product of the original order and another order with the
correctly splitted products.

Steps to reproduce:
- Start a pos_restaurant session.
- Go to table A and add 3 products to the table.
- Go back to the floor screen
- Go back to the table A
- Split the order in 2
- Click on payment, and go back to the product screen without paying
- Click on the ticket button, and click on the order that was splitted,
  it still contains all the products from the original order.

opw-3061569

closes odoo/odoo#106813

X-original-commit: bf8acd51ffb96048a7123d1abd2f6865d27a41f9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 11:08:56 +01:00
Jacky (trj) a520745230 [IMP] point_of_sale: visual improvement
Small visual changes that should improve the user experience.
The loading demo data popup has been moved to the backend.
Created an Alert Popup that is less aggressive than an Error Popup

closes odoo/odoo#83780

Task-id: 2485062
Related: odoo/enterprise#26104
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-08-08 10:50:14 +02:00
aliya 26b2472f49 [IMP] account: refactor account types
Task: 2856281

- Remove user_type_id, account.account.type model, internal_type
- Add account_type that is a simple selection field
- Move internal_group and include_initial_balance to account.account
- Because of these changes, type_control_ids on account.journal is also removed

closes odoo/odoo#93212

Related: odoo/documentation#2223
Related: odoo/upgrade#3595
Related: odoo/enterprise#28205
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-07-08 19:52:15 +02:00
Joseph Caburnay 055dbc25a4 [IMP] point_of_sale,pos_restaurant: use company's barcode nomenclature
This change removes the `barcode_nomenclature_id` in the `pos.config`.
Each pos session now starts based on the company's barcode nomenclature.

closes odoo/odoo#93072

Task-id: 2849415
Related: odoo/upgrade#3575
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-06-21 09:17:50 +02: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 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
Joseph Caburnay d8e210e8e1 [FIX] point_of_sale,pos_restaurant: remove step_delay in pos test tours
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.

closes odoo/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>
2020-09-02 13:56:44 +00:00
Antoine Prieels 3f138b9d3c [IMP] point_of_sale, pos_*: Enable HTTPS in POS
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.

closes odoo/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>
2020-09-02 10:53:34 +00:00
Joseph Caburnay 96e27f0900 [FIX] point_of_sale,pos_*: indeterministic tour tests failures
closes odoo/odoo#56062

Related: odoo/enterprise#12487
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-19 07:34:04 +00:00
Joseph Caburnay b0107e9230 [IMP] pos_restaurant,point_of_sale: set tip after payment
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.

closes odoo/odoo#55488

Task-id: 2117029
Related: odoo/upgrade#1606
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-12 09:17:34 +00:00
Joseph Caburnay 9ea0aca6ea [IMP] point_of_sale,pos_*: top bar improvements and ticket list
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.

closes odoo/odoo#55100

Task-id: 2276678
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-05 13:35:08 +00:00
Joseph Caburnay b2f8170d88 [IMP] point_of_sale,pos_*: allow users to manage orders in the pos frontend
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.

closes odoo/odoo#51141

Task-id: 1981354
Related: odoo/enterprise#11690
Related: odoo/upgrade#1472
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-17 10:00:04 +00:00
Martin Trigaux 4afa747fa1 [IMP] *: make ir.property methods private
Should only interact with them via python code in a controlled
environment, no direct call with RPC
2020-05-26 15:50:11 +02:00
Joseph Caburnay d8726778b6 [REF] pos_restaurant: migration to OWL framework 2020-05-12 12:48:58 +00:00
Pierre MasereelandRaphael Collet e85faf3986 [IMP] base: add unique constraint on ir.property
There is no unique constraint on the properties to avoid having two
properties for the same field, company and res_id.

Having two properties for the same field, company and res_id, leads to
inconsistencies through the code, as reading a company-dependent field
nondeterministically returns one of the available property value.

So now, before creating a property, we have to check that there is not
already a value for the field, company and res_id and write or create
depending on if it is already exists.

The properties of specific records already satisfy the constraint thanks
to the implementation of company-dependent fields that use the method
`set_multi`.  We added a method `set_default` to set generic properties,
and its implementation does the right thing.  It also simplifies the
code to set such properties, by the way.

closes odoo/odoo#40473

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2019-11-22 12:34:43 +00:00
Yannick Tivisse 0a8866fdeb [IMP] pos_restaurant: Adapt tests to work with/without demo data 2019-11-05 16:18:10 +01:00
Pierre Masereel 5c32788655 [FIX] pos_restaurant: make test post install
There was ahack that was setting the module pos_restaurant to installed,
which is not necessary as we should simply put the test in post_install
2019-08-22 08:20:57 +00:00
Gert Pellin 118190f3b3 [IMP] point_of_sale, pos_restaurant: multi-user sessions
PURPOSE
=========

When working in restaurants, there are often more than one waiter working on the same floor.
But Odoo doesn't support that.
There can only be one person working on one session for the same tables.
The purpose of this task to allow several people to work on the same session (while synchronizing sessions).

SPECIFICATIONS
===============

- MultiUser is active by default.
- Allow multiple waiters to login on one PoS Config.
- All waiters login to the same session, the waiter that does the paiment is the responsible for the order (same as now).
- Synchonize the information across the multiple instances running on same floors.

Syncronisation will take place at switch of table.
(close tables automaticly if no activity, to force sync)

- Syncro cannot be done if no internet : how do we manage it ? We should inform the user the internet connection has been lost and that synchro cannot be done. What impacts? To check

Useful links
https://github.com/it-projects-llc/pos-addons
https://apps.odoo.com/apps/modules/11.0/pos_bus_restaurant/

Related PR:
odoo#32789

TASK-ID: 1891130

closes odoo/odoo#33973

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-19 14:15:25 +00:00