Commit Graph
51 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
Joseph Caburnay 48aff86c42 [FIX] point_of_sale,*pos*: remove 'pos' field attribute
With this change, we are now assuming each field that starts with
'pos_' to be a 'pos.config' field that has value that will be saved
to the 'pos_config_id' record. We made that modification because by keeping
some related fields not written at the same time can trigger contraints at the
wrong moments that would lead to validation errors when not supposed to be.

Part-of: odoo/odoo#97032
2022-07-29 01:51:13 +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
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +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
Joseph Caburnay fa111d449d [IMP] point_of_sale,*pos*: configure pos from general settings
Purpose:

- Move PoS settings in general settings to be consistent with the rest
  of Odoo (PoS being the only app where settings are split in two locations)
- Clean settings by enabling obvious settings or dropping unnecessary ones.

closes odoo/odoo#84719

Task-id: 2753430
Related: odoo/upgrade#3260
Related: odoo/enterprise#24425
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-06-03 16:39:51 +02:00
Eleftherios Kritsotakis b0ea01ff1e [FIX] pos_loyalty: properly load loyalty_points for all partners
Before this commit, the loyalty_points field, neccessary to
implement the loyalty functionality in PoS in offline mode,
was only loaded properly for the partners at the start of
a PoS session.

After this commit, the loyalty_points are loaded properly for
every partner throughout the duration of the session, including
those that are loaded in the background or fetched when using
the search bar, which was not the case before.

Part-of: odoo/odoo#84719
2022-06-03 16:39:51 +02:00
Eleftherios Kritsotakis 602acc4801 [FIX] pos_loyalty: load reward products
Before this commit, if the config setting
limited_products_loading was activated,
some reward products might not get loaded
in the frontend. So the UI crashed whenever a
reward product was accessed.

In this commit we force-load all the reward products
at the start of session, regardless of the number of
loaded products (loading_products_amount)

Part-of: odoo/odoo#84719
2022-06-03 16:39:50 +02:00
Eleftherios Kritsotakis 891bd99299 [FIX] pos_loyalty: consider falsy query case
When limited_products_amout is 0, query is an
empty list. In this case, we do not need to
modify the result further, so we return it
as is.

Part-of: odoo/odoo#84719
2022-06-03 16:39:49 +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
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +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
Martin Trigaux 158b537c28 [I18N] *: export saas-15.2 source terms
closes odoo/odoo#89225

X-original-commit: 5925a83d87fa4702f4c0f22346304dc2da47c728
Related: odoo/enterprise#26435
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-04-23 08:33:43 +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
Yannick Tivisse 82acdbaa49 [FIX] Several fixed due to some of the demo data removal
NB : Some tests have been modified.
One assert statement in orderpoint_calendar.yml has been modified,
but the change is legit has no python method has been modified at all
2015-08-25 19:27:24 +02:00
Martin Trigaux 6c51a80aa4 [I18N] export application terms of all modules 2015-08-25 12:01:38 +02:00
Yannick Tivisse 0decfd94d1 [IMP] __openerp.py__ files : remove all occurence of authors and website
where it was 'Odoo SA', 'OpenERP SA', 'OpenERP s.a.', 'OpenERP SA', 'OpenERP'
      or 'http(s)://openerp.com' or 'http(s)://www.odoo.com'
2015-08-20 16:15:59 +02:00
Gaurav Panchal 6b55539dc7 [IMP] res_partner: form view cleaning
Better display of contacts, simplified contact creation, use default image
for shipping and delivery, and various fixes and improvements in the
form view.

Main impacted addons :

 - account: add a bank_account_count field and stat button that replaces the
 2many field
 - base_vat: remove the button to check vat, as there is already a constraint
 and removed and unused import
 - payment: add a payment_method_count field and stat button that replaces
 the 2many field
2015-08-18 10:51:27 +02:00
Raphael Collet cd925255b7 [FIX] addons: view extensions are no longer based on attribute string
In view inheritance, selecting an element based on the attribute `string` is
broken, since this attribute may be translated before the inheritance is
applied.  This fixes existing views to avoid such selections.
2015-07-06 16:58:04 +02:00
qsm-odoo faa14705ed [FIX][IMP] Template changes
Fix many templates + Add some features the enterprise edition will use
2015-06-18 10:57:35 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Frédéric van der Essen 8df1c8d2b6 [IMP] pos_loyalty: demo data for the pos_loyalty module. 2015-05-04 14:13:47 +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
Christophe Matthieu f9cb753693 [FIX] point_of_sale: create specific asset for the point_of_sale 2015-01-06 13:36:30 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +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
Frédéric van der Essen e5ff73763f [FIX] pos_loyalty: incorrect xpath 2014-11-26 15:04:11 +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 a8154a5fe9 [IMP] pos_loyalty: security access rules for the advanced barcode module 2014-11-26 11:27:01 +01:00
Frederic van der Essen e3b1239907 [IMP] pos_restaurant: security access rules for the new models 2014-11-26 11:27:00 +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