Commit Graph
30 Commits
Author SHA1 Message Date
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
Jacky (trj) e49029406c [FIX] point_of_sale, pos_{loyalty,mercury}: restricting key to confirm or cancel popup
The "pressing a specific key to confirm/cancel a popup" behavior was added but the problem was that
some popups only had one button which was either confirm or cancel. It was thus possible to close
those popups by bypassing the default behavior (e.g. possible to "cancel" a popup which only
has one button linked to an overridden confirm method and vice-versa). Also, we normalize the use of
`confirm` and `cancel` methods in the popups so that when the specifics keys are pressed, the right
behavior is executed.

closes odoo/odoo#97069

X-original-commit: a14ade59744855a9dea8b16f23a3d61eb88678de
Related: odoo/enterprise#29957
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-08-01 12:12:17 +02:00
Yolann Sabaux cad6cae93e [FIX] pos_coupon: correct unit_price for rewardProduct
Steps to reproduce:
- set a pricelist: discount, global, 10%
- set promotion program: free product
- In pos, select the product

Issue:
The product is deducted at its lst_price and not at the discounted price such as in `Sales`.

opw-2892748

closes odoo/odoo#96477

X-original-commit: ca933667e2b5e1633f08555b2852dcf30a4a11ab
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2022-07-21 20:28:50 +02:00
MerlinGuillaume bccf88ae2d [FIX] pos_coupon: apply discounts on lines' discounted amount
Order discount do not take into account the discount on order lines so
the discount amount will be wrong

Steps to reproduce:
1. Install Point of Sale
2. Go to Settings > Point of Sale > Pricing and enable Coupons &
   Promotions
3. Go to Point of Sale > Products > Promotion Programs and edit program
   'Code for 10% on orders'
4. Change the Promo Code Usage to 'Automatically Applied'
5. Open a new session in Point of Sale 'Shop'
6. Add a product (e.g. Acoustic Bloc Screens, the discount is applied
   with value 29.50$)
7. Apply a discount of 20% on the product, the discount value doesn't
   change (it should be 23.60$)

Solution:
When computing the amount to discount, take into consideration the
discount already applied on the order line

opw-2883724

closes odoo/odoo#94791

X-original-commit: afb3e5516e43e831bec1fd6b6bc3aaa18fe3fde2
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-06-29 10:00:50 +02:00
Joseph Caburnay c44e851d5b [FIX] pos_loyalty: fix runbot error
Use of `addOrderline` presses the numpad, after clicking the product,
even if the quantity of the product being added is only 1. Because of
this, there might be a rogue press which calls `_updateSelectedOrderline`
at the wrong timing. This can be proven by looking at the screenshot where
the quantity of `Small Shelf` is 11, not 1. In this particular failing tour,
the sequence of steps properly aligned resulting to this runbot issue. To
make sure runbot isn't failing randomly, we replace `addOrderline` with
manual `click product` and `orderline check`.

Runbot: 3883, 3884, 3886
X-original-commit: 40aef1c4161f21801c1bbae823d9b5c46a035478
Part-of: odoo/odoo#93124
2022-06-08 17:59:09 +02:00
Joseph Caburnay 75d14c2282 [FIX] pos_loyalty: reward button highlight, free product, etc
- Properly compute the free product quantity.
  - Free product that generate points not based on quantity
  - Same free product from different rewards
- Proper timing of the reward button highlight. If there are products
  that are potentially free product when added, then the reward button
  is highlighted.
- Don't reorder free product reward lines. Before, if there are multiple
  free product rewards, the lines are reordered at each ui action.
- Loyalty points are computed properly, at least when free products are
  involved.
- Introduct some tests to protect the fixes.

closes odoo/odoo#92809

X-original-commit: 3e954d26b7e1e5c41c4f5372010f0573c9adcfe9
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-06-07 10:16:22 +02:00
Jacky (trj) 537d067569 [REF] point_of_sale, pos_restaurant: cleaning of the methods and flow
Cleaning of the principal methods used in the pos_restaurant flow. This make the code a lot more readable and maintainable as we strive for the single responsibility principle.

A few notable changes:
 - [REF] `point_of_sale.assets` in `pos_restaurant` now uses glob syntax (`**`) for the js files, no need to add them in the manifest anymore.
 - [MOV] Moved some methods to `pos_restaurant` (because it was only used there) from the `point_of_sale`
 - [REF] Only the created, removed and updated orders of a table are being sent to the server once we reach the Floor Screen. Before, all the orders of a table were being sent to the server as the newest state. This led to some synchronization problem when two users wanted to modify each a different order of the same table, the user leaving the table last had **all** his orders states (even the ones he didn't modify) pushed to the server.
 - [IMP] After a table transfer while being in offline mode, the transferred order is saved locally (if not yet synchronized) and going back to the previous table after getting the connection back will no longer show the transferred order after the orders fetching from the server.
 - [FIX] When an order is selected (normal Point of Sale and in a table in `pos_restaurant`), the selected order is not changed in the Ticket Screen when deleting an order unless the deleted order is the current selected order.
 - [FIX] Same as above but while settling all the tips from the `Ticket Screen`
 - [FIX] Errors are now properly handled in the `Floor Screen` depending on the context.
 - [REF] Kitchen order printing flow has been revamped and improved. This also fixes a bug where we would print a cancelled receipt changes for a skipped order line when adding a product which was already printed before (add 1 product => print => add same product + skip => print would give a cancelled changes for this order line).

closes odoo/odoo#85956

Related: odoo/enterprise#25051
Related: odoo/upgrade#3375
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-05-16 13:56:38 +02:00
William Braeckman bbad356f13 [FIX] sale_loyalty,pos_loyalty: fix discountable on specific products
Prior to this commit the discountable amount on specific products was
not computed correctly when using fixed price discounts as it did not
take the taxes into account.
They will now be taken into account and result in the correct discount.

TaskId-2834863

closes odoo/odoo#91202

X-original-commit: 669f4cca94af0c022318f6cb508c1c197aae0846
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-05-12 14:51:10 +02:00
roen-odoo 34d8762958 [FIX] point_of_sale: stop showing "select customer" popup twice
Current behavior:
When gift card module is activated for a certain PoS, and you use
customer account as the payment method without selecting a customer
the popup asking you to select a customer would appear 2 times.

Steps to reproduce:
- Activate gift cards for PoS A
- Start session in PoS A
- Add some products to the order
- Don't set any customer
- Go to the payment page
- Select "Customer account" as payment method
- Click on validate
- A popup will appear asking you to select a customer
- Click "Ok"
- The popup appears again

opw-2824675

closes odoo/odoo#91149

X-original-commit: bbb05cd9246b7478bcf1bb580dbe91ba4fb5856c
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-12 13:43:05 +02:00
roen-odoo d28b17f5d3 [FIX] pos_gift_card: keep focus on the current input field
Current behavior:
When opening the giftcard popup in a PoS the focus would always
always go back to the first input field after typing in any other
input field.

Steps to reproduce:
- Install PoS and activate gift card
- Activate option "Scan an existing barcode and set a price"
- Start a PoS session
- Access the giftcard popup
- Select "Scan and set price on gift card"
- Type anything in the second input field
- The focus will go back on the first input field

opw-2825163

closes odoo/odoo#90081

X-original-commit: 84c129c7e05bb22e5dde272ab0a7cf8d4e1c2011
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-03 13:30:58 +02:00
rhe-odoo d4be21d4c5 [FIX] pos_loyalty: fix gift card
It was impossible to create a new gift card or pay with a gift card from the front end.

With this fix, it's possible to use a gift card code in the front end and to generate a new gift card. The gift card product is now available in the pos.

closes odoo/odoo#89999

X-original-commit: 2a9b6a763b11084735cf46ac9aa83b39098b958c
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-04-29 11:01:37 +02:00
Jacky (trj) c56b1e618e [FIX] point_of_sale,pos_{sale,gift_card}: product taken in total discount
When showing the discount the to the public, the down payment and gift card products were taken into account in the discount computation shown in the receipt.

This also fix a mistake made in fc546e0481ae0159e67791240833bc1e38a4440f where it was implemented in the wrong place and returning a wrong value in a reduce callback.

closes odoo/odoo#89603

X-original-commit: 597ea7aa3f28ad82e602e1ba5679bb49d2973b78
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-04-25 18:15:24 +02:00
William Braeckman 26e79061f5 [ADD] pos_loyalty: manage loyalty in PoS
This module was moved from enterprise to community and now includes
pos_coupon and pos_gift_card aswell.

TaskId-2675382
2022-04-08 11:04:44 +02:00
Antony Lesuisse 9f1cb9ed97 [REM] pos_loyalty: moved to enterprise 2015-08-28 16:31:04 +02:00
Frédéric van der Essen 815875ac52 [FIX] pos_loyalty: remove useless console.log() 2015-05-04 14:13:46 +02:00
Frédéric van der Essen 3149c1e03f [FIX] pos_loyalty: show loyalty points updates in the customer list screen 2015-05-04 14:13:44 +02:00
Frédéric van der Essen 64cb8cf8ab [IMP] pos_loyalty: replace error popup by a less alarming alert 2015-05-04 14:13:43 +02:00
Frédéric van der Essen 463f3f48a1 [IMP] pos_loyalty: resale rewards should not be available to customers without points 2015-05-04 14:13:43 +02:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie 90050c24bb [REF] pos_X: update to the new module system 2015-03-18 09:09:22 +01:00
Frédéric van der Essen c11edf0423 [FIX] pos_loyalty: hilight the reward button if there's available rewards. 2015-03-09 15:33:43 +01:00
Frédéric van der Essen 68ca946577 [WIP] point_of_sale, pos_discount: adapt pos_discount after pos refactor
- openerp.point_of_sale.load_models([...]) allow to add models to be
   loaded at the start of te pos
 - openerp.point_of_sale.load_fields(model,fields) allow to add fields
   to be loaded for the models.
2014-12-31 15:34:32 +01:00
Frederic van der Essen 1526af8cb5 [IMP] pos_loyalty: a new type of reward: 'resale' allow the customer to sell back their points to the shop 2014-11-26 11:58:14 +01:00
Frederic van der Essen 1f64c22eeb [FIX] pos_loyalty: using the tax included price to compute the points on the reward products was confusing when it had taxes 2014-11-26 11:46:21 +01:00
Frederic van der Essen ba380c807e [IMP] pos_loyalty: add a loyalty resume at the end of the receipt 2014-11-26 11:40:22 +01:00
Frederic van der Essen 44253541e5 [IMP] point_of_sale, pos_*: unpaid orders are saved in localstorage and persist between reloads
Conflicts:
	addons/point_of_sale/static/src/js/models.js
	addons/point_of_sale/static/src/js/screens.js
	addons/pos_restaurant/static/src/js/multiprint.js
	addons/pos_restaurant/static/src/js/notes.js

Conflicts:
	addons/point_of_sale/static/src/js/models.js
	addons/point_of_sale/static/src/js/screens.js
	addons/point_of_sale/static/src/xml/pos.xml
2014-11-26 11:40:17 +01:00
Frederic van der Essen 1e0fe5a6ab [IMP] pos_loyalty: allow rules by category 2014-11-26 11:27:03 +01:00
Frederic van der Essen 6283c67e3d [IMP] pos_loyalty: renamed 'override' into a more understandable 'cumulative' 2014-11-26 11:27:03 +01:00
Frederic van der Essen a9abfb5356 [IMP] pos_loyalty: always show the reward before assignation, unless there is only one configured reward 2014-11-25 19:16:25 +01:00
Frederic van der Essen ee28165972 [MERGE] point_of_sale, pos_loyalty: merging the pos_loyalty module
Conflicts:
	addons/point_of_sale/static/src/js/widgets.js
2014-11-25 19:16:22 +01:00